mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Zimmermann <tzimmermann@suse.de>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>
Subject: Re: [PATCH v1 1/1] drm: Replace kernel.h with the necessary inclusions
Date: Wed, 10 Nov 2021 14:54:37 +0100	[thread overview]
Message-ID: <887a15cb-3a3b-4ba2-aa0f-a241e70a19fa@suse.de> (raw)
In-Reply-To: <20211110102423.54282-1-andriy.shevchenko@linux.intel.com>


[-- Attachment #1.1: Type: text/plain, Size: 2397 bytes --]

Hi

Am 10.11.21 um 11:24 schrieb Andy Shevchenko:
> When kernel.h is used in the headers it adds a lot into dependency hell,
> especially when there are circular dependencies are involved.
> 
> Replace kernel.h inclusion with the list of what is really being used.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>   include/drm/drm_gem_ttm_helper.h  | 2 +-
>   include/drm/drm_gem_vram_helper.h | 2 +-
>   include/drm/drm_mm.h              | 4 +++-
>   3 files changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/include/drm/drm_gem_ttm_helper.h b/include/drm/drm_gem_ttm_helper.h
> index c1aa02bd4c89..78040f6cc6f3 100644
> --- a/include/drm/drm_gem_ttm_helper.h
> +++ b/include/drm/drm_gem_ttm_helper.h
> @@ -3,7 +3,7 @@
>   #ifndef DRM_GEM_TTM_HELPER_H
>   #define DRM_GEM_TTM_HELPER_H
>   
> -#include <linux/kernel.h>
> +#include <linux/container_of.h>

I built this patch on a recent drm-misc-next, but there's no 
linux/container_of.h

Best regards
Thomas

>   
>   #include <drm/drm_device.h>
>   #include <drm/drm_gem.h>
> diff --git a/include/drm/drm_gem_vram_helper.h b/include/drm/drm_gem_vram_helper.h
> index d3cf06c9af65..b4ce27a72773 100644
> --- a/include/drm/drm_gem_vram_helper.h
> +++ b/include/drm/drm_gem_vram_helper.h
> @@ -11,8 +11,8 @@
>   #include <drm/ttm/ttm_bo_api.h>
>   #include <drm/ttm/ttm_bo_driver.h>
>   
> +#include <linux/container_of.h>
>   #include <linux/dma-buf-map.h>
> -#include <linux/kernel.h> /* for container_of() */
>   
>   struct drm_mode_create_dumb;
>   struct drm_plane;
> diff --git a/include/drm/drm_mm.h b/include/drm/drm_mm.h
> index 9b4292f229c6..ac33ba1b18bc 100644
> --- a/include/drm/drm_mm.h
> +++ b/include/drm/drm_mm.h
> @@ -39,13 +39,15 @@
>    */
>   #include <linux/bug.h>
>   #include <linux/rbtree.h>
> -#include <linux/kernel.h>
> +#include <linux/limits.h>
>   #include <linux/mm_types.h>
>   #include <linux/list.h>
>   #include <linux/spinlock.h>
>   #ifdef CONFIG_DRM_DEBUG_MM
>   #include <linux/stackdepot.h>
>   #endif
> +#include <linux/types.h>
> +
>   #include <drm/drm_print.h>
>   
>   #ifdef CONFIG_DRM_DEBUG_MM
> 

-- 
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Ivo Totev

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]

  reply	other threads:[~2021-11-10 13:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-10 10:24 Andy Shevchenko
2021-11-10 13:54 ` Thomas Zimmermann [this message]
2021-11-10 16:34   ` Andy Shevchenko
2021-11-10 16:39     ` Thomas Zimmermann
2021-11-15 11:35       ` Andy Shevchenko
2021-11-23 16:32         ` Andy Shevchenko
2021-12-09 12:24           ` Andy Shevchenko
2021-12-09 12:53             ` 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=887a15cb-3a3b-4ba2-aa0f-a241e70a19fa@suse.de \
    --to=tzimmermann@suse.de \
    --cc=airlied@linux.ie \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    /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

all inboxes | Powered by JetHome®