Skip to contentSkip to conversation

linux-next: build warning after merge of the rtc tree

DISCUSSION Stephen Rothwell 3 participants 3 messages Jul 11, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi Alexandre,

After merging the rtc tree, today's linux-next build (x86 64_allmodconfig) produced this warning:

drivers/rtc/rtc-isl12057.c: In function 'isl12057_rtc_read_alarm':
drivers/rtc/rtc-isl12057.c:249:26: warning: unused variable 'alarm_secs' [-Wunused-variable]

  unsigned long rtc_secs, alarm_secs;
                          ^
drivers/rtc/rtc-isl12057.c:249:16: warning: unused variable 'rtc_secs' [-Wunused-variable]
  unsigned long rtc_secs, alarm_secs;
                ^
drivers/rtc/rtc-isl12057.c:248:18: warning: unused variable 'rtc_tm' [-Wunused-variable]
  struct rtc_time rtc_tm, *alarm_tm = &alarm->time;
                  ^

Introduced by commit

4e30a585a343 ("rtc: isl12057: let the rtc core interpret the partial alarm")

Signature · 2 lines
Cheers,
Stephen Rothwell
#1 lore raw

Hello,

Quoted 14 lines · Stephen Rothwell

After merging the rtc tree, today's linux-next build (x86 64_allmodconfig) produced this warning:

drivers/rtc/rtc-isl12057.c: In function 'isl12057_rtc_read_alarm':
drivers/rtc/rtc-isl12057.c:249:26: warning: unused variable 'alarm_secs' [-Wunused-variable]

  unsigned long rtc_secs, alarm_secs;
                          ^
drivers/rtc/rtc-isl12057.c:249:16: warning: unused variable 'rtc_secs' [-Wunused-variable]
  unsigned long rtc_secs, alarm_secs;
                ^
drivers/rtc/rtc-isl12057.c:248:18: warning: unused variable 'rtc_tm' [-Wunused-variable]
  struct rtc_time rtc_tm, *alarm_tm = &alarm->time;
                  ^
Quoted 3 lines

Introduced by commit

4e30a585a343 ("rtc: isl12057: let the rtc core interpret the partial alarm")

Thanks for catching that. The obvious fix is:

drivers/rtc/rtc-isl12057.c +1 -2
index e0245fc6205e..0e7f0f52bfe4 100644
@@ -245,8 +245,7 @@ static int isl12057_rtc_update_alarm(struct device *dev, int enable)
 static int isl12057_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alarm)
 {
 	struct isl12057_rtc_data *data = dev_get_drvdata(dev);
-	struct rtc_time rtc_tm, *alarm_tm = &alarm->time;
-	unsigned long rtc_secs, alarm_secs;
+	struct rtc_time *alarm_tm = &alarm->time;
 	u8 regs[ISL12057_A1_SEC_LEN];
 	unsigned int ir;
 	int ret;

Alexandre: Do you fixup, or should I send a proper patch for that?

Best regards
Uwe

#2 lore raw
Quoted 38 lines · Uwe Kleine-König

Hello,

Quoted 14 lines · Stephen Rothwell

After merging the rtc tree, today's linux-next build (x86 64_allmodconfig) produced this warning:

drivers/rtc/rtc-isl12057.c: In function 'isl12057_rtc_read_alarm':
drivers/rtc/rtc-isl12057.c:249:26: warning: unused variable 'alarm_secs' [-Wunused-variable]

  unsigned long rtc_secs, alarm_secs;
                          ^
drivers/rtc/rtc-isl12057.c:249:16: warning: unused variable 'rtc_secs' [-Wunused-variable]
  unsigned long rtc_secs, alarm_secs;
                ^
drivers/rtc/rtc-isl12057.c:248:18: warning: unused variable 'rtc_tm' [-Wunused-variable]
  struct rtc_time rtc_tm, *alarm_tm = &alarm->time;
                  ^
Quoted 3 lines

Introduced by commit

4e30a585a343 ("rtc: isl12057: let the rtc core interpret the partial alarm")

Thanks for catching that. The obvious fix is:

drivers/rtc/rtc-isl12057.c +1 -2
index e0245fc6205e..0e7f0f52bfe4 100644
@@ -245,8 +245,7 @@ static int isl12057_rtc_update_alarm(struct device *dev, int enable)
 static int isl12057_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alarm)
 {
 	struct isl12057_rtc_data *data = dev_get_drvdata(dev);
-	struct rtc_time rtc_tm, *alarm_tm = &alarm->time;
-	unsigned long rtc_secs, alarm_secs;
+	struct rtc_time *alarm_tm = &alarm->time;
 	u8 regs[ISL12057_A1_SEC_LEN];
 	unsigned int ir;
 	int ret;
Quoted 2 lines

Alexandre: Do you fixup, or should I send a proper patch for that?

I fixed it up. I shouldn't have missed that one...

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