[PATCH 2/2] drm/print: drop include seq_file.h
Noralf Trønnes
noralf at tronnes.org
Thu Apr 25 19:30:17 UTC 2024
On 4/22/24 14:10, Jani Nikula wrote:
> Never include where a forward declaration will suffice.
>
> Reviewed-by: Andrzej Hajda <andrzej.hajda at intel.com>
> Acked-by: Maxime Ripard <mripard at kernel.org>
> Link: https://patchwork.freedesktop.org/patch/msgid/20240410141434.157908-2-jani.nikula@intel.com
> Signed-off-by: Jani Nikula <jani.nikula at intel.com>
> ---
> 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.
More information about the dri-devel
mailing list