public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
From: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
To: Su Hui <suhui@nfschina.com>,
	min.ma@amd.com, lizhi.hou@amd.com, ogabbay@kernel.org
Cc: quic_jhugo@quicinc.com, George.Yang@amd.com,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] accel/amdxdna: Add missing include linux/slab.h
Date: Mon, 10 Feb 2025 10:43:25 +0100	[thread overview]
Message-ID: <43eb87f7-0d47-43a7-b34a-9180f50de3b2@linux.intel.com> (raw)
In-Reply-To: <20250208080548.1062441-1-suhui@nfschina.com>

Hi,

please move the header to the include block above an keep it sorted:
#include <linux/iopoll.h>
-->#include <linux/slab.h><--
#include <linux/xarray.h>


On 2/8/2025 9:05 AM, Su Hui wrote:
> 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"
>  


  reply	other threads:[~2025-02-10  9:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-08  8:05 [PATCH] accel/amdxdna: Add missing include linux/slab.h Su Hui
2025-02-10  9:43 ` Jacek Lawrynowicz [this message]
2025-02-11  1:44   ` Su Hui
2025-02-10 16:28 ` Lizhi Hou

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=43eb87f7-0d47-43a7-b34a-9180f50de3b2@linux.intel.com \
    --to=jacek.lawrynowicz@linux.intel.com \
    --cc=George.Yang@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kernel-janitors@vger.kernel.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 \
    --cc=suhui@nfschina.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