Skip to contentSkip to conversation

clk: rockchip: don't COMPILE_TEST builds on M68K

PATCH In review Heiko Stuebner 2 participants 3 messages Jun 3 – Jun 4

Subsystems (2)
lore
Share & tools
lore

Heiko Stuebner

author maintainer
#0 lore raw

PATCH 1/1 clk: rockchip: don't COMPILE_TEST builds on M68K

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")
---
 drivers/clk/rockchip/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/clk/rockchip/Kconfig +1 -0
index 85133498f013..8b49fe6f46fb 100644
@@ -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.
Signature · 1 line
2.47.3
#1 lore raw

Hi Heiko,

Quoted 9 lines · Heiko Stuebner

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)

Quoted 7 lines

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

Fixes 7edfb7fb58ee ("clk: rockchip: allow COMPILE_TEST builds")

Thanks for your patch!

drivers/clk/rockchip/Kconfig line 10

Quoted 10 lines
drivers/clk/rockchip/Kconfig +1 -0
@@ -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

Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

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
author maintainer
#2 lore raw

Hi Geert,

Am Donnerstag, 4. Juni 2026, 09:56:04 Mitteleuropäische Sommerzeit schrieb Geert Uytterhoeven:

Quoted 33 lines · Heiko Stuebner
Quoted 9 lines

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)

Quoted 7 lines

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

Fixes 7edfb7fb58ee ("clk: rockchip: allow COMPILE_TEST builds")

Thanks for your patch!

drivers/clk/rockchip/Kconfig line 10

Quoted 10 lines
drivers/clk/rockchip/Kconfig +1 -0
@@ -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 ;-)

Quoted 3 lines

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