All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lee Jones <lee.jones@linaro.org>
To: Steve Twiss <stwiss.opensource@diasemi.com>
Cc: LINUXKERNEL <linux-kernel@vger.kernel.org>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	Support Opensource <support.opensource@diasemi.com>
Subject: Re: [PATCH V1] mfd: da9053: fix compiler warning message for uninitialised variable
Date: Tue, 28 Jun 2016 08:03:12 +0100	[thread overview]
Message-ID: <20160628070312.GG6720@dell> (raw)
In-Reply-To: <20160627151048.342473FAB9@swsrvapps-01.diasemi.com>

On Mon, 27 Jun 2016, Steve Twiss wrote:

> From: Steve Twiss <stwiss.opensource@diasemi.com>
> 
> Fix compiler warning caused by an uninitialised variable inside
> da9052_group_write() function. Defaulting the value to zero covers
> the trivial case.
> 
> Signed-off-by: Steve Twiss <stwiss.opensource@diasemi.com>
> Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
> 
> ---
> Hi Lee,
> 
> This compiler warning was found and reported by Geert Uytterhoeven as
> part of the "Build regressions/improvements in v4.7-rc5" thread.
> 
> - https://lkml.org/lkml/2016/6/27/126
> 
> Regards,
> Steve
> 
> 
>  include/linux/mfd/da9052/da9052.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied to -fixes.

> diff --git a/include/linux/mfd/da9052/da9052.h b/include/linux/mfd/da9052/da9052.h
> index c18a4c1..ce9230a 100644
> --- a/include/linux/mfd/da9052/da9052.h
> +++ b/include/linux/mfd/da9052/da9052.h
> @@ -171,7 +171,7 @@ static inline int da9052_group_read(struct da9052 *da9052, unsigned char reg,
>  static inline int da9052_group_write(struct da9052 *da9052, unsigned char reg,
>  				      unsigned reg_cnt, unsigned char *val)
>  {
> -	int ret;
> +	int ret = 0;
>  	int i;
>  
>  	for (i = 0; i < reg_cnt; i++) {

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

      reply	other threads:[~2016-06-28  7:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-27 15:06 [PATCH V1] mfd: da9053: fix compiler warning message for uninitialised variable Steve Twiss
2016-06-28  7:03 ` Lee Jones [this message]

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=20160628070312.GG6720@dell \
    --to=lee.jones@linaro.org \
    --cc=geert@linux-m68k.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stwiss.opensource@diasemi.com \
    --cc=support.opensource@diasemi.com \
    /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.