From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] arm: exynos: Squash bogus warnings in pinmux
Date: Wed, 12 Mar 2014 13:27:08 +0100 [thread overview]
Message-ID: <201403121327.08167.marex@denx.de> (raw)
In-Reply-To: <20140312132115.181ee763@amdc2363>
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.
next prev parent reply other threads:[~2014-03-12 12:27 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2014-03-13 1:01 ` Minkyu Kang
2014-03-13 6:54 ` Lukasz Majewski
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=201403121327.08167.marex@denx.de \
--to=marex@denx.de \
--cc=u-boot@lists.denx.de \
/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.