public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: alexandre.belloni@bootlin•com (Alexandre Belloni)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH 1/2] rtc: armada38x: drop redundant initialization
Date: Thu, 21 Jun 2018 19:59:39 +0200	[thread overview]
Message-ID: <20180621175939.GL7737@piout.net> (raw)
In-Reply-To: <00ffe926e6878724d8289dd0e289a1f16df55ef7.1529602823.git.baruch@tkos.co.il>

On 21/06/2018 20:40:22+0300, Baruch Siach wrote:
> The 'ret' variable in these functions is set unconditionally below.
> 

Hum, what is the actual benefit of this patch?

> Signed-off-by: Baruch Siach <baruch@tkos•co.il>
> ---
>  drivers/rtc/rtc-armada38x.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/rtc/rtc-armada38x.c b/drivers/rtc/rtc-armada38x.c
> index 1e4978c96ffd..4d62a54fd5d6 100644
> --- a/drivers/rtc/rtc-armada38x.c
> +++ b/drivers/rtc/rtc-armada38x.c
> @@ -229,7 +229,7 @@ static int armada38x_rtc_read_time(struct device *dev, struct rtc_time *tm)
>  static int armada38x_rtc_set_time(struct device *dev, struct rtc_time *tm)
>  {
>  	struct armada38x_rtc *rtc = dev_get_drvdata(dev);
> -	int ret = 0;
> +	int ret;
>  	unsigned long time, flags;
>  
>  	ret = rtc_tm_to_time(tm, &time);
> @@ -272,7 +272,7 @@ static int armada38x_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alrm)
>  	u32 reg = ALARM_REG(RTC_ALARM1, rtc->data->alarm);
>  	u32 reg_irq = ALARM_REG(RTC_IRQ1_CONF, rtc->data->alarm);
>  	unsigned long time, flags;
> -	int ret = 0;
> +	int ret;
>  
>  	ret = rtc_tm_to_time(&alrm->time, &time);
>  
> -- 
> 2.17.1
> 

-- 
Alexandre Belloni, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

       reply	other threads:[~2018-06-21 17:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <00ffe926e6878724d8289dd0e289a1f16df55ef7.1529602823.git.baruch@tkos.co.il>
2018-06-21 17:59 ` Alexandre Belloni [this message]
     [not found] ` <2a509f094a7ae584f657fb02791e5edea29ea149.1529602823.git.baruch@tkos.co.il>
2018-06-28 13:56   ` [PATCH 2/2] rtc: armada38x: reset after rtc power loss Gregory CLEMENT
2018-07-12 18:36   ` Alexandre Belloni

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=20180621175939.GL7737@piout.net \
    --to=alexandre.belloni@bootlin$(echo .)com \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox