All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@kernel.org>
To: Min Ma <min.ma@amd.com>, Lizhi Hou <lizhi.hou@amd.com>,
	Oded Gabbay <ogabbay@kernel.org>,
	Jeffrey Hugo <quic_jhugo@quicinc.com>
Cc: Arnd Bergmann <arnd@arndb.de>, George Yang <George.Yang@amd.com>,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: [PATCH 2/2] accel/amdxdna: add missing includes
Date: Fri, 13 Dec 2024 10:02:55 +0100	[thread overview]
Message-ID: <20241213090259.68492-2-arnd@kernel.org> (raw)
In-Reply-To: <20241213090259.68492-1-arnd@kernel.org>

From: Arnd Bergmann <arnd@arndb.de>

This driver fails to build in random configurations:

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'? [-Wimplicit-function-declaration]
  395 |                         disable_irq(mb_chann->msix_irq);
      |                         ^~~~~~~~~~~
drivers/accel/amdxdna/aie2_solver.c: In function 'remove_partition_node':
drivers/accel/amdxdna/aie2_solver.c:121:9: error: implicit declaration of function 'kfree' [-Wimplicit-function-declaration]
  121 |         kfree(pt_node);
      |         ^~~~~
drivers/accel/amdxdna/aie2_solver.c: In function 'get_free_partition':
drivers/accel/amdxdna/aie2_solver.c:153:19: error: implicit declaration of function 'kzalloc' [-Wimplicit-function-declaration]
  153 |         pt_node = kzalloc(sizeof(*pt_node), GFP_KERNEL);

Include the headers that have the necessary declarations.

Fixes: c88d3325ae69 ("accel/amdxdna: Add hardware resource solver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>

amdxdna: includ linux/interrupt.h

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/accel/amdxdna/aie2_solver.c     | 1 +
 drivers/accel/amdxdna/amdxdna_mailbox.c | 1 +
 2 files changed, 2 insertions(+)

diff --git a/drivers/accel/amdxdna/aie2_solver.c b/drivers/accel/amdxdna/aie2_solver.c
index a537c66589a4..0bbf91cad334 100644
--- a/drivers/accel/amdxdna/aie2_solver.c
+++ b/drivers/accel/amdxdna/aie2_solver.c
@@ -8,6 +8,7 @@
 #include <drm/drm_print.h>
 #include <linux/bitops.h>
 #include <linux/bitmap.h>
+#include <linux/slab.h>
 
 #include "aie2_solver.h"
 
diff --git a/drivers/accel/amdxdna/amdxdna_mailbox.c b/drivers/accel/amdxdna/amdxdna_mailbox.c
index 415d99abaaa3..41bbc5796e11 100644
--- a/drivers/accel/amdxdna/amdxdna_mailbox.c
+++ b/drivers/accel/amdxdna/amdxdna_mailbox.c
@@ -7,6 +7,7 @@
 #include <drm/drm_managed.h>
 #include <linux/bitfield.h>
 #include <linux/iopoll.h>
+#include <linux/interrupt.h>
 
 #define CREATE_TRACE_POINTS
 #include <trace/events/amdxdna.h>
-- 
2.39.5


  reply	other threads:[~2024-12-13  9:03 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-13  9:02 [PATCH 1/2] accel/amdxdna: use modern PM helpers Arnd Bergmann
2024-12-13  9:02 ` Arnd Bergmann [this message]
2024-12-13 17:10   ` [PATCH 2/2] accel/amdxdna: add missing includes Jeffrey Hugo
2024-12-13 17:07 ` [PATCH 1/2] accel/amdxdna: use modern PM helpers Jeffrey Hugo
2024-12-13 17:41   ` Lizhi Hou
2024-12-13 17:49     ` Jeffrey Hugo
2024-12-13 17:57       ` Lizhi Hou
2024-12-13 18:11         ` Jeffrey Hugo

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=20241213090259.68492-2-arnd@kernel.org \
    --to=arnd@kernel.org \
    --cc=George.Yang@amd.com \
    --cc=arnd@arndb.de \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizhi.hou@amd.com \
    --cc=min.ma@amd.com \
    --cc=ogabbay@kernel.org \
    --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 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.