lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Fri, 8 Jan 2021 02:20:38 +0800
From:   kernel test robot <lkp@...el.com>
To:     Bartosz Golaszewski <brgl@...ev.pl>,
        Krzysztof Kozlowski <krzk@...nel.org>,
        Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>,
        Alessandro Zummo <a.zummo@...ertech.it>,
        Alexandre Belloni <alexandre.belloni@...tlin.com>
Cc:     kbuild-all@...ts.01.org, clang-built-linux@...glegroups.com,
        linux-kernel@...r.kernel.org, linux-samsung-soc@...r.kernel.org,
        linux-rtc@...r.kernel.org,
        Bartosz Golaszewski <bgolaszewski@...libre.com>
Subject: Re: [PATCH v3 2/2] rtc: s5m: use devm_i2c_new_dummy_device()

Hi Bartosz,

I love your patch! Perhaps something to improve:

[auto build test WARNING on abelloni/rtc-next]
[also build test WARNING on v5.11-rc2 next-20210104]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Bartosz-Golaszewski/rtc-s5m-check-the-return-value-of-s5m8767_rtc_init_reg/20210107-214351
base:   https://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux.git rtc-next
config: x86_64-randconfig-a005-20210107 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 5c951623bc8965fa1e89660f2f5f4a2944e4981a)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        # https://github.com/0day-ci/linux/commit/acac325366af9adafe0057352be2e0567f59d099
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Bartosz-Golaszewski/rtc-s5m-check-the-return-value-of-s5m8767_rtc_init_reg/20210107-214351
        git checkout acac325366af9adafe0057352be2e0567f59d099
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>

All warnings (new ones prefixed by >>):

>> drivers/rtc/rtc-s5m.c:773:4: warning: format specifies type 'int' but the argument has type 'long' [-Wformat]
                           PTR_ERR(info->regmap));
                           ^~~~~~~~~~~~~~~~~~~~~
   include/linux/dev_printk.h:112:32: note: expanded from macro 'dev_err'
           _dev_err(dev, dev_fmt(fmt), ##__VA_ARGS__)
                                 ~~~     ^~~~~~~~~~~
   1 warning generated.


vim +773 drivers/rtc/rtc-s5m.c

   712	
   713	static int s5m_rtc_probe(struct platform_device *pdev)
   714	{
   715		struct sec_pmic_dev *s5m87xx = dev_get_drvdata(pdev->dev.parent);
   716		struct sec_platform_data *pdata = s5m87xx->pdata;
   717		struct s5m_rtc_info *info;
   718		const struct regmap_config *regmap_cfg;
   719		int ret, alarm_irq;
   720	
   721		if (!pdata) {
   722			dev_err(pdev->dev.parent, "Platform data not supplied\n");
   723			return -ENODEV;
   724		}
   725	
   726		info = devm_kzalloc(&pdev->dev, sizeof(*info), GFP_KERNEL);
   727		if (!info)
   728			return -ENOMEM;
   729	
   730		switch (platform_get_device_id(pdev)->driver_data) {
   731		case S2MPS15X:
   732			regmap_cfg = &s2mps14_rtc_regmap_config;
   733			info->regs = &s2mps15_rtc_regs;
   734			alarm_irq = S2MPS14_IRQ_RTCA0;
   735			break;
   736		case S2MPS14X:
   737			regmap_cfg = &s2mps14_rtc_regmap_config;
   738			info->regs = &s2mps14_rtc_regs;
   739			alarm_irq = S2MPS14_IRQ_RTCA0;
   740			break;
   741		case S2MPS13X:
   742			regmap_cfg = &s2mps14_rtc_regmap_config;
   743			info->regs = &s2mps13_rtc_regs;
   744			alarm_irq = S2MPS14_IRQ_RTCA0;
   745			break;
   746		case S5M8763X:
   747			regmap_cfg = &s5m_rtc_regmap_config;
   748			info->regs = &s5m_rtc_regs;
   749			alarm_irq = S5M8763_IRQ_ALARM0;
   750			break;
   751		case S5M8767X:
   752			regmap_cfg = &s5m_rtc_regmap_config;
   753			info->regs = &s5m_rtc_regs;
   754			alarm_irq = S5M8767_IRQ_RTCA1;
   755			break;
   756		default:
   757			dev_err(&pdev->dev,
   758					"Device type %lu is not supported by RTC driver\n",
   759					platform_get_device_id(pdev)->driver_data);
   760			return -ENODEV;
   761		}
   762	
   763		info->i2c = devm_i2c_new_dummy_device(&pdev->dev, s5m87xx->i2c->adapter,
   764						      RTC_I2C_ADDR);
   765		if (IS_ERR(info->i2c)) {
   766			dev_err(&pdev->dev, "Failed to allocate I2C for RTC\n");
   767			return PTR_ERR(info->i2c);
   768		}
   769	
   770		info->regmap = devm_regmap_init_i2c(info->i2c, regmap_cfg);
   771		if (IS_ERR(info->regmap)) {
   772			dev_err(&pdev->dev, "Failed to allocate RTC register map: %d\n",
 > 773				PTR_ERR(info->regmap));
   774			return PTR_ERR(info->regmap);
   775		}
   776	
   777		info->dev = &pdev->dev;
   778		info->s5m87xx = s5m87xx;
   779		info->device_type = platform_get_device_id(pdev)->driver_data;
   780	
   781		if (s5m87xx->irq_data) {
   782			info->irq = regmap_irq_get_virq(s5m87xx->irq_data, alarm_irq);
   783			if (info->irq <= 0) {
   784				dev_err(&pdev->dev, "Failed to get virtual IRQ %d\n",
   785					alarm_irq);
   786				return -EINVAL;
   787			}
   788		}
   789	
   790		platform_set_drvdata(pdev, info);
   791	
   792		ret = s5m8767_rtc_init_reg(info);
   793		if (ret)
   794			return ret;
   795	
   796		device_init_wakeup(&pdev->dev, 1);
   797	
   798		info->rtc_dev = devm_rtc_device_register(&pdev->dev, "s5m-rtc",
   799							 &s5m_rtc_ops, THIS_MODULE);
   800	
   801		if (IS_ERR(info->rtc_dev))
   802			return PTR_ERR(info->rtc_dev);
   803	
   804		if (!info->irq) {
   805			dev_info(&pdev->dev, "Alarm IRQ not available\n");
   806			return 0;
   807		}
   808	
   809		ret = devm_request_threaded_irq(&pdev->dev, info->irq, NULL,
   810						s5m_rtc_alarm_irq, 0, "rtc-alarm0",
   811						info);
   812		if (ret < 0) {
   813			dev_err(&pdev->dev, "Failed to request alarm IRQ: %d: %d\n",
   814				info->irq, ret);
   815			return ret;
   816		}
   817	
   818		return 0;
   819	}
   820	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

Download attachment ".config.gz" of type "application/gzip" (47079 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ