From: Sasha Levin <sashal@kernel.org>
To: Geert Uytterhoeven <geert+renesas@glider.be>,
Stephen Boyd <sboyd@kernel.org>,
Brian Masney <bmasney+clk@redhat.com>,
Jerome Brunet <jbrunet+clk@baylibre.com>,
Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Cc: Sasha Levin <sashal@kernel.org>,
kernel test robot <lkp@intel.com>,
linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH] clk: renesas: r9a09g077: Add missing slab.h and cleanup.h includes
Date: Sun, 13 Sep 2026 13:30:08 -0400 [thread overview]
Message-ID: <20260913173009.1164899-1-sashal@kernel.org> (raw)
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@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202609101334.xgbNoC4e-lkp@intel.com/
Assisted-by: LLM
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/clk/renesas/r9a09g077-cpg.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/clk/renesas/r9a09g077-cpg.c b/drivers/clk/renesas/r9a09g077-cpg.c
index 0495e3206973c..5a0e7df1eb06c 100644
--- a/drivers/clk/renesas/r9a09g077-cpg.c
+++ b/drivers/clk/renesas/r9a09g077-cpg.c
@@ -8,6 +8,7 @@
#include <linux/bitfield.h>
#include <linux/bits.h>
+#include <linux/cleanup.h>
#include <linux/clk-provider.h>
#include <linux/clk/renesas.h>
#include <linux/device.h>
@@ -20,6 +21,7 @@
#include <linux/module.h>
#include <linux/of_address.h>
#include <linux/regmap.h>
+#include <linux/slab.h>
#include <linux/types.h>
#include <linux/units.h>
--
2.53.0
next reply other threads:[~2026-09-13 17:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-13 17:30 Sasha Levin [this message]
2026-09-14 7:38 ` Geert Uytterhoeven
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260913173009.1164899-1-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=bmasney+clk@redhat.com \
--cc=geert+renesas@glider.be \
--cc=jbrunet+clk@baylibre.com \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=lkp@intel.com \
--cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
--cc=sboyd@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®