drm/amd/display: include linux/slab.h where needed
Subsystems (3)
PATCH 1/1 drm/amd/display: include linux/slab.h where needed
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.
--- drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c +2 -0
@@ -23,6 +23,8 @@* */ +#include <linux/slab.h> +#include "dm_services.h" #include "dc.h"
Signature · 6 lines
2.20.0 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 11 lines · Arnd Bergmann
Calling
kzalloc()and related functions requires thelinux/slab.hheader 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 <[email protected]>
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
Quoted 18 lines
--- drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c | 2 ++ 1 file changed, 2 insertions(+)drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c +2
-0@@ -23,6 +23,8 @@* */ +#include <linux/slab.h> +#include "dm_services.h" #include "dc.h"
Quoted 9 lines · Nicholas
Quoted 7 lines · Arnd Bergmann
Calling
kzalloc()and related functions requires thelinux/slab.hheader 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);
Quoted 6 lines
Quoted 4 lines
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 <[email protected]>What version of the kernel are you building?
This is v5.5-rc1, plus some local patches.
Quoted 7 lines
We have:
#include <
linux/slab.h>in
os_types.hwhich gets included as part of this file:#include <
dc.h> -> #include <dc_types.h> -> #include <os_types.h>
I don't see linux/slab.h in os_types.h. I now see that commit 4fc4dca8320e ("drm/amd: drop use of drmp.h in os_types.h") was merged into linux-5.3, which may have caused this.
I also don't see anything in os_types.h that needs linux/slab.h.
Arnd
Alex Deucher
AppliedApplied. Thanks!
Alex
Quoted 32 lines · Arnd Bergmann
Calling
kzalloc()and related functions requires thelinux/slab.hheader 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 <[email protected]>--- drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c | 2 ++ 1 file changed, 2 insertions(+)drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c +2
-1@@ -23,6 +23,8 @@* */ +#include <linux/slab.h> +#include "dm_services.h" #include "dc.h" --2.20.0
Quoted 4 lines
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx