Skip to contentSkip to conversation

drm/i915: fix header file inclusion for might_alloc()

PATCH Superseded Andi Shyti 1 participant 2 messages Jan 24, 2022

Subsystems (2)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Andi Shyti

author
#0 lore raw

PATCH v2 1/1 drm/i915: fix header file inclusion for might_alloc()

Replace "linux/slab.h" with "linux/sched/mm.h" header inclusion as the first is not required, while the second, if not included, prdouces the following error:

drivers/gpu/drm/i915/i915_vma_resource.c: In function ‘i915_vma_resource_bind_dep_await’:
drivers/gpu/drm/i915/i915_vma_resource.c:381:9: error: implicit declaration of function ‘might_alloc’; did you mean ‘might_lock’? [-Werror=implicit-function-declaration]

  381 |         might_alloc(gfp);
      |         ^~~~~~~~~~~
      |         might_lock
Fixes 2f6b90da9192 ("drm/i915: Use vma resources for async unbinding")
Cc Thomas Hellström <[email protected]>

---
Hi,

in V2 I just added the Fixes tag (I think I got the right commit) and added Thomas r-b.

Andi

 drivers/gpu/drm/i915/i915_vma_resource.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_vma_resource.c +1 -1
index 1f41c0c699eb..bbb0ff14272f 100644
@@ -4,7 +4,7 @@
  */
 
 #include <linux/interval_tree_generic.h>
-#include <linux/slab.h>
+#include <linux/sched/mm.h>
 
 #include "i915_sw_fence.h"
 #include "i915_vma_resource.h"
Signature · 1 line
2.34.1
author
#1 lore raw

Sorry for spamming! Just called the command from the history

Quoted 40 lines · Andi Shyti

Replace "linux/slab.h" with "linux/sched/mm.h" header inclusion as the first is not required, while the second, if not included, prdouces the following error:

drivers/gpu/drm/i915/i915_vma_resource.c: In function ‘i915_vma_resource_bind_dep_await’:
drivers/gpu/drm/i915/i915_vma_resource.c:381:9: error: implicit declaration of function ‘might_alloc’; did you mean ‘might_lock’? [-Werror=implicit-function-declaration]

  381 |         might_alloc(gfp);
      |         ^~~~~~~~~~~
      |         might_lock
Fixes 2f6b90da9192 ("drm/i915: Use vma resources for async unbinding")
Cc Thomas Hellström <[email protected]>

---
Hi,

in V2 I just added the Fixes tag (I think I got the right commit) and added Thomas r-b.

Andi

 drivers/gpu/drm/i915/i915_vma_resource.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_vma_resource.c +1 -1
index 1f41c0c699eb..bbb0ff14272f 100644
@@ -4,7 +4,7 @@
  */
 
 #include <linux/interval_tree_generic.h>
-#include <linux/slab.h>
+#include <linux/sched/mm.h>
 
 #include "i915_sw_fence.h"
 #include "i915_vma_resource.h"
Signature · 1 line
2.34.1