Commit 72e4ee63 authored by Alexandre Belloni's avatar Alexandre Belloni
Browse files

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: default avatarkernel test robot <lkp@intel.com>
Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20211107225349.110707-1-alexandre.belloni@bootlin.com
parent 03a86cda
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);