Re: [PATCH 2/2] drm/print: drop include seq_file.h

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

 




On 4/22/24 14:10, Jani Nikula wrote:
> Never include where a forward declaration will suffice.
> 
> Reviewed-by: Andrzej Hajda <andrzej.hajda@xxxxxxxxx>
> Acked-by: Maxime Ripard <mripard@xxxxxxxxxx>
> Link: https://patchwork.freedesktop.org/patch/msgid/20240410141434.157908-2-jani.nikula@xxxxxxxxx
> Signed-off-by: Jani Nikula <jani.nikula@xxxxxxxxx>
> ---
>  include/drm/drm_print.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/drm/drm_print.h b/include/drm/drm_print.h
> index 561c3b96b6fd..089950ad8681 100644
> --- a/include/drm/drm_print.h
> +++ b/include/drm/drm_print.h
> @@ -28,7 +28,6 @@
>  
>  #include <linux/compiler.h>
>  #include <linux/printk.h>
> -#include <linux/seq_file.h>
>  #include <linux/device.h>
>  #include <linux/dynamic_debug.h>
>  
> @@ -36,6 +35,7 @@
>  
>  struct debugfs_regset32;
>  struct drm_device;
> +struct seq_file;
>  
>  /* Do *not* use outside of drm_print.[ch]! */
>  extern unsigned long __drm_debug;

Looks like this broke komeda and omapdrm on arm:

/home/notro/develop/dim-linux/src/drivers/gpu/drm/arm/display/komeda/komeda_pipeline.c:
In function ‘komeda_pipeline_dump_register’:
/home/notro/develop/dim-linux/src/drivers/gpu/drm/arm/display/komeda/komeda_pipeline.c:366:9:
error: implicit declaration of function ‘seq_printf’; did you mean
‘drm_printf’? [-Werror=implicit-function-declaration]
  366 |         seq_printf(sf, "\n======== Pipeline-%d ==========\n",
pipe->id);
      |         ^~~~~~~~~~
      |         drm_printf

/home/notro/develop/dim-linux/src/drivers/gpu/drm/omapdrm/omap_fb.c: In
function ‘omap_framebuffer_describe’:
/home/notro/develop/dim-linux/src/drivers/gpu/drm/omapdrm/omap_fb.c:325:9:
error: implicit declaration of function ‘seq_printf’; did you mean
‘drm_printf’? [-Werror=implicit-function-declaration]
  325 |         seq_printf(m, "fb: %dx%d@%4.4s\n", fb->width, fb->height,
      |         ^~~~~~~~~~
      |         drm_printf

Noralf.



[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