Skip to contentSkip to conversation

drm: Fix kerneldoc warns in connector-related docs

PATCH Superseded Sean Paul 2 participants 7 messages Aug 7, 2019 – Aug 12, 2019

Subsystems (2)
lore
Share & tools
lore

Sean Paul

author
#0 lore raw

PATCH 1/1 drm: Fix kerneldoc warns in connector-related docs

From: Sean Paul <[email protected]>

Fixes the following warnings:
../drivers/gpu/drm/drm_connector.c:989: WARNING: Unexpected indentation. ../drivers/gpu/drm/drm_connector.c:993: WARNING: Unexpected indentation. ../include/drm/drm_connector.h:544: WARNING: Inline interpreted text or phrase reference start-string without end-string. ../include/drm/drm_connector.h:544: WARNING: Inline interpreted text or phrase reference start-string without end-string.

Fixes 1b27fbdde1df ("drm: Add drm_atomic_get_(old|new)_connector_for_encoder() helpers")
Fixes bb5a45d40d50 ("drm/hdcp: update content protection property with uevent")
Cc Ramalingam C <[email protected]>
Cc Daniel Vetter <[email protected]>
Cc Pekka Paalanen <[email protected]>
Cc Sam Ravnborg <[email protected]>
Cc Laurent Pinchart <[email protected]>
Cc Jani Nikula <[email protected]>
Cc Sean Paul <[email protected]>
Cc Maarten Lankhorst <[email protected]>
Cc Maxime Ripard <[email protected]>
Cc Sean Paul <[email protected]>
Cc David Airlie <[email protected]>
---
 drivers/gpu/drm/drm_connector.c | 10 ++++++----
 include/drm/drm_connector.h     |  4 ++--
 2 files changed, 8 insertions(+), 6 deletions(-)
drivers/gpu/drm/drm_connector.c +6 -4
index 354798bad576..4c766624b20d 100644
@@ -986,12 +986,14 @@ static const struct drm_prop_enum_list hdmi_colorspaces[] = {
  *	- Kernel sends uevent with the connector id and property id through
  *	  @drm_hdcp_update_content_protection, upon below kernel triggered
  *	  scenarios:
- *		DESIRED -> ENABLED	(authentication success)
- *		ENABLED -> DESIRED	(termination of authentication)
+ *
+ *		- DESIRED -> ENABLED (authentication success)
+ *		- ENABLED -> DESIRED (termination of authentication)
  *	- Please note no uevents for userspace triggered property state changes,
  *	  which can't fail such as
- *		DESIRED/ENABLED -> UNDESIRED
- *		UNDESIRED -> DESIRED
+ *
+ *		- DESIRED/ENABLED -> UNDESIRED
+ *		- UNDESIRED -> DESIRED
  *	- Userspace is responsible for polling the property or listen to uevents
  *	  to determine when the value transitions from ENABLED to DESIRED.
  *	  This signifies the link is no longer protected and userspace should
include/drm/drm_connector.h +2 -2
index 0b9997e27689..e391f9c05f98 100644
@@ -543,8 +543,8 @@ struct drm_connector_state {
 	 *
 	 * This is also used in the atomic helpers to map encoders to their
 	 * current and previous connectors, see
-	 * &drm_atomic_get_old_connector_for_encoder() and
-	 * &drm_atomic_get_new_connector_for_encoder().
+	 * &drm_atomic_get_old_connector_for_encoder and
+	 * &drm_atomic_get_new_connector_for_encoder.
 	 *
 	 * NOTE: Atomic drivers must fill this out (either themselves or through
 	 * helpers), for otherwise the GETCONNECTOR and GETENCODER IOCTLs will
Signature · 6 lines
Sean Paul, Software Engineer, Google / Chromium OS

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Reviewed-by on v1 1/1
#1 lore raw

Hi Sean.

Quoted 7 lines · Sean Paul

From: Sean Paul <[email protected]>

Fixes the following warnings:
../drivers/gpu/drm/drm_connector.c:989: WARNING: Unexpected indentation. ../drivers/gpu/drm/drm_connector.c:993: WARNING: Unexpected indentation. ../include/drm/drm_connector.h:544: WARNING: Inline interpreted text or phrase reference start-string without end-string. ../include/drm/drm_connector.h:544: WARNING: Inline interpreted text or phrase reference start-string without end-string.

Thanks, 4 less warnings..

Quoted 49 lines
Fixes 1b27fbdde1df ("drm: Add drm_atomic_get_(old|new)_connector_for_encoder() helpers")
Fixes bb5a45d40d50 ("drm/hdcp: update content protection property with uevent")
Cc Ramalingam C <[email protected]>
Cc Daniel Vetter <[email protected]>
Cc Pekka Paalanen <[email protected]>
Cc Sam Ravnborg <[email protected]>
Cc Laurent Pinchart <[email protected]>
Cc Jani Nikula <[email protected]>
Cc Sean Paul <[email protected]>
Cc Maarten Lankhorst <[email protected]>
Cc Maxime Ripard <[email protected]>
Cc Sean Paul <[email protected]>
Cc David Airlie <[email protected]>
---
 drivers/gpu/drm/drm_connector.c | 10 ++++++----
 include/drm/drm_connector.h     |  4 ++--
 2 files changed, 8 insertions(+), 6 deletions(-)
drivers/gpu/drm/drm_connector.c +6 -4
index 354798bad576..4c766624b20d 100644
@@ -986,12 +986,14 @@ static const struct drm_prop_enum_list hdmi_colorspaces[] = {
  *	- Kernel sends uevent with the connector id and property id through
  *	  @drm_hdcp_update_content_protection, upon below kernel triggered
  *	  scenarios:
- *		DESIRED -> ENABLED	(authentication success)
- *		ENABLED -> DESIRED	(termination of authentication)
+ *
+ *		- DESIRED -> ENABLED (authentication success)
+ *		- ENABLED -> DESIRED (termination of authentication)
  *	- Please note no uevents for userspace triggered property state changes,
  *	  which can't fail such as
- *		DESIRED/ENABLED -> UNDESIRED
- *		UNDESIRED -> DESIRED
+ *
+ *		- DESIRED/ENABLED -> UNDESIRED
+ *		- UNDESIRED -> DESIRED
  *	- Userspace is responsible for polling the property or listen to uevents
  *	  to determine when the value transitions from ENABLED to DESIRED.
  *	  This signifies the link is no longer protected and userspace should
include/drm/drm_connector.h +0 -0
index 0b9997e27689..e391f9c05f98 100644

include/drm/drm_connector.h struct drm_connector_state { · line 547

Quoted 7 lines
include/drm/drm_connector.h +2 -2
@@ -543,8 +543,8 @@ struct drm_connector_state {
 	 *
 	 * This is also used in the atomic helpers to map encoders to their
 	 * current and previous connectors, see
-	 * &drm_atomic_get_old_connector_for_encoder() and
-	 * &drm_atomic_get_new_connector_for_encoder().
+	 * &drm_atomic_get_old_connector_for_encoder and
+	 * &drm_atomic_get_new_connector_for_encoder.

Please fix this to use () for the functions and drop the "&". This is what we use in drm kernel-doc for functions.
See for example function references in doc of writeback_job in the same file.

With this fixed:

Quoted 5 lines
include/drm/drm_connector.h +0 -0
 	 *
 	 * NOTE: Atomic drivers must fill this out (either themselves or through
 	 * helpers), for otherwise the GETCONNECTOR and GETENCODER IOCTLs will
Signature · 1 line
Sean Paul, Software Engineer, Google / Chromium OS

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

author
#2 lore raw
Quoted 63 lines · Sam Ravnborg

Hi Sean.

Quoted 7 lines · Sean Paul

From: Sean Paul <[email protected]>

Fixes the following warnings:
../drivers/gpu/drm/drm_connector.c:989: WARNING: Unexpected indentation. ../drivers/gpu/drm/drm_connector.c:993: WARNING: Unexpected indentation. ../include/drm/drm_connector.h:544: WARNING: Inline interpreted text or phrase reference start-string without end-string. ../include/drm/drm_connector.h:544: WARNING: Inline interpreted text or phrase reference start-string without end-string.

Thanks, 4 less warnings..

Quoted 51 lines
Fixes 1b27fbdde1df ("drm: Add drm_atomic_get_(old|new)_connector_for_encoder() helpers")
Fixes bb5a45d40d50 ("drm/hdcp: update content protection property with uevent")
Cc Ramalingam C <[email protected]>
Cc Daniel Vetter <[email protected]>
Cc Pekka Paalanen <[email protected]>
Cc Sam Ravnborg <[email protected]>
Cc Laurent Pinchart <[email protected]>
Cc Jani Nikula <[email protected]>
Cc Sean Paul <[email protected]>
Cc Maarten Lankhorst <[email protected]>
Cc Maxime Ripard <[email protected]>
Cc Sean Paul <[email protected]>
Cc David Airlie <[email protected]>
---
 drivers/gpu/drm/drm_connector.c | 10 ++++++----
 include/drm/drm_connector.h     |  4 ++--
 2 files changed, 8 insertions(+), 6 deletions(-)
drivers/gpu/drm/drm_connector.c +6 -4
index 354798bad576..4c766624b20d 100644
@@ -986,12 +986,14 @@ static const struct drm_prop_enum_list hdmi_colorspaces[] = {
  *	- Kernel sends uevent with the connector id and property id through
  *	  @drm_hdcp_update_content_protection, upon below kernel triggered
  *	  scenarios:
- *		DESIRED -> ENABLED	(authentication success)
- *		ENABLED -> DESIRED	(termination of authentication)
+ *
+ *		- DESIRED -> ENABLED (authentication success)
+ *		- ENABLED -> DESIRED (termination of authentication)
  *	- Please note no uevents for userspace triggered property state changes,
  *	  which can't fail such as
- *		DESIRED/ENABLED -> UNDESIRED
- *		UNDESIRED -> DESIRED
+ *
+ *		- DESIRED/ENABLED -> UNDESIRED
+ *		- UNDESIRED -> DESIRED
  *	- Userspace is responsible for polling the property or listen to uevents
  *	  to determine when the value transitions from ENABLED to DESIRED.
  *	  This signifies the link is no longer protected and userspace should
include/drm/drm_connector.h +0 -0
index 0b9997e27689..e391f9c05f98 100644
@@ -543,8 +543,8 @@ struct drm_connector_state {
 	 *
 	 * This is also used in the atomic helpers to map encoders to their
Quoted 8 lines

include/drm/drm_connector.h struct drm_connector_state { · line 547

Quoted 5 lines
include/drm/drm_connector.h +2 -2
 	 * current and previous connectors, see
-	 * &drm_atomic_get_old_connector_for_encoder() and
-	 * &drm_atomic_get_new_connector_for_encoder().
+	 * &drm_atomic_get_old_connector_for_encoder and
+	 * &drm_atomic_get_new_connector_for_encoder.

Please fix this to use () for the functions and drop the "&". This is what we use in drm kernel-doc for functions.
See for example function references in doc of writeback_job in the same file.

Doing this won't get a hyperlink in the docs. It seems like these hooks aren't recognized as functions by sphinx (not sure didn't look into it too deeply). The other "_funcs.*" hooks are also handled with '&' (there are lots of examples in drm_connector.h).

I think preserving the hyperlinks probably outweighs the missing (), thoughts?

Sean

Quoted 9 lines

With this fixed:

Quoted 5 lines
include/drm/drm_connector.h +0 -0
 	 *
 	 * NOTE: Atomic drivers must fill this out (either themselves or through
 	 * helpers), for otherwise the GETCONNECTOR and GETENCODER IOCTLs will
Signature · 1 line
Sean Paul, Software Engineer, Google / Chromium OS
Signature · 5 lines
Sean Paul, Software Engineer, Google / Chromium OS
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#3 lore raw

Hi Sean.

Quoted 14 lines
Quoted 5 lines
Quoted 5 lines
include/drm/drm_connector.h +0 -0
@@ -543,8 +543,8 @@ struct drm_connector_state {
 	 *
 	 * This is also used in the atomic helpers to map encoders to their
Quoted 8 lines

include/drm/drm_connector.h struct drm_connector_state { · line 547

Quoted 5 lines
include/drm/drm_connector.h +2 -2
 	 * current and previous connectors, see
-	 * &drm_atomic_get_old_connector_for_encoder() and
-	 * &drm_atomic_get_new_connector_for_encoder().
+	 * &drm_atomic_get_old_connector_for_encoder and
+	 * &drm_atomic_get_new_connector_for_encoder.

Please fix this to use () for the functions and drop the "&". This is what we use in drm kernel-doc for functions.
See for example function references in doc of writeback_job in the same file.

Quoted 6 lines

Doing this won't get a hyperlink in the docs. It seems like these hooks aren't recognized as functions by sphinx (not sure didn't look into it too deeply). The other "_funcs.*" hooks are also handled with '&' (there are lots of examples in drm_connector.h).

I think preserving the hyperlinks probably outweighs the missing (), thoughts?

Hmm, I actually tested it here - with sphinx_1.4.9.
The links was preserved, the only difference was that they had the () prefixed to their name.

Do you happen to use an older sphinx version?

Sam
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

author
#4 lore raw
Quoted 21 lines · Sam Ravnborg

Hi Sean.

Quoted 19 lines
Quoted 5 lines
Quoted 5 lines
include/drm/drm_connector.h +0 -0
@@ -543,8 +543,8 @@ struct drm_connector_state {
 	 *
 	 * This is also used in the atomic helpers to map encoders to their
Quoted 8 lines

include/drm/drm_connector.h struct drm_connector_state { · line 547

Quoted 5 lines
include/drm/drm_connector.h +2 -2
 	 * current and previous connectors, see
-	 * &drm_atomic_get_old_connector_for_encoder() and
-	 * &drm_atomic_get_new_connector_for_encoder().
+	 * &drm_atomic_get_old_connector_for_encoder and
+	 * &drm_atomic_get_new_connector_for_encoder.

Please fix this to use () for the functions and drop the "&". This is what we use in drm kernel-doc for functions.
See for example function references in doc of writeback_job in the same file.

Doing this won't get a hyperlink in the docs. It seems like these hooks aren't recognized as functions by sphinx (not sure didn't look into it too deeply). The other "_funcs.*" hooks are also handled with '&' (there are lots of examples in drm_connector.h).

Quoted 7 lines
Quoted 1 line

I think preserving the hyperlinks probably outweighs the missing (), thoughts?

Hmm, I actually tested it here - with sphinx_1.4.9.
The links was preserved, the only difference was that they had the () prefixed to their name.

Do you happen to use an older sphinx version?

I'm on 1.7.9. I just rechecked and was a bit confused in my last mail. The drm_atomic_get_*_connector_for_encoder links do work with (), it's the ones drm_connector_helper_funcs in the paragraph above that need the '&'. So I'll switch up these 2 and leave the others as-is. Cool?

Sean

Quoted 2 lines

Sam

Signature · 5 lines
Sean Paul, Software Engineer, Google / Chromium OS
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Reviewed-by
#5 lore raw

Hi Sean.

Quoted 25 lines
Quoted 25 lines
Quoted 14 lines
Quoted 5 lines
Quoted 5 lines
include/drm/drm_connector.h +0 -0
@@ -543,8 +543,8 @@ struct drm_connector_state {
 	 *
 	 * This is also used in the atomic helpers to map encoders to their
Quoted 8 lines

include/drm/drm_connector.h struct drm_connector_state { · line 547

Quoted 5 lines
include/drm/drm_connector.h +2 -2
 	 * current and previous connectors, see
-	 * &drm_atomic_get_old_connector_for_encoder() and
-	 * &drm_atomic_get_new_connector_for_encoder().
+	 * &drm_atomic_get_old_connector_for_encoder and
+	 * &drm_atomic_get_new_connector_for_encoder.

Please fix this to use () for the functions and drop the "&". This is what we use in drm kernel-doc for functions.
See for example function references in doc of writeback_job in the same file.

Quoted 6 lines

Doing this won't get a hyperlink in the docs. It seems like these hooks aren't recognized as functions by sphinx (not sure didn't look into it too deeply). The other "_funcs.*" hooks are also handled with '&' (there are lots of examples in drm_connector.h).

I think preserving the hyperlinks probably outweighs the missing (), thoughts?

Hmm, I actually tested it here - with sphinx_1.4.9.
The links was preserved, the only difference was that they had the () prefixed to their name.

Quoted 6 lines
Quoted 1 line

Do you happen to use an older sphinx version?

I'm on 1.7.9. I just rechecked and was a bit confused in my last mail. The drm_atomic_get_*_connector_for_encoder links do work with (), it's the ones drm_connector_helper_funcs in the paragraph above that need the '&'. So I'll switch up these 2 and leave the others as-is. Cool?

Perfect!

You can add my:

and then apply.

Sam
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

author
#6 lore raw

PATCH v2 1/1 drm: Fix kerneldoc warns in connector-related docs

From: Sean Paul <[email protected]>

Fixes the following warnings:
../drivers/gpu/drm/drm_connector.c:989: WARNING: Unexpected indentation. ../drivers/gpu/drm/drm_connector.c:993: WARNING: Unexpected indentation. ../include/drm/drm_connector.h:544: WARNING: Inline interpreted text or phrase reference start-string without end-string. ../include/drm/drm_connector.h:544: WARNING: Inline interpreted text or phrase reference start-string without end-string.

Changes in v2:
- Use () instead of & for functions (Sam)

Fixes 1b27fbdde1df ("drm: Add drm_atomic_get_(old|new)_connector_for_encoder() helpers")
Fixes bb5a45d40d50 ("drm/hdcp: update content protection property with uevent")
Cc Ramalingam C <[email protected]>
Cc Daniel Vetter <[email protected]>
Cc Pekka Paalanen <[email protected]>
Cc Sam Ravnborg <[email protected]>
Cc Laurent Pinchart <[email protected]>
Cc Jani Nikula <[email protected]>
Cc Sean Paul <[email protected]>
Cc Maarten Lankhorst <[email protected]>
Cc Maxime Ripard <[email protected]>
Cc Sean Paul <[email protected]>
Cc David Airlie <[email protected]>

---

Sending out for completeness, will apply to drm-misc-next.

 drivers/gpu/drm/drm_connector.c | 10 ++++++----
 include/drm/drm_connector.h     |  4 ++--
 2 files changed, 8 insertions(+), 6 deletions(-)
drivers/gpu/drm/drm_connector.c +6 -4
index 354798bad576..4c766624b20d 100644
@@ -986,12 +986,14 @@ static const struct drm_prop_enum_list hdmi_colorspaces[] = {
  *	- Kernel sends uevent with the connector id and property id through
  *	  @drm_hdcp_update_content_protection, upon below kernel triggered
  *	  scenarios:
- *		DESIRED -> ENABLED	(authentication success)
- *		ENABLED -> DESIRED	(termination of authentication)
+ *
+ *		- DESIRED -> ENABLED (authentication success)
+ *		- ENABLED -> DESIRED (termination of authentication)
  *	- Please note no uevents for userspace triggered property state changes,
  *	  which can't fail such as
- *		DESIRED/ENABLED -> UNDESIRED
- *		UNDESIRED -> DESIRED
+ *
+ *		- DESIRED/ENABLED -> UNDESIRED
+ *		- UNDESIRED -> DESIRED
  *	- Userspace is responsible for polling the property or listen to uevents
  *	  to determine when the value transitions from ENABLED to DESIRED.
  *	  This signifies the link is no longer protected and userspace should
include/drm/drm_connector.h +2 -2
index 0b9997e27689..681cb590f952 100644
@@ -543,8 +543,8 @@ struct drm_connector_state {
 	 *
 	 * This is also used in the atomic helpers to map encoders to their
 	 * current and previous connectors, see
-	 * &drm_atomic_get_old_connector_for_encoder() and
-	 * &drm_atomic_get_new_connector_for_encoder().
+	 * drm_atomic_get_old_connector_for_encoder() and
+	 * drm_atomic_get_new_connector_for_encoder().
 	 *
 	 * NOTE: Atomic drivers must fill this out (either themselves or through
 	 * helpers), for otherwise the GETCONNECTOR and GETENCODER IOCTLs will
Signature · 6 lines
Sean Paul, Software Engineer, Google / Chromium OS

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel