Skip to contentSkip to conversation

drm: fix kernel-doc struct tag for `drm_format_info`.

PATCH In review Javier Garcia 2 participants 4 messages Aug 23, 2025 – Aug 25, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 drm: fix kernel-doc struct tag for `drm_format_info`.

- Add needed "@" to avoid warn messages about duplicated symbols as there is function and struct with the same name.
- The fixed warning is:

./Documentation/gpu/drm-kms:360: ./drivers/gpu/drm/drm_fourcc.c:397: WARNING: Duplicate C declaration, also defined at gpu/drm-kms:35. Declaration is '.. c:function:: const struct drm_format_info * drm_format_info (u32 format)'. [duplicate_declaration.c]

Fixes 84770cc24f3a ("drm: Centralize format information")
---
 include/drm/drm_fourcc.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/drm/drm_fourcc.h +1 -1
index 471784426857..ba25beeb28cb 100644
@@ -56,7 +56,7 @@
 struct drm_device;
 
 /**
- * struct drm_format_info - information about a DRM format
+ * @struct drm_format_info - information about a DRM format
  */
 struct drm_format_info {
 	/** @format: 4CC format identifier (DRM_FORMAT_*) */
Signature · 1 line
2.50.1
#1 lore raw

PATCH 2/2 drm: fix kernel-doc struct tag for `drm_modeset_lock`.

- Add needed "@" to avoid warn messages about duplicated symbols as there is function and struct with the same name.
- The fixed warning is:

./Documentation/gpu/drm-kms:476: ./drivers/gpu/drm/drm_modeset_lock.c:377: WARNING: Duplicate C declaration, also defined at gpu/drm-kms:48. Declaration is '.. c:function:: int drm_modeset_lock (struct drm_modeset_lock *lock, struct drm_modeset_acquire_ctx *ctx)'. [duplicate_declaration.c]

Fixes f3a808817fdb ("drm: fix drm_modeset_lock.h kernel-doc notation")
---
 include/drm/drm_modeset_lock.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/drm/drm_modeset_lock.h +1 -1
index ec4f543c3d95..0de7046dc653 100644
@@ -75,7 +75,7 @@ struct drm_modeset_acquire_ctx {
 };
 
 /**
- * struct drm_modeset_lock - used for locking modeset resources.
+ * @struct drm_modeset_lock - used for locking modeset resources.
  * @mutex: resource locking
  * @head: used to hold its place on &drm_atomi_state.locked list when
  *    part of an atomic update
Signature · 1 line
2.50.1
#2 lore raw

Re: [PATCH 2/2] drm: fix kernel-doc struct tag for `drm_modeset_lock`.

Quoted 6 lines · Javier Garcia

- Add needed "@" to avoid warn messages about duplicated symbols as there is function and struct with the same name.
- The fixed warning is:

./Documentation/gpu/drm-kms:476: ./drivers/gpu/drm/drm_modeset_lock.c:377: WARNING: Duplicate C declaration, also defined at gpu/drm-kms:48. Declaration is '.. c:function:: int drm_modeset_lock (struct drm_modeset_lock *lock, struct drm_modeset_acquire_ctx *ctx)'. [duplicate_declaration.c]

Please look into why adding @ here appear to fix the issue.

The problem is deeper than what this patch makes it seem, and this papers over the issue in a way that sets the wrong example for the future.

BR,
Jani.

Quoted 20 lines
Fixes f3a808817fdb ("drm: fix drm_modeset_lock.h kernel-doc notation")
---
 include/drm/drm_modeset_lock.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/drm/drm_modeset_lock.h +1 -1
index ec4f543c3d95..0de7046dc653 100644
@@ -75,7 +75,7 @@ struct drm_modeset_acquire_ctx {
 };
 
 /**
- * struct drm_modeset_lock - used for locking modeset resources.
+ * @struct drm_modeset_lock - used for locking modeset resources.
  * @mutex: resource locking
  * @head: used to hold its place on &drm_atomi_state.locked list when
  *    part of an atomic update
Signature · 1 line
Jani Nikula, Intel
#3 lore raw

Re: [PATCH 2/2] drm: fix kernel-doc struct tag for `drm_modeset_lock`.

Quoted 6 lines · Jani Nikula
Quoted 4 lines · Javier Garcia

- Add needed "@" to avoid warn messages about duplicated symbols as there is function and struct with the same name.
- The fixed warning is:

Quoted 8 lines
Quoted 2 lines

./Documentation/gpu/drm-kms:476: ./drivers/gpu/drm/drm_modeset_lock.c:377: WARNING: Duplicate C declaration, also defined at gpu/drm-kms:48. Declaration is '.. c:function:: int drm_modeset_lock (struct drm_modeset_lock *lock, struct drm_modeset_acquire_ctx *ctx)'. [duplicate_declaration.c]

Please look into why adding @ here appear to fix the issue.

The problem is deeper than what this patch makes it seem, and this papers over the issue in a way that sets the wrong example for the future.

Thank you for the comment, I'll look deeper into this.

Quoted 28 lines

BR,
Jani.

Quoted 12 lines
Fixes f3a808817fdb ("drm: fix drm_modeset_lock.h kernel-doc notation")
---
 include/drm/drm_modeset_lock.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/drm/drm_modeset_lock.h +0 -0
index ec4f543c3d95..0de7046dc653 100644

include/drm/drm_modeset_lock.h struct drm_modeset_acquire_ctx { · line 81

Quoted 8 lines
include/drm/drm_modeset_lock.h +1 -1
@@ -75,7 +75,7 @@ struct drm_modeset_acquire_ctx {
 };
 
 /**
- * struct drm_modeset_lock - used for locking modeset resources.
+ * @struct drm_modeset_lock - used for locking modeset resources.
  * @mutex: resource locking
  * @head: used to hold its place on &drm_atomi_state.locked list when
  *    part of an atomic update

--
Jani Nikula, Intel