Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1432113 > unrolled thread

[PATCH V1] mfd: da9053: fix compiler warning message for uninitialised variable

Started bySteve Twiss <stwiss.opensource@diasemi.com>
First post2016-06-27 17:20 +0200
Last post2016-06-28 09:10 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH V1] mfd: da9053: fix compiler warning message for  uninitialised variable Steve Twiss <stwiss.opensource@diasemi.com> - 2016-06-27 17:20 +0200
    Re: [PATCH V1] mfd: da9053: fix compiler warning message for  uninitialised variable Lee Jones <lee.jones@linaro.org> - 2016-06-28 09:10 +0200

#1432113 — [PATCH V1] mfd: da9053: fix compiler warning message for uninitialised variable

FromSteve Twiss <stwiss.opensource@diasemi.com>
Date2016-06-27 17:20 +0200
Subject[PATCH V1] mfd: da9053: fix compiler warning message for uninitialised variable
Message-ID<rOGul-20Y-1@gated-at.bofh.it>
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(-)

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++) {
-- 
end-of-patch for PATCH V1

[toc] | [next] | [standalone]


#1432554

FromLee Jones <lee.jones@linaro.org>
Date2016-06-28 09:10 +0200
Message-ID<rOVjI-3E5-7@gated-at.bofh.it>
In reply to#1432113
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

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web