From: kernel test robot <lkp@intel.com>
To: Lizhi Hou <lizhi.hou@amd.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
Jeffrey Hugo <quic_jhugo@quicinc.com>,
George Yang <George.Yang@amd.com>, Min Ma <min.ma@amd.com>
Subject: drivers/accel/amdxdna/amdxdna_mailbox.c:203:9: error: implicit declaration of function 'kfree'
Date: Sun, 16 Feb 2025 02:29:31 +0800 [thread overview]
Message-ID: <202502160209.WZSMNh1N-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 6452feaf29a6a1cc1c904520c4b1b4cd90133fac
commit: b87f920b934426a24d54613f12ed67c03ae05024 accel/amdxdna: Support hardware mailbox
date: 3 months ago
config: x86_64-buildonly-randconfig-002-20250216 (https://download.01.org/0day-ci/archive/20250216/202502160209.WZSMNh1N-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250216/202502160209.WZSMNh1N-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/202502160209.WZSMNh1N-lkp@intel.com/
All error/warnings (new ones prefixed by >>):
drivers/accel/amdxdna/amdxdna_mailbox.c: In function 'mailbox_release_msg':
>> drivers/accel/amdxdna/amdxdna_mailbox.c:203:9: error: implicit declaration of function 'kfree' [-Werror=implicit-function-declaration]
203 | kfree(mb_msg);
| ^~~~~
drivers/accel/amdxdna/amdxdna_mailbox.c: At top level:
drivers/accel/amdxdna/amdxdna_mailbox.c:357:8: error: unknown type name 'irqreturn_t'
357 | static irqreturn_t mailbox_irq_handler(int irq, void *p)
| ^~~~~~~~~~~
drivers/accel/amdxdna/amdxdna_mailbox.c: In function 'mailbox_irq_handler':
drivers/accel/amdxdna/amdxdna_mailbox.c:367:16: error: 'IRQ_HANDLED' undeclared (first use in this function)
367 | return IRQ_HANDLED;
| ^~~~~~~~~~~
drivers/accel/amdxdna/amdxdna_mailbox.c:367:16: note: each undeclared identifier is reported only once for each function it appears in
drivers/accel/amdxdna/amdxdna_mailbox.c: In function 'mailbox_rx_worker':
drivers/accel/amdxdna/amdxdna_mailbox.c:395:25: error: implicit declaration of function 'disable_irq'; did you mean 'disable_work'? [-Werror=implicit-function-declaration]
395 | disable_irq(mb_chann->msix_irq);
| ^~~~~~~~~~~
| disable_work
drivers/accel/amdxdna/amdxdna_mailbox.c: In function 'xdna_mailbox_send_msg':
>> drivers/accel/amdxdna/amdxdna_mailbox.c:431:18: error: implicit declaration of function 'kzalloc' [-Werror=implicit-function-declaration]
431 | mb_msg = kzalloc(sizeof(*mb_msg) + pkg_size, GFP_KERNEL);
| ^~~~~~~
>> drivers/accel/amdxdna/amdxdna_mailbox.c:431:16: warning: assignment to 'struct mailbox_msg *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
431 | mb_msg = kzalloc(sizeof(*mb_msg) + pkg_size, GFP_KERNEL);
| ^
drivers/accel/amdxdna/amdxdna_mailbox.c: In function 'xdna_mailbox_create_channel':
>> drivers/accel/amdxdna/amdxdna_mailbox.c:490:18: warning: assignment to 'struct mailbox_channel *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
490 | mb_chann = kzalloc(sizeof(*mb_chann), GFP_KERNEL);
| ^
drivers/accel/amdxdna/amdxdna_mailbox.c:513:15: error: implicit declaration of function 'request_irq'; did you mean 'request_region'? [-Werror=implicit-function-declaration]
513 | ret = request_irq(mb_irq, mailbox_irq_handler, 0, MAILBOX_NAME, mb_chann);
| ^~~~~~~~~~~
| request_region
drivers/accel/amdxdna/amdxdna_mailbox.c: In function 'xdna_mailbox_destroy_channel':
drivers/accel/amdxdna/amdxdna_mailbox.c:537:9: error: implicit declaration of function 'free_irq' [-Werror=implicit-function-declaration]
537 | free_irq(mb_chann->msix_irq, mb_chann);
| ^~~~~~~~
drivers/accel/amdxdna/amdxdna_mailbox.c: In function 'mailbox_irq_handler':
drivers/accel/amdxdna/amdxdna_mailbox.c:368:1: warning: control reaches end of non-void function [-Wreturn-type]
368 | }
| ^
cc1: some warnings being treated as errors
vim +/kfree +203 drivers/accel/amdxdna/amdxdna_mailbox.c
194
195 static int mailbox_release_msg(int id, void *p, void *data)
196 {
197 struct mailbox_channel *mb_chann = data;
198 struct mailbox_msg *mb_msg = p;
199
200 MB_DBG(mb_chann, "msg_id 0x%x msg opcode 0x%x",
201 mb_msg->pkg.header.id, mb_msg->pkg.header.opcode);
202 mb_msg->notify_cb(mb_msg->handle, NULL, 0);
> 203 kfree(mb_msg);
204
205 return 0;
206 }
207
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2025-02-15 18:30 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=202502160209.WZSMNh1N-lkp@intel.com \
--to=lkp@intel.com \
--cc=George.Yang@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lizhi.hou@amd.com \
--cc=min.ma@amd.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=quic_jhugo@quicinc.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
all inboxes | Powered by JetHome®