public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] accel/amdxdna: Add missing include linux/slab.h
@ 2025-02-08  8:05 Su Hui
  2025-02-10  9:43 ` Jacek Lawrynowicz
  2025-02-10 16:28 ` Lizhi Hou
  0 siblings, 2 replies; 4+ messages in thread
From: Su Hui @ 2025-02-08  8:05 UTC (permalink / raw)
  To: min.ma, lizhi.hou, ogabbay
  Cc: Su Hui, quic_jhugo, George.Yang, dri-devel, linux-kernel,
	kernel-janitors

When compiling without CONFIG_IA32_EMULATION, there are some errors:

drivers/accel/amdxdna/amdxdna_mailbox.c: In function ‘mailbox_release_msg’:
drivers/accel/amdxdna/amdxdna_mailbox.c:197:2: error: implicit declaration
of function ‘kfree’.
  197 |  kfree(mb_msg);
      |  ^~~~~
drivers/accel/amdxdna/amdxdna_mailbox.c: In function ‘xdna_mailbox_send_msg’:
drivers/accel/amdxdna/amdxdna_mailbox.c:418:11: error:implicit declaration
of function ‘kzalloc’.
  418 |  mb_msg = kzalloc(sizeof(*mb_msg) + pkg_size, GFP_KERNEL);
      |           ^~~~~~~

Add the missing include.

Fixes: b87f920b9344 ("accel/amdxdna: Support hardware mailbox")
Signed-off-by: Su Hui <suhui@nfschina.com>
---
 drivers/accel/amdxdna/amdxdna_mailbox.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/accel/amdxdna/amdxdna_mailbox.c b/drivers/accel/amdxdna/amdxdna_mailbox.c
index 814b16bb1953..80b4b20addd6 100644
--- a/drivers/accel/amdxdna/amdxdna_mailbox.c
+++ b/drivers/accel/amdxdna/amdxdna_mailbox.c
@@ -12,6 +12,7 @@
 
 #define CREATE_TRACE_POINTS
 #include <trace/events/amdxdna.h>
+#include <linux/slab.h>
 
 #include "amdxdna_mailbox.h"
 
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-02-11  1:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-08  8:05 [PATCH] accel/amdxdna: Add missing include linux/slab.h Su Hui
2025-02-10  9:43 ` Jacek Lawrynowicz
2025-02-11  1:44   ` Su Hui
2025-02-10 16:28 ` Lizhi Hou

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox