Skip to contentSkip to conversation

drm/amd/amdgpu: fix build failure due to implicit declaration

PATCH New Sudip Mukherjee 1 participant 1 message Aug 4, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amd/amdgpu: fix build failure due to implicit declaration

The builds for alpha and mips allmodconfig fails with the error:

drivers/gpu/drm/amd/amdgpu/psp_v13_0.c:534:23:
error: implicit declaration of function 'vmalloc'; did you mean 'kvmalloc'? [-Werror=implicit-function-declaration]

drivers/gpu/drm/amd/amdgpu/psp_v13_0.c:534:21:
error: assignment to 'void *' from 'int' makes pointer from integer without a cast [-Werror=int-conversion]

drivers/gpu/drm/amd/amdgpu/psp_v13_0.c:545:33: error: implicit declaration
of function 'vfree'; did you mean 'kvfree'? [-Werror=implicit-function-declaration]

Add the header file for vmalloc and vfree.

---
 drivers/gpu/drm/amd/amdgpu/psp_v13_0.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/psp_v13_0.c +1 -0
index 63b2d32545cc..726a5bba40b2 100644
@@ -22,6 +22,7 @@
  */
 #include <linux/dev_printk.h>
 #include <drm/drm_drv.h>
+#include <linux/vmalloc.h>
 #include "amdgpu.h"
 #include "amdgpu_psp.h"
 #include "amdgpu_ucode.h"
Signature · 1 line
2.30.2