All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [U-boot] [PATCH 2/2] ds174x: Fix warning on	return in rtc_get and rtc_set function
Date: Wed, 9 Apr 2008 10:46:35 +0200	[thread overview]
Message-ID: <20080409084635.GB28294@game.jcrosoft.org> (raw)
In-Reply-To: <20080408210124.6713F24842@gemini.denx.de>

On 23:01 Tue 08 Apr     , Wolfgang Denk wrote:
> In message <1207116238-7253-3-git-send-email-plagnioj@jcrosoft.com> you wrote:
> > ds174x.c: In function 'rtc_get':
> > ds174x.c:117: warning: no return statement in function returning non-void
> > ds174x.c: In function 'rtc_set':
> > ds174x.c:146: warning: 'return' with a value, in function returning void
> > 
> > Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> > 
> > diff --git a/drivers/rtc/ds174x.c b/drivers/rtc/ds174x.c
> > index 81a9cb3..eb3ca88 100644
> > --- a/drivers/rtc/ds174x.c
> > +++ b/drivers/rtc/ds174x.c
> > @@ -114,6 +114,7 @@ int rtc_get( struct rtc_time *tmp )
> >  		tmp->tm_year, tmp->tm_mon, tmp->tm_mday, tmp->tm_wday,
> >  		tmp->tm_hour, tmp->tm_min, tmp->tm_sec );
> >  #endif
> > +	return 0;
> >  }
> >  
> >  void rtc_set( struct rtc_time *tmp )
> > @@ -142,8 +143,6 @@ void rtc_set( struct rtc_time *tmp )
> >  
> >  	/* unlock clock registers after read */
> >  	rtc_write( RTC_CONTROLA, ( reg_a  & ~RTC_CA_WRITE ));
> > -
> > -	return 0;
> >  }
> >  
> >  void rtc_reset (void)
> 
> I think this is actually not the right fix.
> 
> To make things right, both rtc_set() and rtc_get() should return
> "int".
> 
> Yes, I'm aware that this is far beyond the scope of your fixes here,
> but I wanted to at least note that.
> 
> Note that this is no NAK.
> 
I can add it in my task for this fix window or in the next merge windows

Best Regards,
J.

  reply	other threads:[~2008-04-09  8:46 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-02  6:03 [U-Boot-Users] [PATCH 0/2] MPC8xx: Fix libfdt support introduced in commit 77ff7b74 Jean-Christophe PLAGNIOL-VILLARD
2008-04-02  6:03 ` [U-Boot-Users] [PATCH 1/2] cmd_log.c: Fix assignment differ in signedness Jean-Christophe PLAGNIOL-VILLARD
2008-04-02  6:03   ` [U-Boot-Users] [PATCH 2/2] ds174x: Fix warning on return in rtc_get and rtc_set function Jean-Christophe PLAGNIOL-VILLARD
2008-04-02 11:37     ` [U-Boot-Users] [PATCH] cmd_nand: Fix warning: dereferencing type-punned pointer will break strict-aliasing rules Jean-Christophe PLAGNIOL-VILLARD
2008-04-02 11:41       ` [U-Boot-Users] [PATCH] mpc837xerdb: Fix warning: implicit declaration of function 'fdt_fixup_dr_usb' Jean-Christophe PLAGNIOL-VILLARD
2008-04-02 17:50         ` Kim Phillips
2008-04-08 14:40         ` [U-Boot-Users] unassigned-patches/13: " u-boot at bugs.denx.de
2008-04-02 14:34       ` [U-Boot-Users] [PATCH] cmd_nand: Fix warning: dereferencing type-punned pointer will break strict-aliasing rules Stefan Roese
2008-04-02 14:39       ` Wolfgang Denk
2008-04-02 14:50         ` Jean-Christophe PLAGNIOL-VILLARD
2008-04-08 14:40       ` [U-Boot-Users] unassigned-patches/11: " u-boot at bugs.denx.de
2008-04-08 20:49       ` [U-Boot-Users] [U-boot] " Wolfgang Denk
2008-04-08 14:40     ` [U-Boot-Users] unassigned-patches/12: [PATCH 2/2] ds174x: Fix warning on return in rtc_get and rtc_set function u-boot at bugs.denx.de
2008-04-08 21:01     ` [U-Boot-Users] [U-boot] " Wolfgang Denk
2008-04-09  8:46       ` Jean-Christophe PLAGNIOL-VILLARD [this message]
2008-04-09 10:42         ` Wolfgang Denk
2008-04-18  4:14     ` [U-Boot-Users] " Wolfgang Denk
2008-04-08 14:40   ` [U-Boot-Users] unassigned-patches/10: [PATCH 1/2] cmd_log.c: Fix assignment differ in signedness u-boot at bugs.denx.de
2008-04-18  4:14   ` [U-Boot-Users] " Wolfgang Denk
2008-04-02 12:11 ` [U-Boot-Users] [PATCH 0/2] MPC8xx: Fix libfdt support introduced in commit 77ff7b74 Jerry Van Baren
2008-04-08 14:40 ` [U-Boot-Users] unassigned-patches/9: " u-boot at bugs.denx.de
2008-04-08 20:47 ` [U-Boot-Users] [U-boot] " Wolfgang Denk
2008-04-09  0:04   ` Jerry Van Baren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080409084635.GB28294@game.jcrosoft.org \
    --to=plagnioj@jcrosoft.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.