From: kernel test robot <lkp@intel.com>
To: Alexandre Belloni <alexandre.belloni@bootlin.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org
Subject: drivers/rtc/rtc-pcf85063.c:292:40: warning: Clarify calculation precedence for '&' and
Date: Thu, 30 Jul 2020 13:30:34 +0800 [thread overview]
Message-ID: <202007301329.vj66ufFB%lkp@intel.com> (raw)
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
reply other threads:[~2020-07-30 5:31 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202007301329.vj66ufFB%lkp@intel.com \
--to=lkp@intel.com \
--cc=alexandre.belloni@bootlin.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®