Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1440349 > unrolled thread
| Started by | Stephen Rothwell <sfr@canb.auug.org.au> |
|---|---|
| First post | 2016-07-11 10:20 +0200 |
| Last post | 2016-07-11 23:30 +0200 |
| Articles | 3 — 3 participants |
Back to article view | Back to linux.kernel
linux-next: build warning after merge of the rtc tree Stephen Rothwell <sfr@canb.auug.org.au> - 2016-07-11 10:20 +0200
Re: linux-next: build warning after merge of the rtc tree Uwe Kleine-König <uwe@kleine-koenig.org> - 2016-07-11 10:40 +0200
Re: linux-next: build warning after merge of the rtc tree Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2016-07-11 23:30 +0200
| From | Stephen Rothwell <sfr@canb.auug.org.au> |
|---|---|
| Date | 2016-07-11 10:20 +0200 |
| Subject | linux-next: build warning after merge of the rtc tree |
| Message-ID | <rTEBz-4qX-19@gated-at.bofh.it> |
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")
--
Cheers,
Stephen Rothwell
[toc] | [next] | [standalone]
| From | Uwe Kleine-König <uwe@kleine-koenig.org> |
|---|---|
| Date | 2016-07-11 10:40 +0200 |
| Message-ID | <rTEUV-4zH-5@gated-at.bofh.it> |
| In reply to | #1440349 |
[Multipart message — attachments visible in raw view] — view raw
Hello,
On Mon, Jul 11, 2016 at 06:12:08PM +1000, Stephen Rothwell wrote:
> 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")
Thanks for catching that. The obvious fix is:
diff --git a/drivers/rtc/rtc-isl12057.c b/drivers/rtc/rtc-isl12057.c
index e0245fc6205e..0e7f0f52bfe4 100644
--- a/drivers/rtc/rtc-isl12057.c
+++ b/drivers/rtc/rtc-isl12057.c
@@ -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
[toc] | [prev] | [next] | [standalone]
| From | Alexandre Belloni <alexandre.belloni@free-electrons.com> |
|---|---|
| Date | 2016-07-11 23:30 +0200 |
| Message-ID | <rTQW6-453-9@gated-at.bofh.it> |
| In reply to | #1440360 |
On 11/07/2016 at 10:23:51 +0200, Uwe Kleine-König wrote :
> Hello,
>
> On Mon, Jul 11, 2016 at 06:12:08PM +1000, Stephen Rothwell wrote:
> > 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")
>
> Thanks for catching that. The obvious fix is:
>
> diff --git a/drivers/rtc/rtc-isl12057.c b/drivers/rtc/rtc-isl12057.c
> index e0245fc6205e..0e7f0f52bfe4 100644
> --- a/drivers/rtc/rtc-isl12057.c
> +++ b/drivers/rtc/rtc-isl12057.c
> @@ -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?
>
I fixed it up. I shouldn't have missed that one...
--
Alexandre Belloni, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web