lkml.org 
[lkml]   [2011]   [Mar]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] rtc-bfin: add missing "return 0" in new alarm func> On Fri, Mar 18, 2011 at 04:26:24AM -0400, Mike Frysinger wrote:
    	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.


    \
     
     \ /
      Last update: 2011-03-19 02:19    [W:0.023 / U:30.896 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site