* [PATCH] rtc-bfin: add missing "return 0" in new alarm func
@ 2011-03-18 8:26 Mike Frysinger
2011-03-18 14:26 ` Harry Wei
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Mike Frysinger @ 2011-03-18 8:26 UTC (permalink / raw)
To: rtc-linux, Alessandro Zummo; +Cc: John Stultz, linux-kernel, stable
The new bfin_rtc_alarm_irq_enable function forgot to add a "return 0" to
the end leading to the build warning:
drivers/rtc/rtc-bfin.c: In function 'bfin_rtc_alarm_irq_enable':
drivers/rtc/rtc-bfin.c:253: warning: control reaches end of non-void function
CC: stable@kernel.org
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
drivers/rtc/rtc-bfin.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/rtc/rtc-bfin.c b/drivers/rtc/rtc-bfin.c
index 17971d9..0e61e2d 100644
--- a/drivers/rtc/rtc-bfin.c
+++ b/drivers/rtc/rtc-bfin.c
@@ -276,6 +276,8 @@ static int bfin_rtc_alarm_irq_enable(struct device *dev, unsigned int enabled)
bfin_rtc_int_set_alarm(rtc);
else
bfin_rtc_int_clear(~(RTC_ISTAT_ALARM | RTC_ISTAT_ALARM_DAY));
+
+ return 0;
}
static int bfin_rtc_read_time(struct device *dev, struct rtc_time *tm)
--
1.7.4.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] rtc-bfin: add missing "return 0" in new alarm func
2011-03-18 8:26 [PATCH] rtc-bfin: add missing "return 0" in new alarm func Mike Frysinger
@ 2011-03-18 14:26 ` Harry Wei
2011-03-18 17:52 ` Mike Frysinger
[not found] ` <AANLkTinjTVpNbkiNKpbc7kvtMVeXfjifr7Q5Dg4B9oGE@mail.gmail.com>
2011-03-19 1:18 ` [PATCH] rtc-bfin: add missing "return 0" in new alarm func John Stultz
2 siblings, 1 reply; 5+ messages in thread
From: Harry Wei @ 2011-03-18 14:26 UTC (permalink / raw)
To: Mike Frysinger; +Cc: john.stultz, linux-kernel, stable, rtc-linux, a.zummo
On Fri, Mar 18, 2011 at 04:26:24AM -0400, Mike Frysinger wrote:
> The new bfin_rtc_alarm_irq_enable function forgot to add a "return 0" to
> the end leading to the build warning:
> drivers/rtc/rtc-bfin.c: In function 'bfin_rtc_alarm_irq_enable':
> drivers/rtc/rtc-bfin.c:253: warning: control reaches end of non-void function
Hi Mike,
I am sure we should give a return-value
but whether it is '0'? Maybe it should return
other value.
Can you give some explanations for yours.
Thanks.
Best Regards.
Harry Wei.
>
> CC: stable@kernel.org
> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
> ---
> drivers/rtc/rtc-bfin.c | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/rtc/rtc-bfin.c b/drivers/rtc/rtc-bfin.c
> index 17971d9..0e61e2d 100644
> --- a/drivers/rtc/rtc-bfin.c
> +++ b/drivers/rtc/rtc-bfin.c
> @@ -276,6 +276,8 @@ static int bfin_rtc_alarm_irq_enable(struct device *dev, unsigned int enabled)
> bfin_rtc_int_set_alarm(rtc);
> else
> bfin_rtc_int_clear(~(RTC_ISTAT_ALARM | RTC_ISTAT_ALARM_DAY));
> +
> + return 0;
> }
>
> static int bfin_rtc_read_time(struct device *dev, struct rtc_time *tm)
> --
> 1.7.4.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] rtc-bfin: add missing "return 0" in new alarm func
2011-03-18 14:26 ` Harry Wei
@ 2011-03-18 17:52 ` Mike Frysinger
0 siblings, 0 replies; 5+ messages in thread
From: Mike Frysinger @ 2011-03-18 17:52 UTC (permalink / raw)
To: Harry Wei; +Cc: john.stultz, linux-kernel, stable, rtc-linux, a.zummo
On Fri, Mar 18, 2011 at 10:26, Harry Wei wrote:
> On Fri, Mar 18, 2011 at 04:26:24AM -0400, Mike Frysinger wrote:
>> The new bfin_rtc_alarm_irq_enable function forgot to add a "return 0" to
>> the end leading to the build warning:
>> drivers/rtc/rtc-bfin.c: In function 'bfin_rtc_alarm_irq_enable':
>> drivers/rtc/rtc-bfin.c:253: warning: control reaches end of non-void function
>
> I am sure we should give a return-value
> but whether it is '0'? Maybe it should return
> other value.
> Can you give some explanations for yours.
read the interface.c code ... this func returns 0 on "success". i
dont know what other possible value this could return.
-mike
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] rtc-bfin: add missing "return 0" in new alarm func> On Fri, Mar 18, 2011 at 04:26:24AM -0400, Mike Frysinger wrote:
[not found] ` <AANLkTinC_WCh2XXk-irG9d5QZvVU439_FYWZzTGQLbG7@mail.gmail.com>
@ 2011-03-19 1:15 ` Harry Wei
0 siblings, 0 replies; 5+ messages in thread
From: Harry Wei @ 2011-03-19 1:15 UTC (permalink / raw)
To: vapier; +Cc: john.stultz, linux-kernel, stable, rtc-linux, a.zummo
On Sat, Mar 19, 2011 at 09:10:14AM +0800, jiaweiwei wrote:
>
> >> the end leading to the build warning:
> >> drivers/rtc/rtc-bfin.c: In function 'bfin_rtc_alarm_irq_enable':
> >> drivers/rtc/rtc-bfin.c:253: warning: control reaches end of
> >> non-void function
> >>
> >> CC: stable@kernel.org
> >> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Harry Wei <harryxiyou@gmail.com>
> >> ---
> >> drivers/rtc/rtc-bfin.c | 2 ++
> >> 1 files changed, 2 insertions(+), 0 deletions(-)
> >>
> >> diff --git a/drivers/rtc/rtc-bfin.c b/drivers/rtc/rtc-bfin.c
> >> index 17971d9..0e61e2d 100644
> >> --- a/drivers/rtc/rtc-bfin.c
> >> +++ b/drivers/rtc/rtc-bfin.c
> >> @@ -276,6 +276,8 @@ static int bfin_rtc_alarm_irq_enable(struct device
> >> *dev, unsigned int enabled)
> >> bfin_rtc_int_set_alarm(rtc);
> >> else
> >> bfin_rtc_int_clear(~(RTC_ISTAT_ALARM |
> >> RTC_ISTAT_ALARM_DAY));
> >> +
> >> + return 0;
> >> }
> >>
> >> static int bfin_rtc_read_time(struct device *dev, struct rtc_time *tm)
> >> --
> >> 1.7.4.1
> >>
>alarm_irq_enable function forgot to add a "return 0" to
>> the end leading to the build warning:
>> drivers/rtc/rtc-bfin.c: In function 'bfin_rtc_alarm_irq_enable':
>> drivers/rtc/rtc-bfin.c:253: warning: control reaches end of non-void function
>
> I am sure we should give a return-value
> but whether it is '0'? Maybe it should return
> other value.
> Can you give some explanations for yours.
>read the interface.c code ... this func returns 0 on "success". i
>dont know what other possible value this could return.
Oh, it is true.
Thanks.
Best Regards.
Harry Wei.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] rtc-bfin: add missing "return 0" in new alarm func
2011-03-18 8:26 [PATCH] rtc-bfin: add missing "return 0" in new alarm func Mike Frysinger
2011-03-18 14:26 ` Harry Wei
[not found] ` <AANLkTinjTVpNbkiNKpbc7kvtMVeXfjifr7Q5Dg4B9oGE@mail.gmail.com>
@ 2011-03-19 1:18 ` John Stultz
2 siblings, 0 replies; 5+ messages in thread
From: John Stultz @ 2011-03-19 1:18 UTC (permalink / raw)
To: Mike Frysinger; +Cc: rtc-linux, Alessandro Zummo, linux-kernel, stable
On Fri, 2011-03-18 at 04:26 -0400, Mike Frysinger wrote:
> The new bfin_rtc_alarm_irq_enable function forgot to add a "return 0" to
> the end leading to the build warning:
> drivers/rtc/rtc-bfin.c: In function 'bfin_rtc_alarm_irq_enable':
> drivers/rtc/rtc-bfin.c:253: warning: control reaches end of non-void function
>
> CC: stable@kernel.org
> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Thanks for catching this!
Acked-by: John Stultz <john.stultz@linaro.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-03-19 1:18 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-18 8:26 [PATCH] rtc-bfin: add missing "return 0" in new alarm func Mike Frysinger
2011-03-18 14:26 ` Harry Wei
2011-03-18 17:52 ` Mike Frysinger
[not found] ` <AANLkTinjTVpNbkiNKpbc7kvtMVeXfjifr7Q5Dg4B9oGE@mail.gmail.com>
[not found] ` <AANLkTinC_WCh2XXk-irG9d5QZvVU439_FYWZzTGQLbG7@mail.gmail.com>
2011-03-19 1:15 ` [PATCH] rtc-bfin: add missing "return 0" in new alarm func> On Fri, Mar 18, 2011 at 04:26:24AM -0400, Mike Frysinger wrote: Harry Wei
2011-03-19 1:18 ` [PATCH] rtc-bfin: add missing "return 0" in new alarm func John Stultz
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.