From: "Kazlauskas, Nicholas" <nicholas.kazlauskas@amd.com>
To: "Arnd Bergmann" <arnd@arndb.de>,
"Harry Wentland" <harry.wentland@amd.com>,
"Leo Li" <sunpeng.li@amd.com>,
"Alex Deucher" <alexander.deucher@amd.com>,
"Christian König" <christian.koenig@amd.com>,
"David (ChunMing) Zhou" <David1.Zhou@amd.com>,
"David Airlie" <airlied@linux.ie>,
"Daniel Vetter" <daniel@ffwll.ch>
Cc: Eric Yang <Eric.Yang2@amd.com>, Roman Li <Roman.Li@amd.com>,
amd-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org,
Michael Strauss <michael.strauss@amd.com>,
dri-devel@lists.freedesktop.org,
Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Subject: Re: [PATCH] drm/amd/display: include linux/slab.h where needed
Date: Tue, 10 Dec 2019 15:30:21 -0500 [thread overview]
Message-ID: <cded03ab-40fe-a904-7b1f-5b3623bb7af4@amd.com> (raw)
In-Reply-To: <20191210195941.931745-1-arnd@arndb.de>
On 2019-12-10 2:59 p.m., Arnd Bergmann wrote:
> Calling kzalloc() and related functions requires the
> linux/slab.h header to be included:
>
> drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c: In function 'dcn21_ipp_create':
> drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c:679:3: error: implicit declaration of function 'kzalloc'; did you mean 'd_alloc'? [-Werror=implicit-function-declaration]
> kzalloc(sizeof(struct dcn10_ipp), GFP_KERNEL);
>
> A lot of other headers also miss a direct include in this file,
> but this is the only one that causes a problem for now.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
What version of the kernel are you building?
We have:
#include <linux/slab.h>
in os_types.h which gets included as part of this file:
#include <dc.h> -> #include <dc_types.h> -> #include <os_types.h>
Nicholas Kazlauskas
> ---
> drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c b/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c
> index 906c84e6b49b..af57885bbff2 100644
> --- a/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c
> +++ b/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c
> @@ -23,6 +23,8 @@
> *
> */
>
> +#include <linux/slab.h>
> +
> #include "dm_services.h"
> #include "dc.h"
>
>
next prev parent reply other threads:[~2019-12-10 20:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-10 19:59 Arnd Bergmann
2019-12-10 20:30 ` Kazlauskas, Nicholas [this message]
2019-12-10 20:51 ` Arnd Bergmann
2019-12-10 22:18 ` Alex Deucher
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=cded03ab-40fe-a904-7b1f-5b3623bb7af4@amd.com \
--to=nicholas.kazlauskas@amd.com \
--cc=Bhawanpreet.Lakha@amd.com \
--cc=David1.Zhou@amd.com \
--cc=Eric.Yang2@amd.com \
--cc=Roman.Li@amd.com \
--cc=airlied@linux.ie \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=arnd@arndb.de \
--cc=christian.koenig@amd.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=harry.wentland@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=michael.strauss@amd.com \
--cc=sunpeng.li@amd.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®