Skip to contentSkip to conversation

drivers/rtc: fix compile warning introduced by 1s reboot fix

PATCH In review Paul Gortmaker 2 participants 2 messages Aug 11, 2015 Real time clock (RTC)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers/rtc: fix compile warning introduced by 1s reboot fix

We currently see this warning:

drivers/rtc/rtc-cmos.c:851:7: warning: unused variable 'err'

introduced by commit 7b4a008088a28ea936fffbbfa770d0184468a0ce ("rtc-cmos:
Cancel alarm timer if alarm time is equal to now+1 seconds").

Presumably some WIP version of the commit was doing error checking but then the variable was not removed prior to submission, and the pending commits weren't on kernel.org for kbuild bot to spot the new warning created.

Cc Adrian Huang <[email protected]>
Cc Egbert Eich <[email protected]>
Cc Diego Ercolani <[email protected]>
Cc Borislav Petkov <[email protected]>
Cc Alexandre Belloni <[email protected]>
Cc Alessandro Zummo <[email protected]>

---

[Note: patch is against linux-next, so if the rtc tree is rebased,
then the above commit ID reference will be stale. Feel free to adjust the commit log appropriately, if need be, or even squash this into the original offending patch, if rebasing back that far. Also ensuring your tree is on kernel.org will allow kbuild bot to spot these on your behalf via the zero day builds.]

 drivers/rtc/rtc-cmos.c | 1 -
 1 file changed, 1 deletion(-)
drivers/rtc/rtc-cmos.c +0 -1
index 916bd1f555e5..c2e90c62a59c 100644
@@ -848,7 +848,6 @@ static int cmos_aie_poweroff(struct device *dev)
 	 */
 	if (cmos->alarm_expires == t_now + 1) {
 		struct rtc_wkalrm alarm;
-		int err;
 
 		/* Cancel the AIE timer by configuring the past time. */
 		rtc_time64_to_tm(t_now - 1, &alarm.time);
Signature · 12 lines
2.5.0

-- 
-- 
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
--- 
You received this message because you are subscribed to the Google Groups "rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.
#1 lore raw

Hi Paul,

Quoted 20 lines · Paul Gortmaker

We currently see this warning:

drivers/rtc/rtc-cmos.c:851:7: warning: unused variable 'err'

introduced by commit 7b4a008088a28ea936fffbbfa770d0184468a0ce ("rtc-cmos:
Cancel alarm timer if alarm time is equal to now+1 seconds").

Presumably some WIP version of the commit was doing error checking but then the variable was not removed prior to submission, and the pending commits weren't on kernel.org for kbuild bot to spot the new warning created.

Cc Adrian Huang <[email protected]>
Cc Egbert Eich <[email protected]>
Cc Diego Ercolani <[email protected]>
Cc Borislav Petkov <[email protected]>
Cc Alexandre Belloni <[email protected]>
Cc Alessandro Zummo <[email protected]>
Quoted 9 lines

---

[Note: patch is against linux-next, so if the rtc tree is rebased,
then the above commit ID reference will be stale. Feel free to adjust the commit log appropriately, if need be, or even squash this into the original offending patch, if rebasing back that far. Also ensuring your tree is on kernel.org will allow kbuild bot to spot these on your behalf via the zero day builds.]

I'm pretty sure my rtc-next branch on kernel.org already carry the fix. I fixed it on monday: 2015-08-10 07:12:44 (GMT). It just seems that linux-next has not been updated since then.

Signature · 14 lines
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

-- 
-- 
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
--- 
You received this message because you are subscribed to the Google Groups "rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.