* [PATCH] clk: bcm: Fix 'maybe-uninitialized' warning in bcm2835_clock_choose_div_and_prate()
@ 2016-12-12 8:00 ` Boris Brezillon
0 siblings, 0 replies; 16+ messages in thread
From: Boris Brezillon @ 2016-12-12 8:00 UTC (permalink / raw)
To: Mike Turquette, Stephen Boyd, linux-clk
Cc: Florian Fainelli, Ray Jui, Scott Branden,
bcm-kernel-feedback-list, Stephen Warren, Lee Jones, Eric Anholt,
linux-rpi-kernel, Stephen Rothwell, linux-arm-kernel,
Boris Brezillon
best_rate is reported as potentially uninitialized by gcc.
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Fixes: 155e8b3b0ee3 ("clk: bcm: Support rate change propagation on bcm2835 clocks")
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
drivers/clk/bcm/clk-bcm2835.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c
index eaf82f49dede..0d14409097e7 100644
--- a/drivers/clk/bcm/clk-bcm2835.c
+++ b/drivers/clk/bcm/clk-bcm2835.c
@@ -1029,7 +1029,7 @@ static unsigned long bcm2835_clock_choose_div_and_prate(struct clk_hw *hw,
struct bcm2835_clock *clock = bcm2835_clock_from_hw(hw);
struct bcm2835_cprman *cprman = clock->cprman;
const struct bcm2835_clock_data *data = clock->data;
- unsigned long best_rate;
+ unsigned long best_rate = 0;
u32 curdiv, mindiv, maxdiv;
struct clk_hw *parent;
--
2.7.4
^ permalink raw reply related [flat|nested] 16+ messages in thread* [PATCH] clk: bcm: Fix 'maybe-uninitialized' warning in bcm2835_clock_choose_div_and_prate()
@ 2016-12-12 8:00 ` Boris Brezillon
0 siblings, 0 replies; 16+ messages in thread
From: Boris Brezillon @ 2016-12-12 8:00 UTC (permalink / raw)
To: linux-arm-kernel
best_rate is reported as potentially uninitialized by gcc.
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Fixes: 155e8b3b0ee3 ("clk: bcm: Support rate change propagation on bcm2835 clocks")
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
drivers/clk/bcm/clk-bcm2835.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c
index eaf82f49dede..0d14409097e7 100644
--- a/drivers/clk/bcm/clk-bcm2835.c
+++ b/drivers/clk/bcm/clk-bcm2835.c
@@ -1029,7 +1029,7 @@ static unsigned long bcm2835_clock_choose_div_and_prate(struct clk_hw *hw,
struct bcm2835_clock *clock = bcm2835_clock_from_hw(hw);
struct bcm2835_cprman *cprman = clock->cprman;
const struct bcm2835_clock_data *data = clock->data;
- unsigned long best_rate;
+ unsigned long best_rate = 0;
u32 curdiv, mindiv, maxdiv;
struct clk_hw *parent;
--
2.7.4
^ permalink raw reply related [flat|nested] 16+ messages in thread* Re: [PATCH] clk: bcm: Fix 'maybe-uninitialized' warning in bcm2835_clock_choose_div_and_prate()
2016-12-12 8:00 ` Boris Brezillon
@ 2016-12-12 8:12 ` Arnd Bergmann
-1 siblings, 0 replies; 16+ messages in thread
From: Arnd Bergmann @ 2016-12-12 8:12 UTC (permalink / raw)
To: linux-arm-kernel
Cc: Boris Brezillon, Mike Turquette, Stephen Boyd, linux-clk,
Stephen Rothwell, Florian Fainelli, Scott Branden, Stephen Warren,
Ray Jui, Lee Jones, Eric Anholt, bcm-kernel-feedback-list,
linux-rpi-kernel
On Monday, December 12, 2016 9:00:53 AM CET Boris Brezillon wrote:
> best_rate is reported as potentially uninitialized by gcc.
>
> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
> Fixes: 155e8b3b0ee3 ("clk: bcm: Support rate change propagation on bcm2835 clocks")
> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
I wonder why I didn't get that. Which compiler version did you use?
Arnd
^ permalink raw reply [flat|nested] 16+ messages in thread* [PATCH] clk: bcm: Fix 'maybe-uninitialized' warning in bcm2835_clock_choose_div_and_prate()
@ 2016-12-12 8:12 ` Arnd Bergmann
0 siblings, 0 replies; 16+ messages in thread
From: Arnd Bergmann @ 2016-12-12 8:12 UTC (permalink / raw)
To: linux-arm-kernel
On Monday, December 12, 2016 9:00:53 AM CET Boris Brezillon wrote:
> best_rate is reported as potentially uninitialized by gcc.
>
> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
> Fixes: 155e8b3b0ee3 ("clk: bcm: Support rate change propagation on bcm2835 clocks")
> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
I wonder why I didn't get that. Which compiler version did you use?
Arnd
^ permalink raw reply [flat|nested] 16+ messages in thread* Re: [PATCH] clk: bcm: Fix 'maybe-uninitialized' warning in bcm2835_clock_choose_div_and_prate()
2016-12-12 8:12 ` Arnd Bergmann
@ 2016-12-12 8:22 ` Stephen Rothwell
-1 siblings, 0 replies; 16+ messages in thread
From: Stephen Rothwell @ 2016-12-12 8:22 UTC (permalink / raw)
To: Arnd Bergmann
Cc: linux-arm-kernel, Boris Brezillon, Mike Turquette, Stephen Boyd,
linux-clk, Florian Fainelli, Scott Branden, Stephen Warren,
Ray Jui, Lee Jones, Eric Anholt, bcm-kernel-feedback-list,
linux-rpi-kernel
Hi Arnd,
On Mon, 12 Dec 2016 09:12:36 +0100 Arnd Bergmann <arnd@arndb.de> wrote:
>
> On Monday, December 12, 2016 9:00:53 AM CET Boris Brezillon wrote:
> > best_rate is reported as potentially uninitialized by gcc.
> >
> > Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
> > Fixes: 155e8b3b0ee3 ("clk: bcm: Support rate change propagation on bcm2835 clocks")
> > Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
>
> I wonder why I didn't get that. Which compiler version did you use?
Gcc-5.2.0 powerpc-le hosted cross compiler.
--
Cheers,
Stephen Rothwell
^ permalink raw reply [flat|nested] 16+ messages in thread* [PATCH] clk: bcm: Fix 'maybe-uninitialized' warning in bcm2835_clock_choose_div_and_prate()
@ 2016-12-12 8:22 ` Stephen Rothwell
0 siblings, 0 replies; 16+ messages in thread
From: Stephen Rothwell @ 2016-12-12 8:22 UTC (permalink / raw)
To: linux-arm-kernel
Hi Arnd,
On Mon, 12 Dec 2016 09:12:36 +0100 Arnd Bergmann <arnd@arndb.de> wrote:
>
> On Monday, December 12, 2016 9:00:53 AM CET Boris Brezillon wrote:
> > best_rate is reported as potentially uninitialized by gcc.
> >
> > Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
> > Fixes: 155e8b3b0ee3 ("clk: bcm: Support rate change propagation on bcm2835 clocks")
> > Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
>
> I wonder why I didn't get that. Which compiler version did you use?
Gcc-5.2.0 powerpc-le hosted cross compiler.
--
Cheers,
Stephen Rothwell
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH] clk: bcm: Fix 'maybe-uninitialized' warning in bcm2835_clock_choose_div_and_prate()
2016-12-12 8:12 ` Arnd Bergmann
@ 2016-12-12 8:31 ` Boris Brezillon
-1 siblings, 0 replies; 16+ messages in thread
From: Boris Brezillon @ 2016-12-12 8:31 UTC (permalink / raw)
To: Arnd Bergmann
Cc: linux-arm-kernel, Mike Turquette, Stephen Boyd, linux-clk,
Stephen Rothwell, Florian Fainelli, Scott Branden, Stephen Warren,
Ray Jui, Lee Jones, Eric Anholt, bcm-kernel-feedback-list,
linux-rpi-kernel
On Mon, 12 Dec 2016 09:12:36 +0100
Arnd Bergmann <arnd@arndb.de> wrote:
> On Monday, December 12, 2016 9:00:53 AM CET Boris Brezillon wrote:
> > best_rate is reported as potentially uninitialized by gcc.
> >
> > Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
> > Fixes: 155e8b3b0ee3 ("clk: bcm: Support rate change propagation on bcm2835 clocks")
> > Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
>
> I wonder why I didn't get that. Which compiler version did you use?
>
In case you're interested, my gcc [1] failed to detect it as well, and
this is not the first time it happens :-/.
[1]gcc (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609
^ permalink raw reply [flat|nested] 16+ messages in thread* [PATCH] clk: bcm: Fix 'maybe-uninitialized' warning in bcm2835_clock_choose_div_and_prate()
@ 2016-12-12 8:31 ` Boris Brezillon
0 siblings, 0 replies; 16+ messages in thread
From: Boris Brezillon @ 2016-12-12 8:31 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, 12 Dec 2016 09:12:36 +0100
Arnd Bergmann <arnd@arndb.de> wrote:
> On Monday, December 12, 2016 9:00:53 AM CET Boris Brezillon wrote:
> > best_rate is reported as potentially uninitialized by gcc.
> >
> > Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
> > Fixes: 155e8b3b0ee3 ("clk: bcm: Support rate change propagation on bcm2835 clocks")
> > Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
>
> I wonder why I didn't get that. Which compiler version did you use?
>
In case you're interested, my gcc [1] failed to detect it as well, and
this is not the first time it happens :-/.
[1]gcc (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609
^ permalink raw reply [flat|nested] 16+ messages in thread* Re: [PATCH] clk: bcm: Fix 'maybe-uninitialized' warning in bcm2835_clock_choose_div_and_prate()
2016-12-12 8:31 ` Boris Brezillon
@ 2016-12-12 8:34 ` Arnd Bergmann
-1 siblings, 0 replies; 16+ messages in thread
From: Arnd Bergmann @ 2016-12-12 8:34 UTC (permalink / raw)
To: Boris Brezillon
Cc: linux-arm-kernel, Mike Turquette, Stephen Boyd, linux-clk,
Stephen Rothwell, Florian Fainelli, Scott Branden, Stephen Warren,
Ray Jui, Lee Jones, Eric Anholt, bcm-kernel-feedback-list,
linux-rpi-kernel
On Monday, December 12, 2016 9:31:30 AM CET Boris Brezillon wrote:
> On Mon, 12 Dec 2016 09:12:36 +0100
> Arnd Bergmann <arnd@arndb.de> wrote:
>
> > On Monday, December 12, 2016 9:00:53 AM CET Boris Brezillon wrote:
> > > best_rate is reported as potentially uninitialized by gcc.
> > >
> > > Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
> > > Fixes: 155e8b3b0ee3 ("clk: bcm: Support rate change propagation on bcm2835 clocks")
> > > Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> >
> > I wonder why I didn't get that. Which compiler version did you use?
> >
>
> In case you're interested, my gcc [1] failed to detect it as well, and
> this is not the first time it happens :-/.
>
> [1]gcc (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609
No, I see it now with gcc-7, it only just turned up in linux-next.
I ran into it right away with an allmodconfig build. You were
probably testing based on an earlier v4.9-rc release that had
the warning globally disabled.
Arnd
^ permalink raw reply [flat|nested] 16+ messages in thread* [PATCH] clk: bcm: Fix 'maybe-uninitialized' warning in bcm2835_clock_choose_div_and_prate()
@ 2016-12-12 8:34 ` Arnd Bergmann
0 siblings, 0 replies; 16+ messages in thread
From: Arnd Bergmann @ 2016-12-12 8:34 UTC (permalink / raw)
To: linux-arm-kernel
On Monday, December 12, 2016 9:31:30 AM CET Boris Brezillon wrote:
> On Mon, 12 Dec 2016 09:12:36 +0100
> Arnd Bergmann <arnd@arndb.de> wrote:
>
> > On Monday, December 12, 2016 9:00:53 AM CET Boris Brezillon wrote:
> > > best_rate is reported as potentially uninitialized by gcc.
> > >
> > > Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
> > > Fixes: 155e8b3b0ee3 ("clk: bcm: Support rate change propagation on bcm2835 clocks")
> > > Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> >
> > I wonder why I didn't get that. Which compiler version did you use?
> >
>
> In case you're interested, my gcc [1] failed to detect it as well, and
> this is not the first time it happens :-/.
>
> [1]gcc (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609
No, I see it now with gcc-7, it only just turned up in linux-next.
I ran into it right away with an allmodconfig build. You were
probably testing based on an earlier v4.9-rc release that had
the warning globally disabled.
Arnd
^ permalink raw reply [flat|nested] 16+ messages in thread* Re: [PATCH] clk: bcm: Fix 'maybe-uninitialized' warning in bcm2835_clock_choose_div_and_prate()
2016-12-12 8:34 ` Arnd Bergmann
@ 2016-12-12 9:03 ` Boris Brezillon
-1 siblings, 0 replies; 16+ messages in thread
From: Boris Brezillon @ 2016-12-12 9:03 UTC (permalink / raw)
To: Arnd Bergmann
Cc: linux-arm-kernel, Mike Turquette, Stephen Boyd, linux-clk,
Stephen Rothwell, Florian Fainelli, Scott Branden, Stephen Warren,
Ray Jui, Lee Jones, Eric Anholt, bcm-kernel-feedback-list,
linux-rpi-kernel
On Mon, 12 Dec 2016 09:34:28 +0100
Arnd Bergmann <arnd@arndb.de> wrote:
> On Monday, December 12, 2016 9:31:30 AM CET Boris Brezillon wrote:
> > On Mon, 12 Dec 2016 09:12:36 +0100
> > Arnd Bergmann <arnd@arndb.de> wrote:
> >
> > > On Monday, December 12, 2016 9:00:53 AM CET Boris Brezillon wrote:
> > > > best_rate is reported as potentially uninitialized by gcc.
> > > >
> > > > Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
> > > > Fixes: 155e8b3b0ee3 ("clk: bcm: Support rate change propagation on bcm2835 clocks")
> > > > Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> > >
> > > I wonder why I didn't get that. Which compiler version did you use?
> > >
> >
> > In case you're interested, my gcc [1] failed to detect it as well, and
> > this is not the first time it happens :-/.
> >
> > [1]gcc (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609
>
> No, I see it now with gcc-7, it only just turned up in linux-next.
>
> I ran into it right away with an allmodconfig build. You were
> probably testing based on an earlier v4.9-rc release that had
> the warning globally disabled.
Indeed, I was testing on a 4.9-rc.
^ permalink raw reply [flat|nested] 16+ messages in thread* [PATCH] clk: bcm: Fix 'maybe-uninitialized' warning in bcm2835_clock_choose_div_and_prate()
@ 2016-12-12 9:03 ` Boris Brezillon
0 siblings, 0 replies; 16+ messages in thread
From: Boris Brezillon @ 2016-12-12 9:03 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, 12 Dec 2016 09:34:28 +0100
Arnd Bergmann <arnd@arndb.de> wrote:
> On Monday, December 12, 2016 9:31:30 AM CET Boris Brezillon wrote:
> > On Mon, 12 Dec 2016 09:12:36 +0100
> > Arnd Bergmann <arnd@arndb.de> wrote:
> >
> > > On Monday, December 12, 2016 9:00:53 AM CET Boris Brezillon wrote:
> > > > best_rate is reported as potentially uninitialized by gcc.
> > > >
> > > > Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
> > > > Fixes: 155e8b3b0ee3 ("clk: bcm: Support rate change propagation on bcm2835 clocks")
> > > > Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> > >
> > > I wonder why I didn't get that. Which compiler version did you use?
> > >
> >
> > In case you're interested, my gcc [1] failed to detect it as well, and
> > this is not the first time it happens :-/.
> >
> > [1]gcc (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609
>
> No, I see it now with gcc-7, it only just turned up in linux-next.
>
> I ran into it right away with an allmodconfig build. You were
> probably testing based on an earlier v4.9-rc release that had
> the warning globally disabled.
Indeed, I was testing on a 4.9-rc.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH] clk: bcm: Fix 'maybe-uninitialized' warning in bcm2835_clock_choose_div_and_prate()
2016-12-12 8:00 ` Boris Brezillon
@ 2016-12-12 17:24 ` Eric Anholt
-1 siblings, 0 replies; 16+ messages in thread
From: Eric Anholt @ 2016-12-12 17:24 UTC (permalink / raw)
To: Boris Brezillon, Mike Turquette, Stephen Boyd, linux-clk
Cc: Florian Fainelli, Ray Jui, Scott Branden,
bcm-kernel-feedback-list, Stephen Warren, Lee Jones,
linux-rpi-kernel, Stephen Rothwell, linux-arm-kernel,
Boris Brezillon
[-- Attachment #1: Type: text/plain, Size: 380 bytes --]
Boris Brezillon <boris.brezillon@free-electrons.com> writes:
> best_rate is reported as potentially uninitialized by gcc.
>
> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
> Fixes: 155e8b3b0ee3 ("clk: bcm: Support rate change propagation on bcm2835 clocks")
> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Reviewed-by: Eric Anholt <eric@anholt.net>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread* Re: [PATCH] clk: bcm: Fix 'maybe-uninitialized' warning in bcm2835_clock_choose_div_and_prate()
2016-12-12 8:00 ` Boris Brezillon
@ 2016-12-12 19:26 ` Stephen Boyd
-1 siblings, 0 replies; 16+ messages in thread
From: Stephen Boyd @ 2016-12-12 19:26 UTC (permalink / raw)
To: Boris Brezillon
Cc: Mike Turquette, linux-clk, Florian Fainelli, Ray Jui,
Scott Branden, bcm-kernel-feedback-list, Stephen Warren,
Lee Jones, Eric Anholt, linux-rpi-kernel, Stephen Rothwell,
linux-arm-kernel
On 12/12, Boris Brezillon wrote:
> best_rate is reported as potentially uninitialized by gcc.
>
> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
> Fixes: 155e8b3b0ee3 ("clk: bcm: Support rate change propagation on bcm2835 clocks")
> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
Applied to clk-next
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
^ permalink raw reply [flat|nested] 16+ messages in thread* [PATCH] clk: bcm: Fix 'maybe-uninitialized' warning in bcm2835_clock_choose_div_and_prate()
@ 2016-12-12 19:26 ` Stephen Boyd
0 siblings, 0 replies; 16+ messages in thread
From: Stephen Boyd @ 2016-12-12 19:26 UTC (permalink / raw)
To: linux-arm-kernel
On 12/12, Boris Brezillon wrote:
> best_rate is reported as potentially uninitialized by gcc.
>
> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
> Fixes: 155e8b3b0ee3 ("clk: bcm: Support rate change propagation on bcm2835 clocks")
> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
Applied to clk-next
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2016-12-12 19:26 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-12 8:00 [PATCH] clk: bcm: Fix 'maybe-uninitialized' warning in bcm2835_clock_choose_div_and_prate() Boris Brezillon
2016-12-12 8:00 ` Boris Brezillon
2016-12-12 8:12 ` Arnd Bergmann
2016-12-12 8:12 ` Arnd Bergmann
2016-12-12 8:22 ` Stephen Rothwell
2016-12-12 8:22 ` Stephen Rothwell
2016-12-12 8:31 ` Boris Brezillon
2016-12-12 8:31 ` Boris Brezillon
2016-12-12 8:34 ` Arnd Bergmann
2016-12-12 8:34 ` Arnd Bergmann
2016-12-12 9:03 ` Boris Brezillon
2016-12-12 9:03 ` Boris Brezillon
2016-12-12 17:24 ` Eric Anholt
2016-12-12 17:24 ` Eric Anholt
2016-12-12 19:26 ` Stephen Boyd
2016-12-12 19:26 ` Stephen Boyd
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.