public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] arm: exynos: Squash bogus warnings in pinmux
@ 2014-03-10 19:04 Marek Vasut
  2014-03-10 19:26 ` Simon Glass
  0 siblings, 1 reply; 9+ messages in thread
From: Marek Vasut @ 2014-03-10 19:04 UTC (permalink / raw)
  To: u-boot

Squash these warnings in pinmux.c found with GCC 4.8:

/arch/arm/cpu/armv7/exynos/pinmux.c: In function 'exynos_pinmux_config':
/arch/arm/cpu/armv7/exynos/pinmux.c:687:28: warning: 'count' may be used uninitialized in this function [-Wmaybe-uninitialized]
  for (i = start; i < start + count; i++) {
                            ^
/arch/arm/cpu/armv7/exynos/pinmux.c:663:16: note: 'count' was declared here
  int i, start, count;
                ^
/arch/arm/cpu/armv7/exynos/pinmux.c:687:28: warning: 'start' may be used uninitialized in this function [-Wmaybe-uninitialized]
  for (i = start; i < start + count; i++) {
                            ^
/arch/arm/cpu/armv7/exynos/pinmux.c:663:9: note: 'start' was declared here
  int i, start, count;
         ^
/arch/arm/cpu/armv7/exynos/pinmux.c:689:19: warning: 'bank' may be used uninitialized in this function [-Wmaybe-uninitialized]
   s5p_gpio_cfg_pin(bank, i, GPIO_FUNC(0x2));
                   ^
/arch/arm/cpu/armv7/exynos/pinmux.c:662:24: note: 'bank' was declared here
  struct s5p_gpio_bank *bank;
                        ^
/arch/arm/cpu/armv7/exynos/pinmux.c: In function 'exynos_pinmux_config':
/arch/arm/cpu/armv7/exynos/pinmux.c:687:28: warning: 'count' may be used uninitialized in this function [-Wmaybe-uninitialized]
  for (i = start; i < start + count; i++) {
                            ^
/arch/arm/cpu/armv7/exynos/pinmux.c:663:16: note: 'count' was declared here
  int i, start, count;
                ^
/arch/arm/cpu/armv7/exynos/pinmux.c:687:28: warning: 'start' may be used uninitialized in this function [-Wmaybe-uninitialized]
  for (i = start; i < start + count; i++) {
                            ^
/arch/arm/cpu/armv7/exynos/pinmux.c:663:9: note: 'start' was declared here
  int i, start, count;
         ^
/arch/arm/cpu/armv7/exynos/pinmux.c:689:19: warning: 'bank' may be used uninitialized in this function [-Wmaybe-uninitialized]
   s5p_gpio_cfg_pin(bank, i, GPIO_FUNC(0x2));
                   ^
/arch/arm/cpu/armv7/exynos/pinmux.c:662:24: note: 'bank' was declared here
  struct s5p_gpio_bank *bank;
                        ^

Note that the warning is bogus, the function can never be called with invalid
'peripheral' argument. GCC just cannot analyze this.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
Cc: Akshay Saraswat <akshay.s@samsung.com>
Cc: Rajeshwari S Shinde <rajeshwari.s@samsung.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Minkyu Kang <mk7.kang@samsung.com>
Cc: Tom Rini <trini@ti.com>
---
 arch/arm/cpu/armv7/exynos/pinmux.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/arch/arm/cpu/armv7/exynos/pinmux.c b/arch/arm/cpu/armv7/exynos/pinmux.c
index 645c497..61759a4 100644
--- a/arch/arm/cpu/armv7/exynos/pinmux.c
+++ b/arch/arm/cpu/armv7/exynos/pinmux.c
@@ -39,6 +39,9 @@ static void exynos5_uart_config(int peripheral)
 		start = 4;
 		count = 2;
 		break;
+	default:
+		debug("%s: invalid peripheral %d", __func__, peripheral);
+		return;
 	}
 	for (i = start; i < start + count; i++) {
 		s5p_gpio_set_pull(bank, i, GPIO_PULL_NONE);
@@ -74,6 +77,9 @@ static void exynos5420_uart_config(int peripheral)
 		start = 4;
 		count = 2;
 		break;
+	default:
+		debug("%s: invalid peripheral %d", __func__, peripheral);
+		return;
 	}
 
 	for (i = start; i < start + count; i++) {
@@ -110,6 +116,9 @@ static int exynos5_mmc_config(int peripheral, int flags)
 		bank = &gpio1->c4;
 		bank_ext = NULL;
 		break;
+	default:
+		debug("%s: invalid peripheral %d", __func__, peripheral);
+		return -1;
 	}
 	if ((flags & PINMUX_FLAG_8BIT_MODE) && !bank_ext) {
 		debug("SDMMC device %d does not support 8bit mode",
@@ -683,6 +692,9 @@ static void exynos4_uart_config(int peripheral)
 		start = 4;
 		count = 2;
 		break;
+	default:
+		debug("%s: invalid peripheral %d", __func__, peripheral);
+		return;
 	}
 	for (i = start; i < start + count; i++) {
 		s5p_gpio_set_pull(bank, i, GPIO_PULL_NONE);
-- 
1.8.5.2

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [U-Boot] [PATCH] arm: exynos: Squash bogus warnings in pinmux
  2014-03-10 19:04 [U-Boot] [PATCH] arm: exynos: Squash bogus warnings in pinmux Marek Vasut
@ 2014-03-10 19:26 ` Simon Glass
  2014-03-11  7:38   ` Rajeshwari Birje
  2014-03-12  7:51   ` Lukasz Majewski
  0 siblings, 2 replies; 9+ messages in thread
From: Simon Glass @ 2014-03-10 19:26 UTC (permalink / raw)
  To: u-boot

Hi Marek,

On 10 March 2014 13:04, Marek Vasut <marex@denx.de> wrote:
> Squash these warnings in pinmux.c found with GCC 4.8:
>
> /arch/arm/cpu/armv7/exynos/pinmux.c: In function 'exynos_pinmux_config':
> /arch/arm/cpu/armv7/exynos/pinmux.c:687:28: warning: 'count' may be used uninitialized in this function [-Wmaybe-uninitialized]
>   for (i = start; i < start + count; i++) {
>                             ^
> /arch/arm/cpu/armv7/exynos/pinmux.c:663:16: note: 'count' was declared here
>   int i, start, count;
>                 ^
> /arch/arm/cpu/armv7/exynos/pinmux.c:687:28: warning: 'start' may be used uninitialized in this function [-Wmaybe-uninitialized]
>   for (i = start; i < start + count; i++) {
>                             ^
> /arch/arm/cpu/armv7/exynos/pinmux.c:663:9: note: 'start' was declared here
>   int i, start, count;
>          ^
> /arch/arm/cpu/armv7/exynos/pinmux.c:689:19: warning: 'bank' may be used uninitialized in this function [-Wmaybe-uninitialized]
>    s5p_gpio_cfg_pin(bank, i, GPIO_FUNC(0x2));
>                    ^
> /arch/arm/cpu/armv7/exynos/pinmux.c:662:24: note: 'bank' was declared here
>   struct s5p_gpio_bank *bank;
>                         ^
> /arch/arm/cpu/armv7/exynos/pinmux.c: In function 'exynos_pinmux_config':
> /arch/arm/cpu/armv7/exynos/pinmux.c:687:28: warning: 'count' may be used uninitialized in this function [-Wmaybe-uninitialized]
>   for (i = start; i < start + count; i++) {
>                             ^
> /arch/arm/cpu/armv7/exynos/pinmux.c:663:16: note: 'count' was declared here
>   int i, start, count;
>                 ^
> /arch/arm/cpu/armv7/exynos/pinmux.c:687:28: warning: 'start' may be used uninitialized in this function [-Wmaybe-uninitialized]
>   for (i = start; i < start + count; i++) {
>                             ^
> /arch/arm/cpu/armv7/exynos/pinmux.c:663:9: note: 'start' was declared here
>   int i, start, count;
>          ^
> /arch/arm/cpu/armv7/exynos/pinmux.c:689:19: warning: 'bank' may be used uninitialized in this function [-Wmaybe-uninitialized]
>    s5p_gpio_cfg_pin(bank, i, GPIO_FUNC(0x2));
>                    ^
> /arch/arm/cpu/armv7/exynos/pinmux.c:662:24: note: 'bank' was declared here
>   struct s5p_gpio_bank *bank;
>                         ^
>
> Note that the warning is bogus, the function can never be called with invalid
> 'peripheral' argument. GCC just cannot analyze this.
>
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
> Cc: Akshay Saraswat <akshay.s@samsung.com>
> Cc: Rajeshwari S Shinde <rajeshwari.s@samsung.com>
> Cc: Simon Glass <sjg@chromium.org>
> Cc: Minkyu Kang <mk7.kang@samsung.com>
> Cc: Tom Rini <trini@ti.com>

Acked-by: Simon Glass <sjg@chromium.org>

Thanks Marek, great to get that annoyance fixed.

Regards,
Simon

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] [PATCH] arm: exynos: Squash bogus warnings in pinmux
  2014-03-10 19:26 ` Simon Glass
@ 2014-03-11  7:38   ` Rajeshwari Birje
  2014-03-12  7:51   ` Lukasz Majewski
  1 sibling, 0 replies; 9+ messages in thread
From: Rajeshwari Birje @ 2014-03-11  7:38 UTC (permalink / raw)
  To: u-boot

Hi

Acked-by: Rajeshwari S Shinde <rajeshwari.s@samsung.com>

Regards,
Rajeshwari

On Tue, Mar 11, 2014 at 12:56 AM, Simon Glass <sjg@chromium.org> wrote:
> Hi Marek,
>
> On 10 March 2014 13:04, Marek Vasut <marex@denx.de> wrote:
>> Squash these warnings in pinmux.c found with GCC 4.8:
>>
>> /arch/arm/cpu/armv7/exynos/pinmux.c: In function 'exynos_pinmux_config':
>> /arch/arm/cpu/armv7/exynos/pinmux.c:687:28: warning: 'count' may be used uninitialized in this function [-Wmaybe-uninitialized]
>>   for (i = start; i < start + count; i++) {
>>                             ^
>> /arch/arm/cpu/armv7/exynos/pinmux.c:663:16: note: 'count' was declared here
>>   int i, start, count;
>>                 ^
>> /arch/arm/cpu/armv7/exynos/pinmux.c:687:28: warning: 'start' may be used uninitialized in this function [-Wmaybe-uninitialized]
>>   for (i = start; i < start + count; i++) {
>>                             ^
>> /arch/arm/cpu/armv7/exynos/pinmux.c:663:9: note: 'start' was declared here
>>   int i, start, count;
>>          ^
>> /arch/arm/cpu/armv7/exynos/pinmux.c:689:19: warning: 'bank' may be used uninitialized in this function [-Wmaybe-uninitialized]
>>    s5p_gpio_cfg_pin(bank, i, GPIO_FUNC(0x2));
>>                    ^
>> /arch/arm/cpu/armv7/exynos/pinmux.c:662:24: note: 'bank' was declared here
>>   struct s5p_gpio_bank *bank;
>>                         ^
>> /arch/arm/cpu/armv7/exynos/pinmux.c: In function 'exynos_pinmux_config':
>> /arch/arm/cpu/armv7/exynos/pinmux.c:687:28: warning: 'count' may be used uninitialized in this function [-Wmaybe-uninitialized]
>>   for (i = start; i < start + count; i++) {
>>                             ^
>> /arch/arm/cpu/armv7/exynos/pinmux.c:663:16: note: 'count' was declared here
>>   int i, start, count;
>>                 ^
>> /arch/arm/cpu/armv7/exynos/pinmux.c:687:28: warning: 'start' may be used uninitialized in this function [-Wmaybe-uninitialized]
>>   for (i = start; i < start + count; i++) {
>>                             ^
>> /arch/arm/cpu/armv7/exynos/pinmux.c:663:9: note: 'start' was declared here
>>   int i, start, count;
>>          ^
>> /arch/arm/cpu/armv7/exynos/pinmux.c:689:19: warning: 'bank' may be used uninitialized in this function [-Wmaybe-uninitialized]
>>    s5p_gpio_cfg_pin(bank, i, GPIO_FUNC(0x2));
>>                    ^
>> /arch/arm/cpu/armv7/exynos/pinmux.c:662:24: note: 'bank' was declared here
>>   struct s5p_gpio_bank *bank;
>>                         ^
>>
>> Note that the warning is bogus, the function can never be called with invalid
>> 'peripheral' argument. GCC just cannot analyze this.
>>
>> Signed-off-by: Marek Vasut <marex@denx.de>
>> Cc: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
>> Cc: Akshay Saraswat <akshay.s@samsung.com>
>> Cc: Rajeshwari S Shinde <rajeshwari.s@samsung.com>
>> Cc: Simon Glass <sjg@chromium.org>
>> Cc: Minkyu Kang <mk7.kang@samsung.com>
>> Cc: Tom Rini <trini@ti.com>
>
> Acked-by: Simon Glass <sjg@chromium.org>
>
> Thanks Marek, great to get that annoyance fixed.
>
> Regards,
> Simon
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot



-- 
Regards,
Rajeshwari Shinde

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] [PATCH] arm: exynos: Squash bogus warnings in pinmux
  2014-03-10 19:26 ` Simon Glass
  2014-03-11  7:38   ` Rajeshwari Birje
@ 2014-03-12  7:51   ` Lukasz Majewski
  2014-03-12 10:48     ` Marek Vasut
  1 sibling, 1 reply; 9+ messages in thread
From: Lukasz Majewski @ 2014-03-12  7:51 UTC (permalink / raw)
  To: u-boot

Hi Simon, Marek,

> Hi Marek,
> 
> On 10 March 2014 13:04, Marek Vasut <marex@denx.de> wrote:
> > Squash these warnings in pinmux.c found with GCC 4.8:
> >
> > /arch/arm/cpu/armv7/exynos/pinmux.c: In function
> > 'exynos_pinmux_config': /arch/arm/cpu/armv7/exynos/pinmux.c:687:28:
> > warning: 'count' may be used uninitialized in this function
> > [-Wmaybe-uninitialized] for (i = start; i < start + count; i++) { ^
> > /arch/arm/cpu/armv7/exynos/pinmux.c:663:16: note: 'count' was
> > declared here int i, start, count;
> >                 ^
> > /arch/arm/cpu/armv7/exynos/pinmux.c:687:28: warning: 'start' may be
> > used uninitialized in this function [-Wmaybe-uninitialized] for (i
> > = start; i < start + count; i++) { ^
> > /arch/arm/cpu/armv7/exynos/pinmux.c:663:9: note: 'start' was
> > declared here int i, start, count;
> >          ^
> > /arch/arm/cpu/armv7/exynos/pinmux.c:689:19: warning: 'bank' may be
> > used uninitialized in this function [-Wmaybe-uninitialized]
> > s5p_gpio_cfg_pin(bank, i, GPIO_FUNC(0x2)); ^
> > /arch/arm/cpu/armv7/exynos/pinmux.c:662:24: note: 'bank' was
> > declared here struct s5p_gpio_bank *bank;
> >                         ^
> > /arch/arm/cpu/armv7/exynos/pinmux.c: In function
> > 'exynos_pinmux_config': /arch/arm/cpu/armv7/exynos/pinmux.c:687:28:
> > warning: 'count' may be used uninitialized in this function
> > [-Wmaybe-uninitialized] for (i = start; i < start + count; i++) { ^
> > /arch/arm/cpu/armv7/exynos/pinmux.c:663:16: note: 'count' was
> > declared here int i, start, count;
> >                 ^
> > /arch/arm/cpu/armv7/exynos/pinmux.c:687:28: warning: 'start' may be
> > used uninitialized in this function [-Wmaybe-uninitialized] for (i
> > = start; i < start + count; i++) { ^
> > /arch/arm/cpu/armv7/exynos/pinmux.c:663:9: note: 'start' was
> > declared here int i, start, count;
> >          ^
> > /arch/arm/cpu/armv7/exynos/pinmux.c:689:19: warning: 'bank' may be
> > used uninitialized in this function [-Wmaybe-uninitialized]
> > s5p_gpio_cfg_pin(bank, i, GPIO_FUNC(0x2)); ^
> > /arch/arm/cpu/armv7/exynos/pinmux.c:662:24: note: 'bank' was
> > declared here struct s5p_gpio_bank *bank;
> >                         ^
> >
> > Note that the warning is bogus, the function can never be called
> > with invalid 'peripheral' argument. GCC just cannot analyze this.
> >
> > Signed-off-by: Marek Vasut <marex@denx.de>
> > Cc: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
> > Cc: Akshay Saraswat <akshay.s@samsung.com>
> > Cc: Rajeshwari S Shinde <rajeshwari.s@samsung.com>
> > Cc: Simon Glass <sjg@chromium.org>
> > Cc: Minkyu Kang <mk7.kang@samsung.com>
> > Cc: Tom Rini <trini@ti.com>
> 
> Acked-by: Simon Glass <sjg@chromium.org>
> 
> Thanks Marek, great to get that annoyance fixed.

Fix for this issue has been already posted :-) (one week ago)

http://patchwork.ozlabs.org/patch/327065/

But I don't mind if Marek's patch will be applied directly by Tom
before v2014.04 is released :-)

> 
> Regards,
> Simon



-- 
Best regards,

Lukasz Majewski

Samsung R&D Institute Poland (SRPOL) | Linux Platform Group

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] [PATCH] arm: exynos: Squash bogus warnings in pinmux
  2014-03-12  7:51   ` Lukasz Majewski
@ 2014-03-12 10:48     ` Marek Vasut
  2014-03-12 12:21       ` Lukasz Majewski
  0 siblings, 1 reply; 9+ messages in thread
From: Marek Vasut @ 2014-03-12 10:48 UTC (permalink / raw)
  To: u-boot

On Wednesday, March 12, 2014 at 08:51:56 AM, Lukasz Majewski wrote:
> Hi Simon, Marek,
> 
> > Hi Marek,
> > 
> > On 10 March 2014 13:04, Marek Vasut <marex@denx.de> wrote:
> > > Squash these warnings in pinmux.c found with GCC 4.8:
> > > 
> > > /arch/arm/cpu/armv7/exynos/pinmux.c: In function
> > > 'exynos_pinmux_config': /arch/arm/cpu/armv7/exynos/pinmux.c:687:28:
> > > warning: 'count' may be used uninitialized in this function
> > > [-Wmaybe-uninitialized] for (i = start; i < start + count; i++) { ^
> > > /arch/arm/cpu/armv7/exynos/pinmux.c:663:16: note: 'count' was
> > > declared here int i, start, count;
> > > 
> > >                 ^
> > > 
> > > /arch/arm/cpu/armv7/exynos/pinmux.c:687:28: warning: 'start' may be
> > > used uninitialized in this function [-Wmaybe-uninitialized] for (i
> > > = start; i < start + count; i++) { ^
> > > /arch/arm/cpu/armv7/exynos/pinmux.c:663:9: note: 'start' was
> > > declared here int i, start, count;
> > > 
> > >          ^
> > > 
> > > /arch/arm/cpu/armv7/exynos/pinmux.c:689:19: warning: 'bank' may be
> > > used uninitialized in this function [-Wmaybe-uninitialized]
> > > s5p_gpio_cfg_pin(bank, i, GPIO_FUNC(0x2)); ^
> > > /arch/arm/cpu/armv7/exynos/pinmux.c:662:24: note: 'bank' was
> > > declared here struct s5p_gpio_bank *bank;
> > > 
> > >                         ^
> > > 
> > > /arch/arm/cpu/armv7/exynos/pinmux.c: In function
> > > 'exynos_pinmux_config': /arch/arm/cpu/armv7/exynos/pinmux.c:687:28:
> > > warning: 'count' may be used uninitialized in this function
> > > [-Wmaybe-uninitialized] for (i = start; i < start + count; i++) { ^
> > > /arch/arm/cpu/armv7/exynos/pinmux.c:663:16: note: 'count' was
> > > declared here int i, start, count;
> > > 
> > >                 ^
> > > 
> > > /arch/arm/cpu/armv7/exynos/pinmux.c:687:28: warning: 'start' may be
> > > used uninitialized in this function [-Wmaybe-uninitialized] for (i
> > > = start; i < start + count; i++) { ^
> > > /arch/arm/cpu/armv7/exynos/pinmux.c:663:9: note: 'start' was
> > > declared here int i, start, count;
> > > 
> > >          ^
> > > 
> > > /arch/arm/cpu/armv7/exynos/pinmux.c:689:19: warning: 'bank' may be
> > > used uninitialized in this function [-Wmaybe-uninitialized]
> > > s5p_gpio_cfg_pin(bank, i, GPIO_FUNC(0x2)); ^
> > > /arch/arm/cpu/armv7/exynos/pinmux.c:662:24: note: 'bank' was
> > > declared here struct s5p_gpio_bank *bank;
> > > 
> > >                         ^
> > > 
> > > Note that the warning is bogus, the function can never be called
> > > with invalid 'peripheral' argument. GCC just cannot analyze this.
> > > 
> > > Signed-off-by: Marek Vasut <marex@denx.de>
> > > Cc: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
> > > Cc: Akshay Saraswat <akshay.s@samsung.com>
> > > Cc: Rajeshwari S Shinde <rajeshwari.s@samsung.com>
> > > Cc: Simon Glass <sjg@chromium.org>
> > > Cc: Minkyu Kang <mk7.kang@samsung.com>
> > > Cc: Tom Rini <trini@ti.com>
> > 
> > Acked-by: Simon Glass <sjg@chromium.org>
> > 
> > Thanks Marek, great to get that annoyance fixed.
> 
> Fix for this issue has been already posted :-) (one week ago)
> 
> http://patchwork.ozlabs.org/patch/327065/
> 
> But I don't mind if Marek's patch will be applied directly by Tom
> before v2014.04 is released :-)

Aren't you missing the exynos5_mmc_config() in your patch ? Otherwise, I don't 
mind either way and I'd prefer if your patch (which came in earlier) was applied 
of course (unless you are missing the _mmc_config).

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] [PATCH] arm: exynos: Squash bogus warnings in pinmux
  2014-03-12 10:48     ` Marek Vasut
@ 2014-03-12 12:21       ` Lukasz Majewski
  2014-03-12 12:27         ` Marek Vasut
  0 siblings, 1 reply; 9+ messages in thread
From: Lukasz Majewski @ 2014-03-12 12:21 UTC (permalink / raw)
  To: u-boot

Hi Marek,

> On Wednesday, March 12, 2014 at 08:51:56 AM, Lukasz Majewski wrote:
> > Hi Simon, Marek,
> > 
> > > Hi Marek,
> > > 
> > > On 10 March 2014 13:04, Marek Vasut <marex@denx.de> wrote:
> > > > Squash these warnings in pinmux.c found with GCC 4.8:
> > > > 
> > > > /arch/arm/cpu/armv7/exynos/pinmux.c: In function
> > > > 'exynos_pinmux_config': /arch/arm/cpu/armv7/exynos/pinmux.c:687:28:
> > > > warning: 'count' may be used uninitialized in this function
> > > > [-Wmaybe-uninitialized] for (i = start; i < start + count; i++)
> > > > { ^ /arch/arm/cpu/armv7/exynos/pinmux.c:663:16: note: 'count'
> > > > was declared here int i, start, count;
> > > > 
> > > >                 ^
> > > > 
> > > > /arch/arm/cpu/armv7/exynos/pinmux.c:687:28: warning: 'start'
> > > > may be used uninitialized in this function
> > > > [-Wmaybe-uninitialized] for (i = start; i < start + count; i++)
> > > > { ^ /arch/arm/cpu/armv7/exynos/pinmux.c:663:9: note: 'start' was
> > > > declared here int i, start, count;
> > > > 
> > > >          ^
> > > > 
> > > > /arch/arm/cpu/armv7/exynos/pinmux.c:689:19: warning: 'bank' may
> > > > be used uninitialized in this function [-Wmaybe-uninitialized]
> > > > s5p_gpio_cfg_pin(bank, i, GPIO_FUNC(0x2)); ^
> > > > /arch/arm/cpu/armv7/exynos/pinmux.c:662:24: note: 'bank' was
> > > > declared here struct s5p_gpio_bank *bank;
> > > > 
> > > >                         ^
> > > > 
> > > > /arch/arm/cpu/armv7/exynos/pinmux.c: In function
> > > > 'exynos_pinmux_config': /arch/arm/cpu/armv7/exynos/pinmux.c:687:28:
> > > > warning: 'count' may be used uninitialized in this function
> > > > [-Wmaybe-uninitialized] for (i = start; i < start + count; i++)
> > > > { ^ /arch/arm/cpu/armv7/exynos/pinmux.c:663:16: note: 'count'
> > > > was declared here int i, start, count;
> > > > 
> > > >                 ^
> > > > 
> > > > /arch/arm/cpu/armv7/exynos/pinmux.c:687:28: warning: 'start'
> > > > may be used uninitialized in this function
> > > > [-Wmaybe-uninitialized] for (i = start; i < start + count; i++)
> > > > { ^ /arch/arm/cpu/armv7/exynos/pinmux.c:663:9: note: 'start' was
> > > > declared here int i, start, count;
> > > > 
> > > >          ^
> > > > 
> > > > /arch/arm/cpu/armv7/exynos/pinmux.c:689:19: warning: 'bank' may
> > > > be used uninitialized in this function [-Wmaybe-uninitialized]
> > > > s5p_gpio_cfg_pin(bank, i, GPIO_FUNC(0x2)); ^
> > > > /arch/arm/cpu/armv7/exynos/pinmux.c:662:24: note: 'bank' was
> > > > declared here struct s5p_gpio_bank *bank;
> > > > 
> > > >                         ^
> > > > 
> > > > Note that the warning is bogus, the function can never be called
> > > > with invalid 'peripheral' argument. GCC just cannot analyze
> > > > this.
> > > > 
> > > > Signed-off-by: Marek Vasut <marex@denx.de>
> > > > Cc: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
> > > > Cc: Akshay Saraswat <akshay.s@samsung.com>
> > > > Cc: Rajeshwari S Shinde <rajeshwari.s@samsung.com>
> > > > Cc: Simon Glass <sjg@chromium.org>
> > > > Cc: Minkyu Kang <mk7.kang@samsung.com>
> > > > Cc: Tom Rini <trini@ti.com>
> > > 
> > > Acked-by: Simon Glass <sjg@chromium.org>
> > > 
> > > Thanks Marek, great to get that annoyance fixed.
> > 
> > Fix for this issue has been already posted :-) (one week ago)
> > 
> > http://patchwork.ozlabs.org/patch/327065/
> > 
> > But I don't mind if Marek's patch will be applied directly by Tom
> > before v2014.04 is released :-)
> 
> Aren't you missing the exynos5_mmc_config() in your patch ?

Yes, my work miss it. Lets apply your patch and be happy with "clean"
build results from gcc 4.8 :-).

> Otherwise, I don't mind either way and I'd prefer if your patch
> (which came in earlier) was applied of course (unless you are missing
> the _mmc_config).



-- 
Best regards,

Lukasz Majewski

Samsung R&D Institute Poland (SRPOL) | Linux Platform Group

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] [PATCH] arm: exynos: Squash bogus warnings in pinmux
  2014-03-12 12:21       ` Lukasz Majewski
@ 2014-03-12 12:27         ` Marek Vasut
  2014-03-13  1:01           ` Minkyu Kang
  0 siblings, 1 reply; 9+ messages in thread
From: Marek Vasut @ 2014-03-12 12:27 UTC (permalink / raw)
  To: u-boot

On Wednesday, March 12, 2014 at 01:21:15 PM, Lukasz Majewski wrote:
> Hi Marek,
> 
> > On Wednesday, March 12, 2014 at 08:51:56 AM, Lukasz Majewski wrote:
> > > Hi Simon, Marek,
> > > 
> > > > Hi Marek,
> > > > 
> > > > On 10 March 2014 13:04, Marek Vasut <marex@denx.de> wrote:
> > > > > Squash these warnings in pinmux.c found with GCC 4.8:
> > > > > 
> > > > > /arch/arm/cpu/armv7/exynos/pinmux.c: In function
> > > > > 'exynos_pinmux_config': /arch/arm/cpu/armv7/exynos/pinmux.c:687:28:
> > > > > warning: 'count' may be used uninitialized in this function
> > > > > [-Wmaybe-uninitialized] for (i = start; i < start + count; i++)
> > > > > { ^ /arch/arm/cpu/armv7/exynos/pinmux.c:663:16: note: 'count'
> > > > > was declared here int i, start, count;
> > > > > 
> > > > >                 ^
> > > > > 
> > > > > /arch/arm/cpu/armv7/exynos/pinmux.c:687:28: warning: 'start'
> > > > > may be used uninitialized in this function
> > > > > [-Wmaybe-uninitialized] for (i = start; i < start + count; i++)
> > > > > { ^ /arch/arm/cpu/armv7/exynos/pinmux.c:663:9: note: 'start' was
> > > > > declared here int i, start, count;
> > > > > 
> > > > >          ^
> > > > > 
> > > > > /arch/arm/cpu/armv7/exynos/pinmux.c:689:19: warning: 'bank' may
> > > > > be used uninitialized in this function [-Wmaybe-uninitialized]
> > > > > s5p_gpio_cfg_pin(bank, i, GPIO_FUNC(0x2)); ^
> > > > > /arch/arm/cpu/armv7/exynos/pinmux.c:662:24: note: 'bank' was
> > > > > declared here struct s5p_gpio_bank *bank;
> > > > > 
> > > > >                         ^
> > > > > 
> > > > > /arch/arm/cpu/armv7/exynos/pinmux.c: In function
> > > > > 'exynos_pinmux_config': /arch/arm/cpu/armv7/exynos/pinmux.c:687:28:
> > > > > warning: 'count' may be used uninitialized in this function
> > > > > [-Wmaybe-uninitialized] for (i = start; i < start + count; i++)
> > > > > { ^ /arch/arm/cpu/armv7/exynos/pinmux.c:663:16: note: 'count'
> > > > > was declared here int i, start, count;
> > > > > 
> > > > >                 ^
> > > > > 
> > > > > /arch/arm/cpu/armv7/exynos/pinmux.c:687:28: warning: 'start'
> > > > > may be used uninitialized in this function
> > > > > [-Wmaybe-uninitialized] for (i = start; i < start + count; i++)
> > > > > { ^ /arch/arm/cpu/armv7/exynos/pinmux.c:663:9: note: 'start' was
> > > > > declared here int i, start, count;
> > > > > 
> > > > >          ^
> > > > > 
> > > > > /arch/arm/cpu/armv7/exynos/pinmux.c:689:19: warning: 'bank' may
> > > > > be used uninitialized in this function [-Wmaybe-uninitialized]
> > > > > s5p_gpio_cfg_pin(bank, i, GPIO_FUNC(0x2)); ^
> > > > > /arch/arm/cpu/armv7/exynos/pinmux.c:662:24: note: 'bank' was
> > > > > declared here struct s5p_gpio_bank *bank;
> > > > > 
> > > > >                         ^
> > > > > 
> > > > > Note that the warning is bogus, the function can never be called
> > > > > with invalid 'peripheral' argument. GCC just cannot analyze
> > > > > this.
> > > > > 
> > > > > Signed-off-by: Marek Vasut <marex@denx.de>
> > > > > Cc: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
> > > > > Cc: Akshay Saraswat <akshay.s@samsung.com>
> > > > > Cc: Rajeshwari S Shinde <rajeshwari.s@samsung.com>
> > > > > Cc: Simon Glass <sjg@chromium.org>
> > > > > Cc: Minkyu Kang <mk7.kang@samsung.com>
> > > > > Cc: Tom Rini <trini@ti.com>
> > > > 
> > > > Acked-by: Simon Glass <sjg@chromium.org>
> > > > 
> > > > Thanks Marek, great to get that annoyance fixed.
> > > 
> > > Fix for this issue has been already posted :-) (one week ago)
> > > 
> > > http://patchwork.ozlabs.org/patch/327065/
> > > 
> > > But I don't mind if Marek's patch will be applied directly by Tom
> > > before v2014.04 is released :-)
> > 
> > Aren't you missing the exynos5_mmc_config() in your patch ?
> 
> Yes, my work miss it. Lets apply your patch and be happy with "clean"
> build results from gcc 4.8 :-).

Roger that.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] [PATCH] arm: exynos: Squash bogus warnings in pinmux
  2014-03-12 12:27         ` Marek Vasut
@ 2014-03-13  1:01           ` Minkyu Kang
  2014-03-13  6:54             ` Lukasz Majewski
  0 siblings, 1 reply; 9+ messages in thread
From: Minkyu Kang @ 2014-03-13  1:01 UTC (permalink / raw)
  To: u-boot

On 12/03/14 21:27, Marek Vasut wrote:
> On Wednesday, March 12, 2014 at 01:21:15 PM, Lukasz Majewski wrote:
>> Hi Marek,
>>
>>> On Wednesday, March 12, 2014 at 08:51:56 AM, Lukasz Majewski wrote:
>>>> Hi Simon, Marek,
>>>>
>>>>> Hi Marek,
>>>>>
>>>>> On 10 March 2014 13:04, Marek Vasut <marex@denx.de> wrote:
>>>>>> Squash these warnings in pinmux.c found with GCC 4.8:
>>>>>>
>>>>>> /arch/arm/cpu/armv7/exynos/pinmux.c: In function
>>>>>> 'exynos_pinmux_config': /arch/arm/cpu/armv7/exynos/pinmux.c:687:28:
>>>>>> warning: 'count' may be used uninitialized in this function
>>>>>> [-Wmaybe-uninitialized] for (i = start; i < start + count; i++)
>>>>>> { ^ /arch/arm/cpu/armv7/exynos/pinmux.c:663:16: note: 'count'
>>>>>> was declared here int i, start, count;
>>>>>>
>>>>>>                 ^
>>>>>>
>>>>>> /arch/arm/cpu/armv7/exynos/pinmux.c:687:28: warning: 'start'
>>>>>> may be used uninitialized in this function
>>>>>> [-Wmaybe-uninitialized] for (i = start; i < start + count; i++)
>>>>>> { ^ /arch/arm/cpu/armv7/exynos/pinmux.c:663:9: note: 'start' was
>>>>>> declared here int i, start, count;
>>>>>>
>>>>>>          ^
>>>>>>
>>>>>> /arch/arm/cpu/armv7/exynos/pinmux.c:689:19: warning: 'bank' may
>>>>>> be used uninitialized in this function [-Wmaybe-uninitialized]
>>>>>> s5p_gpio_cfg_pin(bank, i, GPIO_FUNC(0x2)); ^
>>>>>> /arch/arm/cpu/armv7/exynos/pinmux.c:662:24: note: 'bank' was
>>>>>> declared here struct s5p_gpio_bank *bank;
>>>>>>
>>>>>>                         ^
>>>>>>
>>>>>> /arch/arm/cpu/armv7/exynos/pinmux.c: In function
>>>>>> 'exynos_pinmux_config': /arch/arm/cpu/armv7/exynos/pinmux.c:687:28:
>>>>>> warning: 'count' may be used uninitialized in this function
>>>>>> [-Wmaybe-uninitialized] for (i = start; i < start + count; i++)
>>>>>> { ^ /arch/arm/cpu/armv7/exynos/pinmux.c:663:16: note: 'count'
>>>>>> was declared here int i, start, count;
>>>>>>
>>>>>>                 ^
>>>>>>
>>>>>> /arch/arm/cpu/armv7/exynos/pinmux.c:687:28: warning: 'start'
>>>>>> may be used uninitialized in this function
>>>>>> [-Wmaybe-uninitialized] for (i = start; i < start + count; i++)
>>>>>> { ^ /arch/arm/cpu/armv7/exynos/pinmux.c:663:9: note: 'start' was
>>>>>> declared here int i, start, count;
>>>>>>
>>>>>>          ^
>>>>>>
>>>>>> /arch/arm/cpu/armv7/exynos/pinmux.c:689:19: warning: 'bank' may
>>>>>> be used uninitialized in this function [-Wmaybe-uninitialized]
>>>>>> s5p_gpio_cfg_pin(bank, i, GPIO_FUNC(0x2)); ^
>>>>>> /arch/arm/cpu/armv7/exynos/pinmux.c:662:24: note: 'bank' was
>>>>>> declared here struct s5p_gpio_bank *bank;
>>>>>>
>>>>>>                         ^
>>>>>>
>>>>>> Note that the warning is bogus, the function can never be called
>>>>>> with invalid 'peripheral' argument. GCC just cannot analyze
>>>>>> this.
>>>>>>
>>>>>> Signed-off-by: Marek Vasut <marex@denx.de>
>>>>>> Cc: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
>>>>>> Cc: Akshay Saraswat <akshay.s@samsung.com>
>>>>>> Cc: Rajeshwari S Shinde <rajeshwari.s@samsung.com>
>>>>>> Cc: Simon Glass <sjg@chromium.org>
>>>>>> Cc: Minkyu Kang <mk7.kang@samsung.com>
>>>>>> Cc: Tom Rini <trini@ti.com>
>>>>>
>>>>> Acked-by: Simon Glass <sjg@chromium.org>
>>>>>
>>>>> Thanks Marek, great to get that annoyance fixed.
>>>>
>>>> Fix for this issue has been already posted :-) (one week ago)
>>>>
>>>> http://patchwork.ozlabs.org/patch/327065/
>>>>
>>>> But I don't mind if Marek's patch will be applied directly by Tom
>>>> before v2014.04 is released :-)
>>>
>>> Aren't you missing the exynos5_mmc_config() in your patch ?
>>
>> Yes, my work miss it. Lets apply your patch and be happy with "clean"
>> build results from gcc 4.8 :-).
> 
> Roger that.

applied to u-boot-samsung.

Lukasz,
your patch will abandon because of this patch.

Thanks,
Minkyu Kang.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] [PATCH] arm: exynos: Squash bogus warnings in pinmux
  2014-03-13  1:01           ` Minkyu Kang
@ 2014-03-13  6:54             ` Lukasz Majewski
  0 siblings, 0 replies; 9+ messages in thread
From: Lukasz Majewski @ 2014-03-13  6:54 UTC (permalink / raw)
  To: u-boot

Hi Minkyu,

> On 12/03/14 21:27, Marek Vasut wrote:
> > On Wednesday, March 12, 2014 at 01:21:15 PM, Lukasz Majewski wrote:
> >> Hi Marek,
> >>
> >>> On Wednesday, March 12, 2014 at 08:51:56 AM, Lukasz Majewski
> >>> wrote:
> >>>> Hi Simon, Marek,
> >>>>
> >>>>> Hi Marek,
> >>>>>
> >>>>> On 10 March 2014 13:04, Marek Vasut <marex@denx.de> wrote:
> >>>>>> Squash these warnings in pinmux.c found with GCC 4.8:
> >>>>>>
> >>>>>> /arch/arm/cpu/armv7/exynos/pinmux.c: In function
> >>>>>> 'exynos_pinmux_config': /arch/arm/cpu/armv7/exynos/pinmux.c:687:28:
> >>>>>> warning: 'count' may be used uninitialized in this function
> >>>>>> [-Wmaybe-uninitialized] for (i = start; i < start + count; i++)
> >>>>>> { ^ /arch/arm/cpu/armv7/exynos/pinmux.c:663:16: note: 'count'
> >>>>>> was declared here int i, start, count;
> >>>>>>
> >>>>>>                 ^
> >>>>>>
> >>>>>> /arch/arm/cpu/armv7/exynos/pinmux.c:687:28: warning: 'start'
> >>>>>> may be used uninitialized in this function
> >>>>>> [-Wmaybe-uninitialized] for (i = start; i < start + count; i++)
> >>>>>> { ^ /arch/arm/cpu/armv7/exynos/pinmux.c:663:9: note: 'start'
> >>>>>> was declared here int i, start, count;
> >>>>>>
> >>>>>>          ^
> >>>>>>
> >>>>>> /arch/arm/cpu/armv7/exynos/pinmux.c:689:19: warning: 'bank' may
> >>>>>> be used uninitialized in this function [-Wmaybe-uninitialized]
> >>>>>> s5p_gpio_cfg_pin(bank, i, GPIO_FUNC(0x2)); ^
> >>>>>> /arch/arm/cpu/armv7/exynos/pinmux.c:662:24: note: 'bank' was
> >>>>>> declared here struct s5p_gpio_bank *bank;
> >>>>>>
> >>>>>>                         ^
> >>>>>>
> >>>>>> /arch/arm/cpu/armv7/exynos/pinmux.c: In function
> >>>>>> 'exynos_pinmux_config': /arch/arm/cpu/armv7/exynos/pinmux.c:687:28:
> >>>>>> warning: 'count' may be used uninitialized in this function
> >>>>>> [-Wmaybe-uninitialized] for (i = start; i < start + count; i++)
> >>>>>> { ^ /arch/arm/cpu/armv7/exynos/pinmux.c:663:16: note: 'count'
> >>>>>> was declared here int i, start, count;
> >>>>>>
> >>>>>>                 ^
> >>>>>>
> >>>>>> /arch/arm/cpu/armv7/exynos/pinmux.c:687:28: warning: 'start'
> >>>>>> may be used uninitialized in this function
> >>>>>> [-Wmaybe-uninitialized] for (i = start; i < start + count; i++)
> >>>>>> { ^ /arch/arm/cpu/armv7/exynos/pinmux.c:663:9: note: 'start'
> >>>>>> was declared here int i, start, count;
> >>>>>>
> >>>>>>          ^
> >>>>>>
> >>>>>> /arch/arm/cpu/armv7/exynos/pinmux.c:689:19: warning: 'bank' may
> >>>>>> be used uninitialized in this function [-Wmaybe-uninitialized]
> >>>>>> s5p_gpio_cfg_pin(bank, i, GPIO_FUNC(0x2)); ^
> >>>>>> /arch/arm/cpu/armv7/exynos/pinmux.c:662:24: note: 'bank' was
> >>>>>> declared here struct s5p_gpio_bank *bank;
> >>>>>>
> >>>>>>                         ^
> >>>>>>
> >>>>>> Note that the warning is bogus, the function can never be
> >>>>>> called with invalid 'peripheral' argument. GCC just cannot
> >>>>>> analyze this.
> >>>>>>
> >>>>>> Signed-off-by: Marek Vasut <marex@denx.de>
> >>>>>> Cc: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
> >>>>>> Cc: Akshay Saraswat <akshay.s@samsung.com>
> >>>>>> Cc: Rajeshwari S Shinde <rajeshwari.s@samsung.com>
> >>>>>> Cc: Simon Glass <sjg@chromium.org>
> >>>>>> Cc: Minkyu Kang <mk7.kang@samsung.com>
> >>>>>> Cc: Tom Rini <trini@ti.com>
> >>>>>
> >>>>> Acked-by: Simon Glass <sjg@chromium.org>
> >>>>>
> >>>>> Thanks Marek, great to get that annoyance fixed.
> >>>>
> >>>> Fix for this issue has been already posted :-) (one week ago)
> >>>>
> >>>> http://patchwork.ozlabs.org/patch/327065/
> >>>>
> >>>> But I don't mind if Marek's patch will be applied directly by Tom
> >>>> before v2014.04 is released :-)
> >>>
> >>> Aren't you missing the exynos5_mmc_config() in your patch ?
> >>
> >> Yes, my work miss it. Lets apply your patch and be happy with
> >> "clean" build results from gcc 4.8 :-).
> > 
> > Roger that.
> 
> applied to u-boot-samsung.
> 
> Lukasz,
> your patch will abandon because of this patch.

OK, no problem for me :-)

> 
> Thanks,
> Minkyu Kang.
> 



-- 
Best regards,

Lukasz Majewski

Samsung R&D Institute Poland (SRPOL) | Linux Platform Group

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2014-03-13  6:54 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-10 19:04 [U-Boot] [PATCH] arm: exynos: Squash bogus warnings in pinmux Marek Vasut
2014-03-10 19:26 ` Simon Glass
2014-03-11  7:38   ` Rajeshwari Birje
2014-03-12  7:51   ` Lukasz Majewski
2014-03-12 10:48     ` Marek Vasut
2014-03-12 12:21       ` Lukasz Majewski
2014-03-12 12:27         ` Marek Vasut
2014-03-13  1:01           ` Minkyu Kang
2014-03-13  6:54             ` Lukasz Majewski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox