diff options
author | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2021-11-07 23:53:48 +0100 |
---|---|---|
committer | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2021-11-10 00:45:35 +0100 |
commit | 72e4ee638d8e1d7d80079c37ec8641fec0d63016 (patch) | |
tree | 17b2d8a69ce326148e315b145b95d39ca2218eeb /drivers | |
parent | 03a86cda4123084c7969387e7e0b69f23c2f8acf (diff) | |
download | linux-72e4ee638d8e1d7d80079c37ec8641fec0d63016.tar.bz2 |
rtc: pcf85063: silence cppcheck warning
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;
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20211107225349.110707-1-alexandre.belloni@bootlin.com
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/rtc/rtc-pcf85063.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/rtc/rtc-pcf85063.c b/drivers/rtc/rtc-pcf85063.c index 4a70d6bae859..15e50bb10cf0 100644 --- a/drivers/rtc/rtc-pcf85063.c +++ b/drivers/rtc/rtc-pcf85063.c @@ -299,7 +299,7 @@ static int pcf85063_ioctl(struct device *dev, unsigned int cmd, if (ret < 0) return ret; - status = status & PCF85063_REG_SC_OS ? RTC_VL_DATA_INVALID : 0; + status = (status & PCF85063_REG_SC_OS) ? RTC_VL_DATA_INVALID : 0; return put_user(status, (unsigned int __user *)arg); |