From: kernel test robot <lkp@intel.com>
To: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
linux-renesas-soc@vger.kernel.org,
Geert Uytterhoeven <geert+renesas@glider.be>
Subject: [geert-renesas-drivers:renesas-clk-for-v7.4 16/16] drivers/clk/renesas/r9a09g077-cpg.c:966:35: error: use of undeclared identifier '__free_kfree'; did you mean '__free_pages'?
Date: Thu, 10 Sep 2026 13:33:44 +0800 [thread overview]
Message-ID: <202609101334.xgbNoC4e-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers.git renesas-clk-for-v7.4
head: 810b8b6c4e02c40991c29491cec09ebdaf5ec6d0
commit: 810b8b6c4e02c40991c29491cec09ebdaf5ec6d0 [16/16] clk: renesas: r9a09g077: Register SYSC regmap
config: hexagon-allmodconfig (https://download.01.org/0day-ci/archive/20260910/202609101334.xgbNoC4e-lkp@intel.com/config)
compiler: clang version 24.0.0git (https://github.com/llvm/llvm-project c1872e7fd3307679a2da53f9d83de0ccf234b4ad)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260910/202609101334.xgbNoC4e-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202609101334.xgbNoC4e-lkp@intel.com/
All errors (new ones prefixed by >>):
>> drivers/clk/renesas/r9a09g077-cpg.c:966:35: error: use of undeclared identifier '__free_kfree'; did you mean '__free_pages'?
966 | struct regmap_config *regmap_cfg __free(kfree) = kzalloc_obj(*regmap_cfg);
| ^~~~~~~~~~~~~
include/linux/cleanup.h:213:33: note: expanded from macro '__free'
213 | #define __free(_name) __cleanup(__free_##_name)
| ^~~~~~~~~~~~~~
<scratch space>:3:1: note: expanded from here
3 | __free_kfree
| ^~~~~~~~~~~~
include/linux/gfp.h:342:13: note: '__free_pages' declared here
342 | extern void __free_pages(struct page *page, unsigned int order);
| ^
>> drivers/clk/renesas/r9a09g077-cpg.c:966:35: error: 'cleanup' function '__free_pages' must take 1 parameter
966 | struct regmap_config *regmap_cfg __free(kfree) = kzalloc_obj(*regmap_cfg);
| ^
include/linux/cleanup.h:213:33: note: expanded from macro '__free'
213 | #define __free(_name) __cleanup(__free_##_name)
| ^
<scratch space>:3:1: note: expanded from here
3 | __free_kfree
| ^
>> 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]
966 | struct regmap_config *regmap_cfg __free(kfree) = kzalloc_obj(*regmap_cfg);
| ^
>> 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]
966 | struct regmap_config *regmap_cfg __free(kfree) = kzalloc_obj(*regmap_cfg);
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~
4 errors generated.
vim +966 drivers/clk/renesas/r9a09g077-cpg.c
963
964 static int r9a09g077_post_init(struct device *dev, struct cpg_mssr_pub *pub)
965 {
> 966 struct regmap_config *regmap_cfg __free(kfree) = kzalloc_obj(*regmap_cfg);
967 struct r9a09g077_sysc_reg *sysc_reg;
968 struct regmap *regmap;
969 struct resource res;
970 int ret;
971
972 /*
973 * Return early if the SYSC sizes are not as expected, for backwards
974 * compatibility with older device trees that only expose the 64 KiB
975 * CPG register window.
976 */
977 ret = of_address_to_resource(dev->of_node, 0, &res);
978 if (ret)
979 return ret;
980 if (resource_size(&res) != RZT2H_CPG_REG_SIZE)
981 return 0;
982
983 ret = of_address_to_resource(dev->of_node, 1, &res);
984 if (ret)
985 return ret;
986 if (resource_size(&res) != RZT2H_CPG_REG_SIZE)
987 return 0;
988
989 if (!regmap_cfg)
990 return -ENOMEM;
991
992 sysc_reg = devm_kzalloc(dev, sizeof(*sysc_reg), GFP_KERNEL);
993 if (!sysc_reg)
994 return -ENOMEM;
995
996 /* Only allow access in the SYSC regions */
997 sysc_reg->base[0] = pub->base0 + RZT2H_SYSC_OFFSET;
998 sysc_reg->base[1] = pub->base1 + RZT2H_SYSC_OFFSET;
999
1000 regmap_cfg->name = "rzt2h_sysc";
1001 regmap_cfg->reg_bits = 32;
1002 regmap_cfg->reg_stride = 4;
1003 regmap_cfg->val_bits = 32;
1004 regmap_cfg->fast_io = true;
1005 regmap_cfg->max_register = RZT2H_SYSC_SIZE - 1;
1006 regmap_cfg->readable_reg = r9a09g077_writeable_readable_sysc;
1007 regmap_cfg->writeable_reg = r9a09g077_writeable_readable_sysc;
1008
1009 regmap = devm_regmap_init(dev, &r9a09g077_sys_regmap_bus, sysc_reg, regmap_cfg);
1010 if (IS_ERR(regmap))
1011 return PTR_ERR(regmap);
1012
1013 return of_syscon_register_regmap(dev->of_node, regmap);
1014 }
1015
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next reply other threads:[~2026-09-10 5:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-10 5:33 kernel test robot [this message]
2026-09-10 10:14 ` [geert-renesas-drivers:renesas-clk-for-v7.4 16/16] drivers/clk/renesas/r9a09g077-cpg.c:966:35: error: use of undeclared identifier '__free_kfree'; did you mean '__free_pages'? 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=202609101334.xgbNoC4e-lkp@intel.com \
--to=lkp@intel.com \
--cc=geert+renesas@glider.be \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
/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