Re: [PATCH] clk: renesas: r9a09g077: Add missing slab.h and cleanup.h includes
From: Geert Uytterhoeven
Date: Mon Sep 14 2026 - 03:56:49 EST
Hi Sasha,
On Sun, 13 Sept 2026 at 19:30, Sasha Levin <sashal@xxxxxxxxxx> wrote:
> r9a09g077_post_init() uses kzalloc_obj() and __free(kfree), but the file
> includes neither <linux/slab.h> nor <linux/cleanup.h>. It only builds
> where those happen to be pulled in transitively; on arm allmodconfig
> they are not, and the build fails:
>
> drivers/clk/renesas/r9a09g077-cpg.c:966:35: error: use of undeclared
> identifier '__free_kfree'; did you mean '__free_pages'?
> drivers/clk/renesas/r9a09g077-cpg.c:966:35: error: 'cleanup' function
> '__free_pages' must take 1 parameter
> drivers/clk/renesas/r9a09g077-cpg.c:966:51: error: call to undeclared
> function 'kzalloc_obj'; ISO C99 and later do not support implicit
> function declarations [-Wimplicit-function-declaration]
> drivers/clk/renesas/r9a09g077-cpg.c:966:24: error: incompatible integer
> to pointer conversion initializing 'struct regmap_config *' with an
> expression of type 'int' [-Wint-conversion]
>
> gcc reports the same thing as "cleanup argument not a function" plus an
> implicit declaration of kzalloc_obj().
>
> Include both headers explicitly rather than relying on an incidental
> include chain.
>
> Fixes: 810b8b6c4e02 ("clk: renesas: r9a09g077: Register SYSC regmap")
> Reported-by: kernel test robot <lkp@xxxxxxxxx>
> Closes: https://lore.kernel.org/oe-kbuild-all/202609101334.xgbNoC4e-lkp@xxxxxxxxx/
See my reply to that message:
https://lore.kernel.org/oe-kbuild-all/CAMuHMdVBFCKA5gjQeXuTrOYbaY_sZg-Gnz-fgOCSKhF3cV8jhg@xxxxxxxxxxxxxx/
> Assisted-by: LLM
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx
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