diff mbox series

[v3,4/5] drm/framebuffer: Include linux/sched.h in header file

Message ID 20181128212713.43500-5-noralf@tronnes.org (mailing list archive)
State New, archived
Headers show
Series drm/cma-helper drivers: Use drm_fbdev_generic_setup() | expand

Commit Message

Noralf Trønnes Nov. 28, 2018, 9:27 p.m. UTC
A cleanup of the includes in drm_fb_cma_helper resulted in:

  CC [M]  drivers/gpu/drm/drm_fb_cma_helper.o
In file included from drivers/gpu/drm/drm_fb_cma_helper.c:21:0:
include/drm/drm_framebuffer.h:128:12: error: ‘TASK_COMM_LEN’ undeclared here (not in a function)
  char comm[TASK_COMM_LEN];

Fix it by including linux/sched.h.

Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
---
 include/drm/drm_framebuffer.h | 1 +
 1 file changed, 1 insertion(+)

Comments

Daniel Vetter Nov. 29, 2018, 9:35 a.m. UTC | #1
On Wed, Nov 28, 2018 at 10:27:12PM +0100, Noralf Trønnes wrote:
> A cleanup of the includes in drm_fb_cma_helper resulted in:
> 
>   CC [M]  drivers/gpu/drm/drm_fb_cma_helper.o
> In file included from drivers/gpu/drm/drm_fb_cma_helper.c:21:0:
> include/drm/drm_framebuffer.h:128:12: error: ‘TASK_COMM_LEN’ undeclared here (not in a function)
>   char comm[TASK_COMM_LEN];

Huh, I'm not seeing this. And we have 3 defconfigs for compile-testing,
they still seem to work. Which patch broke this? Should be quick to bisect
since fully automateable ... And would be good to have the Fixes: tag for
this.

Anyway, Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> 
> Fix it by including linux/sched.h.
> 
> Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
> ---
>  include/drm/drm_framebuffer.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/include/drm/drm_framebuffer.h b/include/drm/drm_framebuffer.h
> index c94acedfb08e..d4ce58568fa6 100644
> --- a/include/drm/drm_framebuffer.h
> +++ b/include/drm/drm_framebuffer.h
> @@ -25,6 +25,7 @@
>  
>  #include <linux/list.h>
>  #include <linux/ctype.h>
> +#include <linux/sched.h>
>  #include <drm/drm_mode_object.h>
>  
>  struct drm_framebuffer;
> -- 
> 2.15.1
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
Noralf Trønnes Nov. 29, 2018, 3:14 p.m. UTC | #2
Den 29.11.2018 10.35, skrev Daniel Vetter:
> On Wed, Nov 28, 2018 at 10:27:12PM +0100, Noralf Trønnes wrote:
>> A cleanup of the includes in drm_fb_cma_helper resulted in:
>>
>>    CC [M]  drivers/gpu/drm/drm_fb_cma_helper.o
>> In file included from drivers/gpu/drm/drm_fb_cma_helper.c:21:0:
>> include/drm/drm_framebuffer.h:128:12: error: ‘TASK_COMM_LEN’ undeclared here (not in a function)
>>    char comm[TASK_COMM_LEN];
> Huh, I'm not seeing this. And we have 3 defconfigs for compile-testing,
> they still seem to work. Which patch broke this? Should be quick to bisect
> since fully automateable ... And would be good to have the Fixes: tag for
> this.
>
> Anyway, Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>


My wording isn't optimal I see. It's the cleanup in the next patch that
uncovered this.

Maybe this is better:

drm_framebuffer.h references TASK_COMM_LEN but doesn't include the header
that defines this macro. Include linux/sched.h so the user doesn't have
to make sure it's present.


Noralf.

>> Fix it by including linux/sched.h.
>>
>> Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
>> ---
>>   include/drm/drm_framebuffer.h | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/include/drm/drm_framebuffer.h b/include/drm/drm_framebuffer.h
>> index c94acedfb08e..d4ce58568fa6 100644
>> --- a/include/drm/drm_framebuffer.h
>> +++ b/include/drm/drm_framebuffer.h
>> @@ -25,6 +25,7 @@
>>   
>>   #include <linux/list.h>
>>   #include <linux/ctype.h>
>> +#include <linux/sched.h>
>>   #include <drm/drm_mode_object.h>
>>   
>>   struct drm_framebuffer;
>> -- 
>> 2.15.1
>>
>> _______________________________________________
>> dri-devel mailing list
>> dri-devel@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/dri-devel
Daniel Vetter Nov. 29, 2018, 3:26 p.m. UTC | #3
On Thu, Nov 29, 2018 at 4:14 PM Noralf Trønnes <noralf@tronnes.org> wrote:
>
>
> Den 29.11.2018 10.35, skrev Daniel Vetter:
> > On Wed, Nov 28, 2018 at 10:27:12PM +0100, Noralf Trønnes wrote:
> >> A cleanup of the includes in drm_fb_cma_helper resulted in:
> >>
> >>    CC [M]  drivers/gpu/drm/drm_fb_cma_helper.o
> >> In file included from drivers/gpu/drm/drm_fb_cma_helper.c:21:0:
> >> include/drm/drm_framebuffer.h:128:12: error: ‘TASK_COMM_LEN’ undeclared here (not in a function)
> >>    char comm[TASK_COMM_LEN];
> > Huh, I'm not seeing this. And we have 3 defconfigs for compile-testing,
> > they still seem to work. Which patch broke this? Should be quick to bisect
> > since fully automateable ... And would be good to have the Fixes: tag for
> > this.
> >
> > Anyway, Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
>
>
> My wording isn't optimal I see. It's the cleanup in the next patch that
> uncovered this.
>
> Maybe this is better:
>
> drm_framebuffer.h references TASK_COMM_LEN but doesn't include the header
> that defines this macro. Include linux/sched.h so the user doesn't have
> to make sure it's present.

Yeah just include this, and we're good to go I think.
-Daniel

>
>
> Noralf.
>
> >> Fix it by including linux/sched.h.
> >>
> >> Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
> >> ---
> >>   include/drm/drm_framebuffer.h | 1 +
> >>   1 file changed, 1 insertion(+)
> >>
> >> diff --git a/include/drm/drm_framebuffer.h b/include/drm/drm_framebuffer.h
> >> index c94acedfb08e..d4ce58568fa6 100644
> >> --- a/include/drm/drm_framebuffer.h
> >> +++ b/include/drm/drm_framebuffer.h
> >> @@ -25,6 +25,7 @@
> >>
> >>   #include <linux/list.h>
> >>   #include <linux/ctype.h>
> >> +#include <linux/sched.h>
> >>   #include <drm/drm_mode_object.h>
> >>
> >>   struct drm_framebuffer;
> >> --
> >> 2.15.1
> >>
> >> _______________________________________________
> >> dri-devel mailing list
> >> dri-devel@lists.freedesktop.org
> >> https://lists.freedesktop.org/mailman/listinfo/dri-devel
diff mbox series

Patch

diff --git a/include/drm/drm_framebuffer.h b/include/drm/drm_framebuffer.h
index c94acedfb08e..d4ce58568fa6 100644
--- a/include/drm/drm_framebuffer.h
+++ b/include/drm/drm_framebuffer.h
@@ -25,6 +25,7 @@ 
 
 #include <linux/list.h>
 #include <linux/ctype.h>
+#include <linux/sched.h>
 #include <drm/drm_mode_object.h>
 
 struct drm_framebuffer;