linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] clk: qoriq: Fix -Wunused-const-variable
@ 2019-06-27 22:06 Nathan Huckleberry
  2019-06-27 23:19 ` Nick Desaulniers
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Nathan Huckleberry @ 2019-06-27 22:06 UTC (permalink / raw)
  To: mturquette, sboyd, yogeshnarayan.gaur, oss
  Cc: linux-clk, linux-kernel, Nathan Huckleberry, clang-built-linux

drivers/clk/clk-qoriq.c:138:38: warning: unused variable
'p5020_cmux_grp1' [-Wunused-const-variable] static const struct
clockgen_muxinfo p5020_cmux_grp1

drivers/clk/clk-qoriq.c:146:38: warning: unused variable
'p5020_cmux_grp2' [-Wunused-const-variable] static const struct
clockgen_muxinfo p5020_cmux_grp2

In the definition of the p5020 chip, the p2041 chip's info was used
instead.  The p5020 and p2041 chips have different info. This is most
likely a typo.

Link: https://github.com/ClangBuiltLinux/linux/issues/525
Cc: clang-built-linux@googlegroups.com
Signed-off-by: Nathan Huckleberry <nhuck@google.com>
---
 drivers/clk/clk-qoriq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/clk-qoriq.c b/drivers/clk/clk-qoriq.c
index 4739a47ec8bd..0f8870527940 100644
--- a/drivers/clk/clk-qoriq.c
+++ b/drivers/clk/clk-qoriq.c
@@ -678,7 +678,7 @@ static const struct clockgen_chipinfo chipinfo[] = {
 		.guts_compat = "fsl,qoriq-device-config-1.0",
 		.init_periph = p5020_init_periph,
 		.cmux_groups = {
-			&p2041_cmux_grp1, &p2041_cmux_grp2
+			&p5020_cmux_grp1, &p5020_cmux_grp2
 		},
 		.cmux_to_group = {
 			0, 1, -1
-- 
2.22.0.410.gd8fdbe21b5-goog


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

* Re: [PATCH] clk: qoriq: Fix -Wunused-const-variable
  2019-06-27 22:06 [PATCH] clk: qoriq: Fix -Wunused-const-variable Nathan Huckleberry
@ 2019-06-27 23:19 ` Nick Desaulniers
  2019-06-28 21:27 ` Scott Wood
  2019-08-07 21:20 ` Stephen Boyd
  2 siblings, 0 replies; 4+ messages in thread
From: Nick Desaulniers @ 2019-06-27 23:19 UTC (permalink / raw)
  To: Nathan Huckleberry
  Cc: mturquette, sboyd, yogeshnarayan.gaur, oss, linux-clk, LKML,
	clang-built-linux

On Thu, Jun 27, 2019 at 3:06 PM 'Nathan Huckleberry' via Clang Built
Linux <clang-built-linux@googlegroups.com> wrote:
>
> drivers/clk/clk-qoriq.c:138:38: warning: unused variable
> 'p5020_cmux_grp1' [-Wunused-const-variable] static const struct
> clockgen_muxinfo p5020_cmux_grp1
>
> drivers/clk/clk-qoriq.c:146:38: warning: unused variable
> 'p5020_cmux_grp2' [-Wunused-const-variable] static const struct
> clockgen_muxinfo p5020_cmux_grp2
>
> In the definition of the p5020 chip, the p2041 chip's info was used
> instead.  The p5020 and p2041 chips have different info. This is most
> likely a typo.

oops! Further, the definitions of p5020_cmux_grp1/p5020_cmux_grp2 are
subtly different than p2041_cmux_grp1/p2041_cmux_grp2.  Definitely
looks copy+pasta related; I agree with your assessment.  (Also, it's
interesting to see this sparse array initializer syntax).  Thanks for
the patch.
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>

>
> Link: https://github.com/ClangBuiltLinux/linux/issues/525
> Cc: clang-built-linux@googlegroups.com
> Signed-off-by: Nathan Huckleberry <nhuck@google.com>
> ---
>  drivers/clk/clk-qoriq.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/clk/clk-qoriq.c b/drivers/clk/clk-qoriq.c
> index 4739a47ec8bd..0f8870527940 100644
> --- a/drivers/clk/clk-qoriq.c
> +++ b/drivers/clk/clk-qoriq.c
> @@ -678,7 +678,7 @@ static const struct clockgen_chipinfo chipinfo[] = {
>                 .guts_compat = "fsl,qoriq-device-config-1.0",
>                 .init_periph = p5020_init_periph,
>                 .cmux_groups = {
> -                       &p2041_cmux_grp1, &p2041_cmux_grp2
> +                       &p5020_cmux_grp1, &p5020_cmux_grp2

-- 
Thanks,
~Nick Desaulniers

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

* Re: [PATCH] clk: qoriq: Fix -Wunused-const-variable
  2019-06-27 22:06 [PATCH] clk: qoriq: Fix -Wunused-const-variable Nathan Huckleberry
  2019-06-27 23:19 ` Nick Desaulniers
@ 2019-06-28 21:27 ` Scott Wood
  2019-08-07 21:20 ` Stephen Boyd
  2 siblings, 0 replies; 4+ messages in thread
From: Scott Wood @ 2019-06-28 21:27 UTC (permalink / raw)
  To: Nathan Huckleberry, mturquette, sboyd, yogeshnarayan.gaur
  Cc: linux-clk, linux-kernel, clang-built-linux

On Thu, 2019-06-27 at 15:06 -0700, Nathan Huckleberry wrote:
> drivers/clk/clk-qoriq.c:138:38: warning: unused variable
> 'p5020_cmux_grp1' [-Wunused-const-variable] static const struct
> clockgen_muxinfo p5020_cmux_grp1
> 
> drivers/clk/clk-qoriq.c:146:38: warning: unused variable
> 'p5020_cmux_grp2' [-Wunused-const-variable] static const struct
> clockgen_muxinfo p5020_cmux_grp2
> 
> In the definition of the p5020 chip, the p2041 chip's info was used
> instead.  The p5020 and p2041 chips have different info. This is most
> likely a typo.
> 
> Link: https://github.com/ClangBuiltLinux/linux/issues/525
> Cc: clang-built-linux@googlegroups.com
> Signed-off-by: Nathan Huckleberry <nhuck@google.com>

Acked-by: Scott Wood <oss@buserror.net>

-Scott



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

* Re: [PATCH] clk: qoriq: Fix -Wunused-const-variable
  2019-06-27 22:06 [PATCH] clk: qoriq: Fix -Wunused-const-variable Nathan Huckleberry
  2019-06-27 23:19 ` Nick Desaulniers
  2019-06-28 21:27 ` Scott Wood
@ 2019-08-07 21:20 ` Stephen Boyd
  2 siblings, 0 replies; 4+ messages in thread
From: Stephen Boyd @ 2019-08-07 21:20 UTC (permalink / raw)
  To: Nathan Huckleberry, mturquette, oss, yogeshnarayan.gaur
  Cc: linux-clk, linux-kernel, Nathan Huckleberry, clang-built-linux

Quoting Nathan Huckleberry (2019-06-27 15:06:42)
> drivers/clk/clk-qoriq.c:138:38: warning: unused variable
> 'p5020_cmux_grp1' [-Wunused-const-variable] static const struct
> clockgen_muxinfo p5020_cmux_grp1
> 
> drivers/clk/clk-qoriq.c:146:38: warning: unused variable
> 'p5020_cmux_grp2' [-Wunused-const-variable] static const struct
> clockgen_muxinfo p5020_cmux_grp2
> 
> In the definition of the p5020 chip, the p2041 chip's info was used
> instead.  The p5020 and p2041 chips have different info. This is most
> likely a typo.
> 
> Link: https://github.com/ClangBuiltLinux/linux/issues/525
> Cc: clang-built-linux@googlegroups.com
> Signed-off-by: Nathan Huckleberry <nhuck@google.com>
> ---

Applied to clk-next


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

end of thread, other threads:[~2019-08-07 21:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-27 22:06 [PATCH] clk: qoriq: Fix -Wunused-const-variable Nathan Huckleberry
2019-06-27 23:19 ` Nick Desaulniers
2019-06-28 21:27 ` Scott Wood
2019-08-07 21:20 ` Stephen Boyd

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).