diff mbox series

[4/5] drm/print: Include drm_device.h

Message ID 11497a3e490c001f3a884acb310b4812b643a9a0.1737644530.git.jani.nikula@intel.com (mailing list archive)
State New
Headers show
Series drm: strict type checking for drm_device based logging helpers | expand

Commit Message

Jani Nikula Jan. 23, 2025, 3:09 p.m. UTC
From: Gustavo Sousa <gustavo.sousa@intel.com>

The header drm_print.h uses members of struct drm_device pointers, as
such, it should include drm_device.h to let the compiler know the full
type definition.

Without such include, users of drm_print.h that don't explicitly need
drm_device.h would bump into build errors and be forced to include the
latter.

Signed-off-by: Gustavo Sousa <gustavo.sousa@intel.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>

---

Including here as a dependency. May be merged independently.
---
 include/drm/drm_print.h | 1 +
 1 file changed, 1 insertion(+)

Comments

Jani Nikula Jan. 23, 2025, 3:14 p.m. UTC | #1
On Thu, 23 Jan 2025, Jani Nikula <jani.nikula@intel.com> wrote:
> From: Gustavo Sousa <gustavo.sousa@intel.com>
>
> The header drm_print.h uses members of struct drm_device pointers, as
> such, it should include drm_device.h to let the compiler know the full
> type definition.
>
> Without such include, users of drm_print.h that don't explicitly need
> drm_device.h would bump into build errors and be forced to include the
> latter.
>
> Signed-off-by: Gustavo Sousa <gustavo.sousa@intel.com>
> Reviewed-by: Jani Nikula <jani.nikula@intel.com>

This posting should have had

Signed-off-by: Jani Nikula <jani.nikula@intel.com>

but obviously not needed if the original [1] is merged instead.


[1] https://lore.kernel.org/r/20250121210935.84357-1-gustavo.sousa@intel.com

>
> ---
>
> Including here as a dependency. May be merged independently.
> ---
>  include/drm/drm_print.h | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/include/drm/drm_print.h b/include/drm/drm_print.h
> index f77fe1531cf8..9732f514566d 100644
> --- a/include/drm/drm_print.h
> +++ b/include/drm/drm_print.h
> @@ -32,6 +32,7 @@
>  #include <linux/dynamic_debug.h>
>  
>  #include <drm/drm.h>
> +#include <drm/drm_device.h>
>  
>  struct debugfs_regset32;
>  struct drm_device;
Gustavo Sousa Jan. 23, 2025, 4:14 p.m. UTC | #2
Quoting Jani Nikula (2025-01-23 12:14:31-03:00)
>On Thu, 23 Jan 2025, Jani Nikula <jani.nikula@intel.com> wrote:
>> From: Gustavo Sousa <gustavo.sousa@intel.com>
>>
>> The header drm_print.h uses members of struct drm_device pointers, as
>> such, it should include drm_device.h to let the compiler know the full
>> type definition.
>>
>> Without such include, users of drm_print.h that don't explicitly need
>> drm_device.h would bump into build errors and be forced to include the
>> latter.
>>
>> Signed-off-by: Gustavo Sousa <gustavo.sousa@intel.com>
>> Reviewed-by: Jani Nikula <jani.nikula@intel.com>
>
>This posting should have had
>
>Signed-off-by: Jani Nikula <jani.nikula@intel.com>
>
>but obviously not needed if the original [1] is merged instead.
>
>
>[1] https://lore.kernel.org/r/20250121210935.84357-1-gustavo.sousa@intel.com

Hm. Since that's in the upper drm layer, I thought I was not supposed to
merge it myself.

Am I? In that case, is it okay to merge it via drm-intel-next?

--
Gustavo Sousa

>
>>
>> ---
>>
>> Including here as a dependency. May be merged independently.
>> ---
>>  include/drm/drm_print.h | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/include/drm/drm_print.h b/include/drm/drm_print.h
>> index f77fe1531cf8..9732f514566d 100644
>> --- a/include/drm/drm_print.h
>> +++ b/include/drm/drm_print.h
>> @@ -32,6 +32,7 @@
>>  #include <linux/dynamic_debug.h>
>>  
>>  #include <drm/drm.h>
>> +#include <drm/drm_device.h>
>>  
>>  struct debugfs_regset32;
>>  struct drm_device;
>
>-- 
>Jani Nikula, Intel
diff mbox series

Patch

diff --git a/include/drm/drm_print.h b/include/drm/drm_print.h
index f77fe1531cf8..9732f514566d 100644
--- a/include/drm/drm_print.h
+++ b/include/drm/drm_print.h
@@ -32,6 +32,7 @@ 
 #include <linux/dynamic_debug.h>
 
 #include <drm/drm.h>
+#include <drm/drm_device.h>
 
 struct debugfs_regset32;
 struct drm_device;