linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: Thomas Zimmermann <tzimmermann@suse.de>
Cc: daniel@ffwll.ch, airlied@gmail.com,
	dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org,
	linux-aspeed@lists.ozlabs.org,
	linux-arm-kernel@lists.infradead.org, linux-mips@vger.kernel.org,
	nouveau@lists.freedesktop.org,
	linux-rockchip@lists.infradead.org,
	linux-renesas-soc@vger.kernel.org, linux-sunxi@lists.linux.dev
Subject: Re: [PATCH 02/22] drm: Remove unnecessary include statements for drm_crtc_helper.h
Date: Mon, 16 Jan 2023 21:15:47 +0100	[thread overview]
Message-ID: <Y8Wwcy3LuknhDQz1@ravnborg.org> (raw)
In-Reply-To: <20230116131235.18917-3-tzimmermann@suse.de>

Hi Thomas.

On Mon, Jan 16, 2023 at 02:12:15PM +0100, Thomas Zimmermann wrote:
> Several DRM core and helper source files include drm_crtc_helper.h
> without needing it or only to get its transitive include statements;
> leading to unnecessary compile-time dependencies.
> 
> Directly include required headers and drop drm_crtc_helper.h where
> possible. The header file, drm_fixed.h, includes <linux/kernel.h>
> for lower_32_bits().
> 
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> ---
>  drivers/gpu/drm/drm_crtc_helper.c  | 1 -
>  drivers/gpu/drm/drm_lease.c        | 2 +-
>  drivers/gpu/drm/drm_plane_helper.c | 1 -
>  include/drm/drm_fixed.h            | 1 +
>  4 files changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c
> index a209659a996c..e7a23e18140c 100644
> --- a/drivers/gpu/drm/drm_crtc_helper.c
> +++ b/drivers/gpu/drm/drm_crtc_helper.c
> @@ -39,7 +39,6 @@
>  #include <drm/drm_atomic_uapi.h>
>  #include <drm/drm_bridge.h>
>  #include <drm/drm_crtc.h>
> -#include <drm/drm_crtc_helper.h>

drm_crtc_helper.c may not require drm/drm_crtc_helper.h, but it should
include it so we get a warning in case there is a mismatch between the
header file and the implementation.
I think sparse would also complain that the function is not declared
or something like that.

With this fixed:
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>

>  #include <drm/drm_drv.h>
>  #include <drm/drm_edid.h>
>  #include <drm/drm_encoder.h>
> diff --git a/drivers/gpu/drm/drm_lease.c b/drivers/gpu/drm/drm_lease.c
> index 08ab75303a00..150fe1555068 100644
> --- a/drivers/gpu/drm/drm_lease.c
> +++ b/drivers/gpu/drm/drm_lease.c
> @@ -6,7 +6,7 @@
>  #include <linux/uaccess.h>
>  
>  #include <drm/drm_auth.h>
> -#include <drm/drm_crtc_helper.h>
> +#include <drm/drm_crtc.h>
>  #include <drm/drm_drv.h>
>  #include <drm/drm_file.h>
>  #include <drm/drm_lease.h>
> diff --git a/drivers/gpu/drm/drm_plane_helper.c b/drivers/gpu/drm/drm_plane_helper.c
> index ba6a9136a065..c91e454eba09 100644
> --- a/drivers/gpu/drm/drm_plane_helper.c
> +++ b/drivers/gpu/drm/drm_plane_helper.c
> @@ -28,7 +28,6 @@
>  #include <drm/drm_atomic.h>
>  #include <drm/drm_atomic_helper.h>
>  #include <drm/drm_atomic_uapi.h>
> -#include <drm/drm_crtc_helper.h>
>  #include <drm/drm_device.h>
>  #include <drm/drm_drv.h>
>  #include <drm/drm_encoder.h>
> diff --git a/include/drm/drm_fixed.h b/include/drm/drm_fixed.h
> index 553210c02ee0..255645c1f9a8 100644
> --- a/include/drm/drm_fixed.h
> +++ b/include/drm/drm_fixed.h
> @@ -25,6 +25,7 @@
>  #ifndef DRM_FIXED_H
>  #define DRM_FIXED_H
>  
> +#include <linux/kernel.h>
>  #include <linux/math64.h>
>  
>  typedef union dfixed {
> -- 
> 2.39.0

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2023-01-16 20:17 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-16 13:12 [PATCH 00/22] drm: Remove includes for drm_crtc_helper.h Thomas Zimmermann
2023-01-16 13:12 ` [PATCH 01/22] drm/amdgpu: Fix coding style Thomas Zimmermann
2023-01-16 18:05   ` Alex Deucher
2023-01-16 13:12 ` [PATCH 02/22] drm: Remove unnecessary include statements for drm_crtc_helper.h Thomas Zimmermann
2023-01-16 20:15   ` Sam Ravnborg [this message]
2023-01-16 13:12 ` [PATCH 03/22] drm/amdgpu: " Thomas Zimmermann
2023-01-16 20:18   ` Sam Ravnborg
2023-01-16 13:12 ` [PATCH 04/22] drm/arm/komeda: " Thomas Zimmermann
2023-01-16 13:12 ` [PATCH 05/22] drm/aspeed: " Thomas Zimmermann
2023-01-16 20:27   ` Sam Ravnborg
2023-01-16 13:12 ` [PATCH 06/22] drm/ast: " Thomas Zimmermann
2023-01-16 13:12 ` [PATCH 07/22] drm/bridge: " Thomas Zimmermann
2023-01-16 13:12 ` [PATCH 08/22] drm/gma500: " Thomas Zimmermann
2023-01-16 13:12 ` [PATCH 09/22] drm/i2c/ch7006: " Thomas Zimmermann
2023-01-16 13:12 ` [PATCH 10/22] drm/ingenic: " Thomas Zimmermann
2023-01-16 13:12 ` [PATCH 11/22] drm/kmb: " Thomas Zimmermann
2023-01-16 13:12 ` [PATCH 12/22] drm/logicvc: " Thomas Zimmermann
2023-01-16 13:12 ` [PATCH 13/22] drm/nouveau: " Thomas Zimmermann
2023-01-16 13:12 ` [PATCH 14/22] drm/radeon: " Thomas Zimmermann
2023-01-16 13:12 ` [PATCH 15/22] drm/rockchip: " Thomas Zimmermann
2023-01-16 13:12 ` [PATCH 16/22] drm/shmobile: " Thomas Zimmermann
2023-01-16 13:12 ` [PATCH 17/22] drm/sprd: " Thomas Zimmermann
2023-01-16 13:12 ` [PATCH 18/22] drm/sun4i: " Thomas Zimmermann
2023-01-16 20:31   ` Sam Ravnborg
2023-01-16 13:12 ` [PATCH 19/22] drm/tidss: " Thomas Zimmermann
2023-01-16 13:12 ` [PATCH 20/22] drm/udl: " Thomas Zimmermann
2023-01-16 13:12 ` [PATCH 21/22] drm/vboxvideo: " Thomas Zimmermann
2023-01-16 13:12 ` [PATCH 22/22] drm/crtc-helper: Remove most include statements from drm_crtc_helper.h Thomas Zimmermann
2023-01-16 16:19 ` [PATCH 00/22] drm: Remove includes for drm_crtc_helper.h Jani Nikula
2023-01-16 18:37   ` Alex Deucher
2023-01-17  8:41     ` Thomas Zimmermann
2023-01-16 20:47 ` Sam Ravnborg
2023-01-17  8:45   ` Thomas Zimmermann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y8Wwcy3LuknhDQz1@ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=airlied@gmail.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-aspeed@lists.ozlabs.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=linux-sunxi@lists.linux.dev \
    --cc=nouveau@lists.freedesktop.org \
    --cc=tzimmermann@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).