Re: [PATCH] m68k: implement runtime consts

Geert Uytterhoeven
2025-11-27T10:22:22Z

Hi Daniel,

On Thu, 27 Nov 2025 at 11:13, Daniel Palmer <daniel@thingy.jp> wrote:
> On Thu, 27 Nov 2025 at 10:59, kernel test robot <lkp@intel.com> wrote:
> > All warnings (new ones prefixed by >>):
> >
> > In file included from fs/dcache.c:38:
> > arch/m68k/include/asm/runtime-const.h: In function '__runtime_fixup_ptr':
> > >> arch/m68k/include/asm/runtime-const.h:28:29: warning: unused variable 'end' [-Wunused-variable]
> > 28 | const unsigned long end = start + sizeof(*value);
> > | ^~~
> > arch/m68k/include/asm/runtime-const.h: In function '__runtime_fixup_shift':
> > arch/m68k/include/asm/runtime-const.h:51:29: warning: unused variable 'end' [-Wunused-variable]
> > 51 | const unsigned long end = start + sizeof(*insn);
> > | ^~~
>
> I guess this is because allnoconfig results in CONFIG_MMU=n and that means
> that the nommu defines for cache operations are used and those look like:
> #define flush_icache_range(start, len) __flush_icache_all()
>
> And the arguments getting passed aren't used. Also noticed that it's
> start and len
> there not start and end like everywhere else seems to be...
>
> I guess the flush_icache_range macro needs to be tweaked to not
> trigger the unused
> warning but I'm not sure how right now.

Replacing the macros by static inline functions should fix that.

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