* drivers/rtc/rtc-pcf85063.c:292:40: warning: Clarify calculation precedence for '&' and
@ 2020-07-30 5:30 ` kernel test robot
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2020-07-30 5:30 UTC (permalink / raw)
To: Alexandre Belloni; +Cc: kbuild-all, linux-kernel
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: d3590ebf6f91350192737dd1d1b219c05277f067
commit: f86dc5bde18e540743eaef20529d9f2b67283abd rtc: pcf85063: return meaningful value for RTC_VL_READ
date: 8 months ago
compiler: or1k-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
cppcheck warnings: (new ones prefixed by >>)
>> drivers/rtc/rtc-pcf85063.c:292:40: warning: Clarify calculation precedence for '&' and '?'. [clarifyCalculation]
status = status & PCF85063_REG_SC_OS ? RTC_VL_DATA_INVALID : 0;
^
vim +292 drivers/rtc/rtc-pcf85063.c
279
280 static int pcf85063_ioctl(struct device *dev, unsigned int cmd,
281 unsigned long arg)
282 {
283 struct pcf85063 *pcf85063 = dev_get_drvdata(dev);
284 int status, ret = 0;
285
286 switch (cmd) {
287 case RTC_VL_READ:
288 ret = regmap_read(pcf85063->regmap, PCF85063_REG_SC, &status);
289 if (ret < 0)
290 return ret;
291
> 292 status = status & PCF85063_REG_SC_OS ? RTC_VL_DATA_INVALID : 0;
293
294 return put_user(status, (unsigned int __user *)arg);
295
296 default:
297 return -ENOIOCTLCMD;
298 }
299 }
300
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
^ permalink raw reply [flat|nested] 2+ messages in thread
* drivers/rtc/rtc-pcf85063.c:292:40: warning: Clarify calculation precedence for '&' and
@ 2020-07-30 5:30 ` kernel test robot
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2020-07-30 5:30 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 1488 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: d3590ebf6f91350192737dd1d1b219c05277f067
commit: f86dc5bde18e540743eaef20529d9f2b67283abd rtc: pcf85063: return meaningful value for RTC_VL_READ
date: 8 months ago
compiler: or1k-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
cppcheck warnings: (new ones prefixed by >>)
>> drivers/rtc/rtc-pcf85063.c:292:40: warning: Clarify calculation precedence for '&' and '?'. [clarifyCalculation]
status = status & PCF85063_REG_SC_OS ? RTC_VL_DATA_INVALID : 0;
^
vim +292 drivers/rtc/rtc-pcf85063.c
279
280 static int pcf85063_ioctl(struct device *dev, unsigned int cmd,
281 unsigned long arg)
282 {
283 struct pcf85063 *pcf85063 = dev_get_drvdata(dev);
284 int status, ret = 0;
285
286 switch (cmd) {
287 case RTC_VL_READ:
288 ret = regmap_read(pcf85063->regmap, PCF85063_REG_SC, &status);
289 if (ret < 0)
290 return ret;
291
> 292 status = status & PCF85063_REG_SC_OS ? RTC_VL_DATA_INVALID : 0;
293
294 return put_user(status, (unsigned int __user *)arg);
295
296 default:
297 return -ENOIOCTLCMD;
298 }
299 }
300
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-07-30 5:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-30 5:30 drivers/rtc/rtc-pcf85063.c:292:40: warning: Clarify calculation precedence for '&' and kernel test robot
2020-07-30 5:30 ` kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.