Skip to contentSkip to conversation

arm: exynos: Squash bogus warnings in pinmux

PATCH New Marek Vasut 5 participants 9 messages Mar 10, 2014 – Mar 13, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm: exynos: Squash bogus warnings in pinmux

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.

Cc Naveen Krishna Chatradhi <[email protected]>
Cc Akshay Saraswat <[email protected]>
Cc Rajeshwari S Shinde <[email protected]>
Cc Simon Glass <[email protected]>
Cc Minkyu Kang <[email protected]>
Cc Tom Rini <[email protected]>
---
 arch/arm/cpu/armv7/exynos/pinmux.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)
arch/arm/cpu/armv7/exynos/pinmux.c +12 -0
index 645c497..61759a4 100644
@@ -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);
Signature · 1 line
1.8.5.2
#1 lore raw

PATCH 1/1 arm: exynos: Squash bogus warnings in pinmux

Hi Marek,

Quoted 44 lines · Marek Vasut

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.

Quoted 7 lines
Cc Naveen Krishna Chatradhi <[email protected]>
Cc Akshay Saraswat <[email protected]>
Cc Rajeshwari S Shinde <[email protected]>
Cc Simon Glass <[email protected]>
Cc Minkyu Kang <[email protected]>
Cc Tom Rini <[email protected]>

Thanks Marek, great to get that annoyance fixed.

Regards,
Simon

#2 lore raw

PATCH 1/1 arm: exynos: Squash bogus warnings in pinmux

Hi

Regards,
Rajeshwari

Quoted 65 lines · Simon Glass

Hi Marek,

Quoted 44 lines · Marek Vasut

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.

Quoted 7 lines
Cc Naveen Krishna Chatradhi <[email protected]>
Cc Akshay Saraswat <[email protected]>
Cc Rajeshwari S Shinde <[email protected]>
Cc Simon Glass <[email protected]>
Cc Minkyu Kang <[email protected]>
Cc Tom Rini <[email protected]>

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

Signature · 2 lines
Regards,
Rajeshwari Shinde
#3 lore raw

PATCH 1/1 arm: exynos: Squash bogus warnings in pinmux

In reply to Simon Glass

Hi Simon, Marek,

Quoted 55 lines

Hi Marek,

Quoted 44 lines · Marek Vasut

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.

Quoted 7 lines
Cc Naveen Krishna Chatradhi <[email protected]>
Cc Akshay Saraswat <[email protected]>
Cc Rajeshwari S Shinde <[email protected]>
Cc Simon Glass <[email protected]>
Cc Minkyu Kang <[email protected]>
Cc Tom Rini <[email protected]>
Quoted 3 lines

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 :-)

Quoted 3 lines

Regards,
Simon

Signature · 5 lines
Best regards,

Lukasz Majewski

Samsung R&D Institute Poland (SRPOL) | Linux Platform Group
#4 lore raw

PATCH 1/1 arm: exynos: Squash bogus warnings in pinmux

Quoted 70 lines · Lukasz Majewski

Hi Simon, Marek,

Quoted 68 lines

Hi Marek,

Quoted 55 lines · Marek Vasut

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.

Quoted 7 lines
Cc Naveen Krishna Chatradhi <[email protected]>
Cc Akshay Saraswat <[email protected]>
Cc Rajeshwari S Shinde <[email protected]>
Cc Simon Glass <[email protected]>
Cc Minkyu Kang <[email protected]>
Cc Tom Rini <[email protected]>
Quoted 8 lines
Quoted 1 line

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).

#5 lore raw

PATCH 1/1 arm: exynos: Squash bogus warnings in pinmux

Hi Marek,

Quoted 74 lines · Lukasz Majewski
Quoted 73 lines

Hi Simon, Marek,

Quoted 70 lines

Hi Marek,

Quoted 56 lines · Marek Vasut

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.

Quoted 7 lines
Cc Naveen Krishna Chatradhi <[email protected]>
Cc Akshay Saraswat <[email protected]>
Cc Rajeshwari S Shinde <[email protected]>
Cc Simon Glass <[email protected]>
Cc Minkyu Kang <[email protected]>
Cc Tom Rini <[email protected]>

Thanks Marek, great to get that annoyance fixed.

Quoted 8 lines
Quoted 6 lines

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 :-).

Quoted 3 lines

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).

Signature · 5 lines
Best regards,

Lukasz Majewski

Samsung R&D Institute Poland (SRPOL) | Linux Platform Group
#6 lore raw

PATCH 1/1 arm: exynos: Squash bogus warnings in pinmux

Quoted 80 lines · Lukasz Majewski

Hi Marek,

Quoted 78 lines · Lukasz Majewski
Quoted 77 lines

Hi Simon, Marek,

Quoted 67 lines

Hi Marek,

Quoted 56 lines · Marek Vasut

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.

Quoted 7 lines
Cc Naveen Krishna Chatradhi <[email protected]>
Cc Akshay Saraswat <[email protected]>
Cc Rajeshwari S Shinde <[email protected]>
Cc Simon Glass <[email protected]>
Cc Minkyu Kang <[email protected]>
Cc Tom Rini <[email protected]>
Quoted 3 lines

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/

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

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.

#7 lore raw

PATCH 1/1 arm: exynos: Squash bogus warnings in pinmux

Quoted 84 lines · Marek Vasut
Quoted 83 lines · Lukasz Majewski

Hi Marek,

Quoted 81 lines · Lukasz Majewski
Quoted 79 lines

Hi Simon, Marek,

Quoted 67 lines

Hi Marek,

Quoted 56 lines · Marek Vasut

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.

Quoted 7 lines
Cc Naveen Krishna Chatradhi <[email protected]>
Cc Akshay Saraswat <[email protected]>
Cc Rajeshwari S Shinde <[email protected]>
Cc Simon Glass <[email protected]>
Cc Minkyu Kang <[email protected]>
Cc Tom Rini <[email protected]>
Quoted 3 lines

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 :-)

Quoted 6 lines
Quoted 4 lines
Quoted 1 line

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.

#8 lore raw

PATCH 1/1 arm: exynos: Squash bogus warnings in pinmux

Hi Minkyu,

Quoted 91 lines · Marek Vasut
Quoted 90 lines · Lukasz Majewski
Quoted 88 lines

Hi Marek,

Quoted 75 lines
Quoted 73 lines · Lukasz Majewski

Hi Simon, Marek,

Quoted 70 lines

Hi Marek,

Quoted 56 lines · Marek Vasut

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.

Quoted 7 lines
Cc Naveen Krishna Chatradhi <[email protected]>
Cc Akshay Saraswat <[email protected]>
Cc Rajeshwari S Shinde <[email protected]>
Cc Simon Glass <[email protected]>
Cc Minkyu Kang <[email protected]>
Cc Tom Rini <[email protected]>

Thanks Marek, great to get that annoyance fixed.

Quoted 8 lines
Quoted 6 lines

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 :-).

Quoted 6 lines
Quoted 1 line

Roger that.

applied to u-boot-samsung.

Lukasz,
your patch will abandon because of this patch.

OK, no problem for me :-)

Quoted 4 lines

Thanks,
Minkyu Kang.

Signature · 5 lines
Best regards,

Lukasz Majewski

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