Skip to contentSkip to conversation

accel/amdxdna: include linux/slab.h

PATCH Applied Arnd Bergmann 2 participants 2 messages Dec 18, 2024

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

PATCH v2 1/1 accel/amdxdna: include linux/slab.h

From: Arnd Bergmann <[email protected]>

This driver fails to build in random configurations:

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);

Add the missing include.

Fixes c88d3325ae69 ("accel/amdxdna: Add hardware resource solver")

---
This one is still needed, I had previously combined two missing includes in one patch

---
 drivers/accel/amdxdna/aie2_solver.c | 1 +
 1 file changed, 1 insertion(+)
drivers/accel/amdxdna/aie2_solver.c +1 -0
index 1939625d6027..2013d1f13aae 100644
@@ -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"
 
Signature · 1 line
2.39.5
Reviewed-by on v2 1/1 Applied
#1 lore raw
Quoted 12 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

This driver fails to build in random configurations:

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);

Quoted 7 lines

Add the missing include.

Fixes c88d3325ae69 ("accel/amdxdna: Add hardware resource solver")

---
This one is still needed, I had previously combined two missing includes in one patch

Applied to drm-misc-next.

221e29e197981 accel/amdxdna: include linux/slab.h

Quoted 16 lines
---
  drivers/accel/amdxdna/aie2_solver.c | 1 +
  1 file changed, 1 insertion(+)
drivers/accel/amdxdna/aie2_solver.c +1 -0
index 1939625d6027..2013d1f13aae 100644
@@ -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"