From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lukasz Majewski Date: Thu, 13 Mar 2014 07:54:04 +0100 Subject: [U-Boot] [PATCH] arm: exynos: Squash bogus warnings in pinmux In-Reply-To: <53210380.8010406@samsung.com> References: <1394478271-9837-1-git-send-email-marex@denx.de> <201403121148.37761.marex@denx.de> <20140312132115.181ee763@amdc2363> <201403121327.08167.marex@denx.de> <53210380.8010406@samsung.com> Message-ID: <20140313075404.29e99e35@amdc2363> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 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 > >>>>>> Cc: Naveen Krishna Chatradhi > >>>>>> Cc: Akshay Saraswat > >>>>>> Cc: Rajeshwari S Shinde > >>>>>> Cc: Simon Glass > >>>>>> Cc: Minkyu Kang > >>>>>> Cc: Tom Rini > >>>>> > >>>>> Acked-by: Simon Glass > >>>>> > >>>>> 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