drm: Replace kernel.h with the necessary inclusions
Subsystems (2)
PATCH 1/1 drm: Replace kernel.h with the necessary inclusions
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.
--- 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(-)
include/drm/drm_gem_ttm_helper.h +1 -1
@@ -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> #include <drm/drm_device.h> #include <drm/drm_gem.h>
include/drm/drm_gem_vram_helper.h +1 -1
@@ -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 ;
include/drm/drm_mm.h +3 -1
@@ -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
Signature · 1 line
2.33.0
Thomas Zimmermann
maintainerHi
Am 10.11.21 um 11:24 schrieb Andy Shevchenko:
Quoted 17 lines
When
kernel.his used in the headers it adds a lot into dependency hell, especially when there are circular dependencies are involved.Replace
kernel.hinclusion with the list of what is really being used.Signed-off-by Andy Shevchenko <[email protected]>--- 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(-)include/drm/drm_gem_ttm_helper.h +0
-0
include/drm/drm_gem_ttm_helper.h line 6
Quoted 5 lines
include/drm/drm_gem_ttm_helper.h +1
-1@@ -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
Quoted 39 lines
include/drm/drm_gem_ttm_helper.h +0
-0#include <drm/drm_device.h> #include <drm/drm_gem.h> include/drm/drm_gem_vram_helper.h +1
-1@@ -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 ;include/drm/drm_mm.h +3
-1@@ -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
Signature · 6 lines
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
Quoted 5 lines · Thomas Zimmermann
Am 10.11.21 um 11:24 schrieb Andy Shevchenko:
Quoted 4 lines
When
kernel.his used in the headers it adds a lot into dependency hell, especially when there are circular dependencies are involved.Replace
kernel.hinclusion with the list of what is really being used.
...
Quoted 4 lines
Quoted 1 line
+#include <
linux/container_of.h>I built this patch on a recent drm-misc-next, but there's no
linux/container_of.h
Thank you for trying. It's in the upstream, whenever drm-misc-next switches to newer/newest upstream it will be there. I assume it will happen after v5.16-rc1?
Signature · 2 lines
With Best Regards, Andy Shevchenko
Hi
Am 10.11.21 um 17:34 schrieb Andy Shevchenko:
Quoted 9 lines · Thomas Zimmermann
Quoted 5 lines
Am 10.11.21 um 11:24 schrieb Andy Shevchenko:
Quoted 4 lines
When
kernel.his used in the headers it adds a lot into dependency hell, especially when there are circular dependencies are involved.Replace
kernel.hinclusion with the list of what is really being used....
Quoted 8 lines
Quoted 4 lines
Quoted 1 line
+#include <
linux/container_of.h>I built this patch on a recent drm-misc-next, but there's no
linux/container_of.hThank you for trying. It's in the upstream, whenever drm-misc-next switches to newer/newest upstream it will be there. I assume it will happen after v5.16-rc1?
Yes, we'll certainly backmerge soon after rc1 has been released. If I forget to add the patch then, please send a reminder.
Once the necessary headers are available, the patch is
Best regards
Thomas
Quoted 1 line
Signature · 6 lines
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
Quoted 3 lines · Thomas Zimmermann
Am 10.11.21 um 17:34 schrieb Andy Shevchenko:
Quoted 2 lines · Thomas Zimmermann
Quoted 1 line
Am 10.11.21 um 11:24 schrieb Andy Shevchenko:
...
Quoted 5 lines
Quoted 5 lines
Quoted 4 lines
Quoted 1 line
+#include <
linux/container_of.h>I built this patch on a recent drm-misc-next, but there's no
linux/container_of.h
Quoted 8 lines
Quoted 3 lines
Thank you for trying. It's in the upstream, whenever drm-misc-next switches to newer/newest upstream it will be there. I assume it will happen after v5.16-rc1?
Yes, we'll certainly backmerge soon after rc1 has been released. If I forget to add the patch then, please send a reminder.
Once the necessary headers are available,
$ git log --oneline v5.16-rc1 -- include/linux/container_of.h e1edc277e6f6 linux/container_of.h: switch to static_assert d2a8ebbf8192 kernel.h: split out container_of() and typeof_member() macros
Quoted 2 lines
the patch is
Thanks!
Signature · 2 lines
With Best Regards, Andy Shevchenko
Quoted 21 lines · Andy Shevchenko
Quoted 3 lines · Thomas Zimmermann
Am 10.11.21 um 17:34 schrieb Andy Shevchenko:
Quoted 2 lines · Thomas Zimmermann
Quoted 1 line
Am 10.11.21 um 11:24 schrieb Andy Shevchenko:
...
Quoted 5 lines
Quoted 5 lines
Quoted 4 lines
Quoted 1 line
+#include <
linux/container_of.h>I built this patch on a recent drm-misc-next, but there's no
linux/container_of.hQuoted 8 lines
Quoted 3 lines
Thank you for trying. It's in the upstream, whenever drm-misc-next switches to newer/newest upstream it will be there. I assume it will happen after v5.16-rc1?
Yes, we'll certainly backmerge soon after rc1 has been released. If I forget to add the patch then, please send a reminder.
Once the necessary headers are available,
Quoted 8 lines
$ git log --oneline v5.16-rc1 -- include/linux/container_of.h e1edc277e6f6 linux/container_of.h: switch to static_assert d2a8ebbf8192 kernel.h: split out container_of() and typeof_member() macrosQuoted 2 lines
the patch is
Thanks!
Maybe I misunderstood something, I thought that DRM people may apply this, is it incorrect assumption?
Signature · 2 lines
With Best Regards, Andy Shevchenko
Quoted 26 lines · Andy Shevchenko
Quoted 25 lines · Andy Shevchenko
Quoted 3 lines · Thomas Zimmermann
Am 10.11.21 um 17:34 schrieb Andy Shevchenko:
Quoted 2 lines · Thomas Zimmermann
Quoted 1 line
Am 10.11.21 um 11:24 schrieb Andy Shevchenko:
...
Quoted 5 lines
Quoted 5 lines
Quoted 4 lines
Quoted 1 line
+#include <
linux/container_of.h>I built this patch on a recent drm-misc-next, but there's no
linux/container_of.hQuoted 8 lines
Quoted 3 lines
Thank you for trying. It's in the upstream, whenever drm-misc-next switches to newer/newest upstream it will be there. I assume it will happen after v5.16-rc1?
Yes, we'll certainly backmerge soon after rc1 has been released. If I forget to add the patch then, please send a reminder.
Once the necessary headers are available,
$ git log --oneline v5.16-rc1 -- include/linux/container_of.h e1edc277e6f6 linux/container_of.h: switch to static_assert d2a8ebbf8192 kernel.h: split out container_of() and typeof_member() macros
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
the patch is
Thanks!
Maybe I misunderstood something, I thought that DRM people may apply this, is it incorrect assumption?
It still does not appear in Linux Next...
What should I do to move this forward, please?
Signature · 2 lines
With Best Regards, Andy Shevchenko
Thomas Zimmermann
maintainerHi
Am 09.12.21 um 13:24 schrieb Andy Shevchenko:
Quoted 30 lines · Andy Shevchenko
Quoted 29 lines · Andy Shevchenko
Quoted 28 lines · Thomas Zimmermann
Quoted 3 lines
Am 10.11.21 um 17:34 schrieb Andy Shevchenko:
Quoted 2 lines · Thomas Zimmermann
Quoted 1 line
Am 10.11.21 um 11:24 schrieb Andy Shevchenko:
...
Quoted 5 lines
Quoted 5 lines
Quoted 4 lines
Quoted 1 line
+#include <
linux/container_of.h>I built this patch on a recent drm-misc-next, but there's no
linux/container_of.hQuoted 8 lines
Quoted 3 lines
Thank you for trying. It's in the upstream, whenever drm-misc-next switches to newer/newest upstream it will be there. I assume it will happen after v5.16-rc1?
Yes, we'll certainly backmerge soon after rc1 has been released. If I forget to add the patch then, please send a reminder.
Once the necessary headers are available,
$ git log --oneline v5.16-rc1 -- include/linux/container_of.h e1edc277e6f6 linux/container_of.h: switch to static_assert d2a8ebbf8192 kernel.h: split out container_of() and typeof_member() macrosQuoted 2 lines
the patch is
Quoted 8 lines
Quoted 4 lines
Quoted 1 line
Thanks!
Maybe I misunderstood something, I thought that DRM people may apply this, is it incorrect assumption?
It still does not appear in Linux Next...
What should I do to move this forward, please?
It's now in drm-misc-next. Sorry that it fell through the cracks.
Best regards
Thomas
Signature · 6 lines
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