From: kernel test robot <lkp@intel.com>
To: Pankaj Gupta <pankaj.gupta@nxp.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
Frank Li <Frank.Li@nxp.com>
Subject: [frank-li:imx/ele 5/7] drivers/firmware/imx/ele_fw_api.c:311:28: error: use of undeclared identifier '__free_kfree'; did you mean '__free_pages'?
Date: Wed, 16 Sep 2026 06:01:51 +0800 [thread overview]
Message-ID: <202609160545.zdLFFcfQ-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/frank.li/linux.git imx/ele
head: 211dcfe620fc1038ac5de521d170ea2390c15aea
commit: 7560ad03bbf40f5b89e210bee2dadb4be20efc1f [5/7] firmware: imx: adds miscdev
config: arm-randconfig-003-20260916 (https://download.01.org/0day-ci/archive/20260916/202609160545.zdLFFcfQ-lkp@intel.com/config)
compiler: clang version 24.0.0git (https://github.com/llvm/llvm-project 148ee2b266b73a49f1f31d0bd17d4818b91bee9f)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260916/202609160545.zdLFFcfQ-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/202609160545.zdLFFcfQ-lkp@intel.com/
All errors (new ones prefixed by >>):
>> drivers/firmware/imx/ele_fw_api.c:311:28: error: use of undeclared identifier '__free_kfree'; did you mean '__free_pages'?
311 | struct se_api_msg *tx_msg __free(kfree) =
| ^~~~~~~~~~~~~
include/linux/cleanup.h:213:33: note: expanded from macro '__free'
213 | #define __free(_name) __cleanup(__free_##_name)
| ^~~~~~~~~~~~~~
<scratch space>:149:1: note: expanded from here
149 | __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/firmware/imx/ele_fw_api.c:311:28: error: 'cleanup' function '__free_pages' must take 1 parameter
311 | struct se_api_msg *tx_msg __free(kfree) =
| ^
include/linux/cleanup.h:213:33: note: expanded from macro '__free'
213 | #define __free(_name) __cleanup(__free_##_name)
| ^
<scratch space>:149:1: note: expanded from here
149 | __free_kfree
| ^
>> drivers/firmware/imx/ele_fw_api.c:312:3: error: call to undeclared function 'kzalloc'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
312 | kzalloc(ELE_SESSION_CLOSE_REQ_SZ, GFP_KERNEL);
| ^
>> drivers/firmware/imx/ele_fw_api.c:311:21: error: incompatible integer to pointer conversion initializing 'struct se_api_msg *' with an expression of type 'int' [-Wint-conversion]
311 | struct se_api_msg *tx_msg __free(kfree) =
| ^
312 | kzalloc(ELE_SESSION_CLOSE_REQ_SZ, GFP_KERNEL);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/firmware/imx/ele_fw_api.c:313:28: error: use of undeclared identifier '__free_kfree'; did you mean '__free_pages'?
313 | struct se_api_msg *rx_msg __free(kfree) =
| ^~~~~~~~~~~~~
include/linux/cleanup.h:213:33: note: expanded from macro '__free'
213 | #define __free(_name) __cleanup(__free_##_name)
| ^~~~~~~~~~~~~~
<scratch space>:154:1: note: expanded from here
154 | __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/firmware/imx/ele_fw_api.c:313:28: error: 'cleanup' function '__free_pages' must take 1 parameter
313 | struct se_api_msg *rx_msg __free(kfree) =
| ^
include/linux/cleanup.h:213:33: note: expanded from macro '__free'
213 | #define __free(_name) __cleanup(__free_##_name)
| ^
<scratch space>:154:1: note: expanded from here
154 | __free_kfree
| ^
drivers/firmware/imx/ele_fw_api.c:313:21: error: incompatible integer to pointer conversion initializing 'struct se_api_msg *' with an expression of type 'int' [-Wint-conversion]
313 | struct se_api_msg *rx_msg __free(kfree) =
| ^
314 | kzalloc(ELE_SESSION_CLOSE_RSP_SZ, GFP_KERNEL);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/firmware/imx/ele_fw_api.c:368:28: error: use of undeclared identifier '__free_kfree'; did you mean '__free_pages'?
368 | struct se_api_msg *tx_msg __free(kfree) =
| ^~~~~~~~~~~~~
include/linux/cleanup.h:213:33: note: expanded from macro '__free'
213 | #define __free(_name) __cleanup(__free_##_name)
| ^~~~~~~~~~~~~~
<scratch space>:159:1: note: expanded from here
159 | __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/firmware/imx/ele_fw_api.c:368:28: error: 'cleanup' function '__free_pages' must take 1 parameter
368 | struct se_api_msg *tx_msg __free(kfree) =
| ^
include/linux/cleanup.h:213:33: note: expanded from macro '__free'
213 | #define __free(_name) __cleanup(__free_##_name)
| ^
<scratch space>:159:1: note: expanded from here
159 | __free_kfree
| ^
drivers/firmware/imx/ele_fw_api.c:369:3: error: call to undeclared function 'kzalloc'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
369 | kzalloc(ELE_STORAGE_CLOSE_REQ_SZ, GFP_KERNEL);
| ^
drivers/firmware/imx/ele_fw_api.c:368:21: error: incompatible integer to pointer conversion initializing 'struct se_api_msg *' with an expression of type 'int' [-Wint-conversion]
368 | struct se_api_msg *tx_msg __free(kfree) =
| ^
369 | kzalloc(ELE_STORAGE_CLOSE_REQ_SZ, GFP_KERNEL);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/firmware/imx/ele_fw_api.c:370:28: error: use of undeclared identifier '__free_kfree'; did you mean '__free_pages'?
370 | struct se_api_msg *rx_msg __free(kfree) =
| ^~~~~~~~~~~~~
include/linux/cleanup.h:213:33: note: expanded from macro '__free'
213 | #define __free(_name) __cleanup(__free_##_name)
| ^~~~~~~~~~~~~~
<scratch space>:164:1: note: expanded from here
164 | __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/firmware/imx/ele_fw_api.c:370:28: error: 'cleanup' function '__free_pages' must take 1 parameter
370 | struct se_api_msg *rx_msg __free(kfree) =
| ^
include/linux/cleanup.h:213:33: note: expanded from macro '__free'
213 | #define __free(_name) __cleanup(__free_##_name)
| ^
<scratch space>:164:1: note: expanded from here
164 | __free_kfree
| ^
drivers/firmware/imx/ele_fw_api.c:370:21: error: incompatible integer to pointer conversion initializing 'struct se_api_msg *' with an expression of type 'int' [-Wint-conversion]
370 | struct se_api_msg *rx_msg __free(kfree) =
| ^
371 | kzalloc(ELE_STORAGE_CLOSE_RSP_SZ, GFP_KERNEL);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
14 errors generated.
vim +311 drivers/firmware/imx/ele_fw_api.c
308
309 int se_close_session(struct se_if_device_ctx *dev_ctx, u32 session_hdl)
310 {
> 311 struct se_api_msg *tx_msg __free(kfree) =
> 312 kzalloc(ELE_SESSION_CLOSE_REQ_SZ, GFP_KERNEL);
313 struct se_api_msg *rx_msg __free(kfree) =
314 kzalloc(ELE_SESSION_CLOSE_RSP_SZ, GFP_KERNEL);
315 struct se_if_priv *priv;
316 int ret;
317
318 if (!dev_ctx || !dev_ctx->priv)
319 return -EINVAL;
320
321 if (!tx_msg || !rx_msg)
322 return -ENOMEM;
323
324 priv = dev_ctx->priv;
325
326 /*
327 * Session close is a FW-API command; pass is_base_api=false so the
328 * header carries fw_api_ver.
329 */
330 se_fill_cmd_msg_hdr(priv, (struct se_msg_hdr *)&tx_msg->header,
331 ELE_SESSION_CLOSE_REQ, ELE_SESSION_CLOSE_REQ_SZ, false);
332
333 tx_msg->data[0] = session_hdl;
334
335 /*
336 * Transmit on the caller's own context. Using dev_ctx (rather than
337 * hardcoding priv->priv_dev_ctx) keeps a userspace close() subject to
338 * the going_away check in ele_msg_send_rcv(): if unbind has begun and
339 * freed priv->tx_chan, the send is rejected with -ENODEV instead of
340 * touching the freed mailbox channel.
341 *
342 * The teardown and fw_busy-recovery paths instead reserve the messaging
343 * interface for their own task via se_reserve_msg_if() before calling
344 * this. That reservation (msg_excl_owner == current) is what makes
345 * ele_msg_send_rcv() let their resync closes through the going_away and
346 * fw_busy gates; they also pass priv_dev_ctx so the wait is the
347 * uninterruptible internal-context wait.
348 */
349
350 ret = ele_msg_send_rcv(dev_ctx,
351 tx_msg,
352 ELE_SESSION_CLOSE_REQ_SZ,
353 rx_msg,
354 ELE_SESSION_CLOSE_RSP_SZ, NULL);
355 if (ret < 0)
356 return ret;
357
358 ret = se_val_rsp_hdr_n_status(dev_ctx,
359 rx_msg,
360 ELE_SESSION_CLOSE_REQ,
361 ELE_SESSION_CLOSE_RSP_SZ,
362 priv->if_defs->fw_api_ver);
363 return ret;
364 }
365
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2026-09-15 22:02 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202609160545.zdLFFcfQ-lkp@intel.com \
--to=lkp@intel.com \
--cc=Frank.Li@nxp.com \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=pankaj.gupta@nxp.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.