Re: [PATCH] drm/i915: fix header file inclusion for might_alloc()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2022-01-24 at 03:08 +0200, Andi Shyti wrote:
> 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
> 
> Signed-off-by: Andi Shyti <andi.shyti@xxxxxxxxxxxxxxx>

We'd need a Fixes: tag here?

> Cc: Thomas Hellström <thomas.hellstrom@xxxxxxxxxxxxxxx>

Reviewed-by: Thomas Hellström <thomas.hellstrom@xxxxxxxxxxxxxxx>


> ---
>  drivers/gpu/drm/i915/i915_vma_resource.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_vma_resource.c
> b/drivers/gpu/drm/i915/i915_vma_resource.c
> index 1f41c0c699eb..bbb0ff14272f 100644
> --- a/drivers/gpu/drm/i915/i915_vma_resource.c
> +++ b/drivers/gpu/drm/i915/i915_vma_resource.c
> @@ -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"





[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux