Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] clk: rockchip: don't COMPILE_TEST builds on M68K
@ 2026-06-03 21:37 Heiko Stuebner
  2026-06-04  7:56 ` Geert Uytterhoeven
  0 siblings, 1 reply; 3+ messages in thread
From: Heiko Stuebner @ 2026-06-03 21:37 UTC (permalink / raw)
  To: heiko
  Cc: rosenp, linux-arm-kernel, linux-rockchip, linux-clk,
	kernel test robot

Rockchip clock drivers use hash-tables with enums as inputs.

M68K does interesting things in its __hash_32() implementation, casting
that u32 input to an u16 and therefore triggering warnings like:

   drivers/clk/rockchip/clk-rk3528.c: note: in included file (through include/linux/hash.h, include/linux/slab.h):
     arch/m68k/include/asm/hash.h:57:24: sparse: sparse: cast truncates bits from constant value (18720 becomes 8720)
     arch/m68k/include/asm/hash.h:57:24: sparse: sparse: cast truncates bits from constant value (1e8e8 becomes e8e8)

As M68K should never ever need Rockchip clock drivers, simply disable
compile-tests for M68K.

Fixes: 7edfb7fb58ee ("clk: rockchip: allow COMPILE_TEST builds")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202605191434.PQkj2Rki-lkp@intel.com/
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
 drivers/clk/rockchip/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/clk/rockchip/Kconfig b/drivers/clk/rockchip/Kconfig
index 85133498f013..8b49fe6f46fb 100644
--- a/drivers/clk/rockchip/Kconfig
+++ b/drivers/clk/rockchip/Kconfig
@@ -4,6 +4,7 @@
 config COMMON_CLK_ROCKCHIP
 	bool "Rockchip clock controller common support"
 	depends on ARCH_ROCKCHIP || COMPILE_TEST
+	depends on !M68K
 	default ARCH_ROCKCHIP
 	help
 	  Say y here to enable common clock controller for Rockchip platforms.
-- 
2.47.3



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

* Re: [PATCH] clk: rockchip: don't COMPILE_TEST builds on M68K
  2026-06-03 21:37 [PATCH] clk: rockchip: don't COMPILE_TEST builds on M68K Heiko Stuebner
@ 2026-06-04  7:56 ` Geert Uytterhoeven
  2026-06-04  8:59   ` Heiko Stuebner
  0 siblings, 1 reply; 3+ messages in thread
From: Geert Uytterhoeven @ 2026-06-04  7:56 UTC (permalink / raw)
  To: Heiko Stuebner
  Cc: rosenp, linux-arm-kernel, linux-rockchip, linux-clk,
	kernel test robot

Hi Heiko,

On Wed, 3 Jun 2026 at 23:37, Heiko Stuebner <heiko@sntech.de> wrote:
> Rockchip clock drivers use hash-tables with enums as inputs.
>
> M68K does interesting things in its __hash_32() implementation, casting
> that u32 input to an u16 and therefore triggering warnings like:
>
>    drivers/clk/rockchip/clk-rk3528.c: note: in included file (through include/linux/hash.h, include/linux/slab.h):
>      arch/m68k/include/asm/hash.h:57:24: sparse: sparse: cast truncates bits from constant value (18720 becomes 8720)
>      arch/m68k/include/asm/hash.h:57:24: sparse: sparse: cast truncates bits from constant value (1e8e8 becomes e8e8)
>
> As M68K should never ever need Rockchip clock drivers, simply disable
> compile-tests for M68K.
>
> Fixes: 7edfb7fb58ee ("clk: rockchip: allow COMPILE_TEST builds")
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202605191434.PQkj2Rki-lkp@intel.com/
> Signed-off-by: Heiko Stuebner <heiko@sntech.de>

Thanks for your patch!

> --- a/drivers/clk/rockchip/Kconfig
> +++ b/drivers/clk/rockchip/Kconfig
> @@ -4,6 +4,7 @@
>  config COMMON_CLK_ROCKCHIP
>         bool "Rockchip clock controller common support"
>         depends on ARCH_ROCKCHIP || COMPILE_TEST
> +       depends on !M68K
>         default ARCH_ROCKCHIP
>         help
>           Say y here to enable common clock controller for Rockchip platforms.

Obviously this is the wrong fix ;-)

I have sent a better one, fixing the issue for every user:
"[PATCH] m68k: hash: Use lower_16_bits() helper"
https://lore.kernel.org/b55e9bd0532c0cad519809c86e0a8400060d75a1.1780559561.git.geert@linux-m68k.org

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds


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

* Re: [PATCH] clk: rockchip: don't COMPILE_TEST builds on M68K
  2026-06-04  7:56 ` Geert Uytterhoeven
@ 2026-06-04  8:59   ` Heiko Stuebner
  0 siblings, 0 replies; 3+ messages in thread
From: Heiko Stuebner @ 2026-06-04  8:59 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: rosenp, linux-arm-kernel, linux-rockchip, linux-clk,
	kernel test robot

Hi Geert,

Am Donnerstag, 4. Juni 2026, 09:56:04 Mitteleuropäische Sommerzeit schrieb Geert Uytterhoeven:
> On Wed, 3 Jun 2026 at 23:37, Heiko Stuebner <heiko@sntech.de> wrote:
> > Rockchip clock drivers use hash-tables with enums as inputs.
> >
> > M68K does interesting things in its __hash_32() implementation, casting
> > that u32 input to an u16 and therefore triggering warnings like:
> >
> >    drivers/clk/rockchip/clk-rk3528.c: note: in included file (through include/linux/hash.h, include/linux/slab.h):
> >      arch/m68k/include/asm/hash.h:57:24: sparse: sparse: cast truncates bits from constant value (18720 becomes 8720)
> >      arch/m68k/include/asm/hash.h:57:24: sparse: sparse: cast truncates bits from constant value (1e8e8 becomes e8e8)
> >
> > As M68K should never ever need Rockchip clock drivers, simply disable
> > compile-tests for M68K.
> >
> > Fixes: 7edfb7fb58ee ("clk: rockchip: allow COMPILE_TEST builds")
> > Reported-by: kernel test robot <lkp@intel.com>
> > Closes: https://lore.kernel.org/oe-kbuild-all/202605191434.PQkj2Rki-lkp@intel.com/
> > Signed-off-by: Heiko Stuebner <heiko@sntech.de>
> 
> Thanks for your patch!
> 
> > --- a/drivers/clk/rockchip/Kconfig
> > +++ b/drivers/clk/rockchip/Kconfig
> > @@ -4,6 +4,7 @@
> >  config COMMON_CLK_ROCKCHIP
> >         bool "Rockchip clock controller common support"
> >         depends on ARCH_ROCKCHIP || COMPILE_TEST
> > +       depends on !M68K
> >         default ARCH_ROCKCHIP
> >         help
> >           Say y here to enable common clock controller for Rockchip platforms.
> 
> Obviously this is the wrong fix ;-)
> 
> I have sent a better one, fixing the issue for every user:
> "[PATCH] m68k: hash: Use lower_16_bits() helper"
> https://lore.kernel.org/b55e9bd0532c0cad519809c86e0a8400060d75a1.1780559561.git.geert@linux-m68k.org

oh nice - fixing the actual problem instead of working around the
issue. I had no clue about m68k and thus no idea of how to test
anything, so went for the easx "fix" :-)


So thanks for looking into that
Heiko




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

end of thread, other threads:[~2026-06-04  8:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-03 21:37 [PATCH] clk: rockchip: don't COMPILE_TEST builds on M68K Heiko Stuebner
2026-06-04  7:56 ` Geert Uytterhoeven
2026-06-04  8:59   ` Heiko Stuebner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox