Skip to contentSkip to conversation

drm/display/dp: fix all kernel-doc warnings

PATCH In review Randy Dunlap 2 participants 5 messages May 16, 2024 – May 22, 2024 DRM drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/display/dp: fix all kernel-doc warnings

Fix a struct member name in &struct drm_dp_as_sdp.
Add Returns: kernel-doc syntax for 4 functions.
In the Returns: sections, spell "%true" and "%false" consistently.

Fixes these kernel-doc warnings:

drm_dp_helper.h:126: warning: Function parameter or struct member 'mode' not described in 'drm_dp_as_sdp' drm_dp_helper.h:126: warning: Excess struct member 'operation_mode' description in 'drm_dp_as_sdp' drm_dp_helper.h:237: warning: No description found for return value of 'drm_dp_dsc_sink_supports_format' drm_dp_helper.h:539: warning: No description found for return value of 'drm_dp_dpcd_readb' drm_dp_helper.h:554: warning: No description found for return value of 'drm_dp_dpcd_writeb' drm_dp_helper.h:721: warning: No description found for return value of 'drm_dp_has_quirk'

---
Cc: David Airlie <[email protected]>
Cc: Daniel Vetter <[email protected]>
Cc: [email protected]
Cc: Maarten Lankhorst <[email protected]>
Cc: Maxime Ripard <[email protected]>
Cc: Thomas Zimmermann <[email protected]>

 include/drm/display/drm_dp_helper.h |   17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)
include/drm/display/drm_dp_helper.h +9 -8
diff -- a/include/drm/display/drm_dp_helper.h b/include/drm/display/drm_dp_helper.h
@@ -112,7 +112,7 @@ struct drm_dp_vsc_sdp {
  * @target_rr: Target Refresh
  * @duration_incr_ms: Successive frame duration increase
  * @duration_decr_ms: Successive frame duration decrease
- * @operation_mode: Adaptive Sync Operation Mode
+ * @mode: Adaptive Sync Operation Mode
  */
 struct drm_dp_as_sdp {
 	unsigned char sdp_type;
@@ -230,7 +230,8 @@ drm_dp_dsc_sink_max_slice_width(const u8
  * @dsc_dpcd : DSC-capability DPCDs of the sink
  * @output_format: output_format which is to be checked
  *
- * Returns true if the sink supports DSC with the given output_format, false otherwise.
+ * Returns: %true if the sink supports DSC with the given output_format,
+ * %false otherwise.
  */
 static inline bool
 drm_dp_dsc_sink_supports_format(const u8 dsc_dpcd[DP_DSC_RECEIVER_CAP_SIZE], u8 output_format)
@@ -280,8 +281,8 @@ drm_dp_sink_can_do_video_without_timing_
  * backlight features but which require the brightness be set through PWM, and don't support setting
  * the brightness level via the DPCD.
  *
- * Returns: %True if @edp_dpcd indicates that VESA backlight controls are supported, %false
- * otherwise
+ * Returns: %true if @edp_dpcd indicates that VESA backlight controls are
+ * supported, %false otherwise
  */
 static inline bool
 drm_edp_backlight_supported(const u8 edp_dpcd[EDP_DISPLAY_CTL_CAP_SIZE])
@@ -295,7 +296,7 @@ drm_edp_backlight_supported(const u8 edp
  *
  * Determine if the provided link rate is an UHBR rate.
  *
- * Returns: %True if @link_rate is an UHBR rate.
+ * Returns: %true if @link_rate is an UHBR rate.
  */
 static inline bool drm_dp_is_uhbr_rate(int link_rate)
 {
@@ -531,7 +532,7 @@ ssize_t drm_dp_dpcd_write(struct drm_dp_
  * @offset: address of the register to read
  * @valuep: location where the value of the register will be stored
  *
- * Returns the number of bytes transferred (1) on success, or a negative
+ * Returns: the number of bytes transferred (1) on success, or a negative
  * error code on failure.
  */
 static inline ssize_t drm_dp_dpcd_readb(struct drm_dp_aux *aux,
@@ -546,7 +547,7 @@ static inline ssize_t drm_dp_dpcd_readb(
  * @offset: address of the register to write
  * @value: value to write to the register
  *
- * Returns the number of bytes transferred (1) on success, or a negative
+ * Returns: the number of bytes transferred (1) on success, or a negative
  * error code on failure.
  */
 static inline ssize_t drm_dp_dpcd_writeb(struct drm_dp_aux *aux,
@@ -714,7 +715,7 @@ enum drm_dp_quirk {
  * @desc: Device descriptor filled by drm_dp_read_desc()
  * @quirk: Quirk to query for
  *
- * Return true if DP device identified by @desc has @quirk.
+ * Returns: %true if DP device identified by @desc has @quirk.
  */
 static inline bool
 drm_dp_has_quirk(const struct drm_dp_desc *desc, enum drm_dp_quirk quirk)
#1 lore raw
Quoted 48 lines · Randy Dunlap

Fix a struct member name in &struct drm_dp_as_sdp.
Add Returns: kernel-doc syntax for 4 functions.
In the Returns: sections, spell "%true" and "%false" consistently.

Fixes these kernel-doc warnings:

drm_dp_helper.h:126: warning: Function parameter or struct member 'mode' not described in 'drm_dp_as_sdp' drm_dp_helper.h:126: warning: Excess struct member 'operation_mode' description in 'drm_dp_as_sdp' drm_dp_helper.h:237: warning: No description found for return value of 'drm_dp_dsc_sink_supports_format' drm_dp_helper.h:539: warning: No description found for return value of 'drm_dp_dpcd_readb' drm_dp_helper.h:554: warning: No description found for return value of 'drm_dp_dpcd_writeb' drm_dp_helper.h:721: warning: No description found for return value of 'drm_dp_has_quirk'

---
Cc: David Airlie <[email protected]>
Cc: Daniel Vetter <[email protected]>
Cc: [email protected]
Cc: Maarten Lankhorst <[email protected]>
Cc: Maxime Ripard <[email protected]>
Cc: Thomas Zimmermann <[email protected]>

 include/drm/display/drm_dp_helper.h |   17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff -- a/include/drm/display/drm_dp_helper.h b/include/drm/display/drm_dp_helper.h

include/drm/display/drm_dp_helper.h +3 -2
@@ -112,7 +112,7 @@ struct drm_dp_vsc_sdp {
  * @target_rr: Target Refresh
  * @duration_incr_ms: Successive frame duration increase
  * @duration_decr_ms: Successive frame duration decrease
- * @operation_mode: Adaptive Sync Operation Mode
+ * @mode: Adaptive Sync Operation Mode
  */
 struct drm_dp_as_sdp {
 	unsigned char sdp_type;
@@ -230,7 +230,8 @@ drm_dp_dsc_sink_max_slice_width(const u8
  * @dsc_dpcd : DSC-capability DPCDs of the sink
  * @output_format: output_format which is to be checked
  *
- * Returns true if the sink supports DSC with the given output_format, false otherwise.
+ * Returns: %true if the sink supports DSC with the given output_format,
+ * %false otherwise.
  */
 static inline bool
 drm_dp_dsc_sink_supports_format(const u8 dsc_dpcd[DP_DSC_RECEIVER_CAP_SIZE], u8 output_format)

include/drm/display/drm_dp_helper.h drm_dp_sink_can_do_video_without_timing_ · line 285

Quoted 7 lines
include/drm/display/drm_dp_helper.h +2 -2
@@ -280,8 +281,8 @@ drm_dp_sink_can_do_video_without_timing_
  * backlight features but which require the brightness be set through PWM, and don't support setting
  * the brightness level via the DPCD.
  *
- * Returns: %True if @edp_dpcd indicates that VESA backlight controls are supported, %false
- * otherwise
+ * Returns: %true if @edp_dpcd indicates that VESA backlight controls are
+ * supported, %false otherwise

If you are touching this part, maybe it's better to change 'Returns' to 'Return' as documented by Documentation/doc-guide/kernel-doc.rst ? (the same comment applies to other chunks in the patch, I've trimmed them).

Quoted 3 lines
include/drm/display/drm_dp_helper.h +0 -0
  */
 static inline bool
 drm_edp_backlight_supported(const u8 edp_dpcd[EDP_DISPLAY_CTL_CAP_SIZE])
Signature · 2 lines
With best wishes
Dmitry
#2 lore raw

Hi Dmitry,

Quoted 53 lines · Dmitry Baryshkov
Quoted 52 lines · Randy Dunlap

Fix a struct member name in &struct drm_dp_as_sdp.
Add Returns: kernel-doc syntax for 4 functions.
In the Returns: sections, spell "%true" and "%false" consistently.

Fixes these kernel-doc warnings:

drm_dp_helper.h:126: warning: Function parameter or struct member 'mode' not described in 'drm_dp_as_sdp' drm_dp_helper.h:126: warning: Excess struct member 'operation_mode' description in 'drm_dp_as_sdp' drm_dp_helper.h:237: warning: No description found for return value of 'drm_dp_dsc_sink_supports_format' drm_dp_helper.h:539: warning: No description found for return value of 'drm_dp_dpcd_readb' drm_dp_helper.h:554: warning: No description found for return value of 'drm_dp_dpcd_writeb' drm_dp_helper.h:721: warning: No description found for return value of 'drm_dp_has_quirk'

---
Cc: David Airlie <[email protected]>
Cc: Daniel Vetter <[email protected]>
Cc: [email protected]
Cc: Maarten Lankhorst <[email protected]>
Cc: Maxime Ripard <[email protected]>
Cc: Thomas Zimmermann <[email protected]>

 include/drm/display/drm_dp_helper.h |   17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff -- a/include/drm/display/drm_dp_helper.h b/include/drm/display/drm_dp_helper.h

include/drm/display/drm_dp_helper.h +3 -3
@@ -112,7 +112,7 @@ struct drm_dp_vsc_sdp {
  * @target_rr: Target Refresh
  * @duration_incr_ms: Successive frame duration increase
  * @duration_decr_ms: Successive frame duration decrease
- * @operation_mode: Adaptive Sync Operation Mode
+ * @mode: Adaptive Sync Operation Mode
  */
 struct drm_dp_as_sdp {
 	unsigned char sdp_type;
@@ -230,7 +230,8 @@ drm_dp_dsc_sink_max_slice_width(const u8
  * @dsc_dpcd : DSC-capability DPCDs of the sink
  * @output_format: output_format which is to be checked
  *
- * Returns true if the sink supports DSC with the given output_format, false otherwise.
+ * Returns: %true if the sink supports DSC with the given output_format,
+ * %false otherwise.
  */
 static inline bool
 drm_dp_dsc_sink_supports_format(const u8 dsc_dpcd[DP_DSC_RECEIVER_CAP_SIZE], u8 output_format)
@@ -280,8 +281,8 @@ drm_dp_sink_can_do_video_without_timing_
  * backlight features but which require the brightness be set through PWM, and don't support setting
  * the brightness level via the DPCD.
  *
- * Returns: %True if @edp_dpcd indicates that VESA backlight controls are supported, %false
Quoted 8 lines

include/drm/display/drm_dp_helper.h drm_dp_sink_can_do_video_without_timing_ · line 285

Quoted 3 lines
include/drm/display/drm_dp_helper.h +2 -1
- * otherwise
+ * Returns: %true if @edp_dpcd indicates that VESA backlight controls are
+ * supported, %false otherwise

If you are touching this part, maybe it's better to change 'Returns' to 'Return' as documented by Documentation/doc-guide/kernel-doc.rst ? (the same comment applies to other chunks in the patch, I've trimmed them).

scripts/kernel-doc accepts either spelling, but sure, I can change these. Thanks.

Quoted 4 lines
Quoted 3 lines
include/drm/display/drm_dp_helper.h +0 -0
  */
 static inline bool
 drm_edp_backlight_supported(const u8 edp_dpcd[EDP_DISPLAY_CTL_CAP_SIZE])
Signature · 3 lines
#Randy
https://people.kernel.org/tglx/notes-about-netiquette
https://subspace.kernel.org/etiquette.html
#3 lore raw
Quoted 65 lines · Randy Dunlap

Hi Dmitry,

Quoted 53 lines · Dmitry Baryshkov
Quoted 52 lines · Randy Dunlap

Fix a struct member name in &struct drm_dp_as_sdp.
Add Returns: kernel-doc syntax for 4 functions.
In the Returns: sections, spell "%true" and "%false" consistently.

Fixes these kernel-doc warnings:

drm_dp_helper.h:126: warning: Function parameter or struct member 'mode' not described in 'drm_dp_as_sdp' drm_dp_helper.h:126: warning: Excess struct member 'operation_mode' description in 'drm_dp_as_sdp' drm_dp_helper.h:237: warning: No description found for return value of 'drm_dp_dsc_sink_supports_format' drm_dp_helper.h:539: warning: No description found for return value of 'drm_dp_dpcd_readb' drm_dp_helper.h:554: warning: No description found for return value of 'drm_dp_dpcd_writeb' drm_dp_helper.h:721: warning: No description found for return value of 'drm_dp_has_quirk'

---
Cc: David Airlie <[email protected]>
Cc: Daniel Vetter <[email protected]>
Cc: [email protected]
Cc: Maarten Lankhorst <[email protected]>
Cc: Maxime Ripard <[email protected]>
Cc: Thomas Zimmermann <[email protected]>

 include/drm/display/drm_dp_helper.h |   17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff -- a/include/drm/display/drm_dp_helper.h b/include/drm/display/drm_dp_helper.h

include/drm/display/drm_dp_helper.h +3 -3
@@ -112,7 +112,7 @@ struct drm_dp_vsc_sdp {
  * @target_rr: Target Refresh
  * @duration_incr_ms: Successive frame duration increase
  * @duration_decr_ms: Successive frame duration decrease
- * @operation_mode: Adaptive Sync Operation Mode
+ * @mode: Adaptive Sync Operation Mode
  */
 struct drm_dp_as_sdp {
 	unsigned char sdp_type;
@@ -230,7 +230,8 @@ drm_dp_dsc_sink_max_slice_width(const u8
  * @dsc_dpcd : DSC-capability DPCDs of the sink
  * @output_format: output_format which is to be checked
  *
- * Returns true if the sink supports DSC with the given output_format, false otherwise.
+ * Returns: %true if the sink supports DSC with the given output_format,
+ * %false otherwise.
  */
 static inline bool
 drm_dp_dsc_sink_supports_format(const u8 dsc_dpcd[DP_DSC_RECEIVER_CAP_SIZE], u8 output_format)
@@ -280,8 +281,8 @@ drm_dp_sink_can_do_video_without_timing_
  * backlight features but which require the brightness be set through PWM, and don't support setting
  * the brightness level via the DPCD.
  *
- * Returns: %True if @edp_dpcd indicates that VESA backlight controls are supported, %false
Quoted 8 lines

include/drm/display/drm_dp_helper.h drm_dp_sink_can_do_video_without_timing_ · line 285

Quoted 3 lines
include/drm/display/drm_dp_helper.h +2 -1
- * otherwise
+ * Returns: %true if @edp_dpcd indicates that VESA backlight controls are
+ * supported, %false otherwise

If you are touching this part, maybe it's better to change 'Returns' to 'Return' as documented by Documentation/doc-guide/kernel-doc.rst ? (the same comment applies to other chunks in the patch, I've trimmed them).

Quoted 2 lines

scripts/kernel-doc accepts either spelling, but sure, I can change these. Thanks.

An alternative way would be to fix kernel-doc.rst :-)

Quoted 10 lines
Quoted 5 lines
Quoted 4 lines
include/drm/display/drm_dp_helper.h +0 -0
  */
 static inline bool
 drm_edp_backlight_supported(const u8 edp_dpcd[EDP_DISPLAY_CTL_CAP_SIZE])
Signature · 3 lines
#Randy
https://people.kernel.org/tglx/notes-about-netiquette
https://subspace.kernel.org/etiquette.html
Signature · 2 lines
With best wishes
Dmitry
#4 lore raw
Quoted 66 lines · Dmitry Baryshkov
Quoted 65 lines · Randy Dunlap

Hi Dmitry,

Quoted 61 lines · Dmitry Baryshkov
Quoted 48 lines · Randy Dunlap

Fix a struct member name in &struct drm_dp_as_sdp.
Add Returns: kernel-doc syntax for 4 functions.
In the Returns: sections, spell "%true" and "%false" consistently.

Fixes these kernel-doc warnings:

drm_dp_helper.h:126: warning: Function parameter or struct member 'mode' not described in 'drm_dp_as_sdp' drm_dp_helper.h:126: warning: Excess struct member 'operation_mode' description in 'drm_dp_as_sdp' drm_dp_helper.h:237: warning: No description found for return value of 'drm_dp_dsc_sink_supports_format' drm_dp_helper.h:539: warning: No description found for return value of 'drm_dp_dpcd_readb' drm_dp_helper.h:554: warning: No description found for return value of 'drm_dp_dpcd_writeb' drm_dp_helper.h:721: warning: No description found for return value of 'drm_dp_has_quirk'

---
Cc: David Airlie <[email protected]>
Cc: Daniel Vetter <[email protected]>
Cc: [email protected]
Cc: Maarten Lankhorst <[email protected]>
Cc: Maxime Ripard <[email protected]>
Cc: Thomas Zimmermann <[email protected]>

 include/drm/display/drm_dp_helper.h |   17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff -- a/include/drm/display/drm_dp_helper.h b/include/drm/display/drm_dp_helper.h

include/drm/display/drm_dp_helper.h +3 -2
@@ -112,7 +112,7 @@ struct drm_dp_vsc_sdp {
  * @target_rr: Target Refresh
  * @duration_incr_ms: Successive frame duration increase
  * @duration_decr_ms: Successive frame duration decrease
- * @operation_mode: Adaptive Sync Operation Mode
+ * @mode: Adaptive Sync Operation Mode
  */
 struct drm_dp_as_sdp {
 	unsigned char sdp_type;
@@ -230,7 +230,8 @@ drm_dp_dsc_sink_max_slice_width(const u8
  * @dsc_dpcd : DSC-capability DPCDs of the sink
  * @output_format: output_format which is to be checked
  *
- * Returns true if the sink supports DSC with the given output_format, false otherwise.
+ * Returns: %true if the sink supports DSC with the given output_format,
+ * %false otherwise.
  */
 static inline bool
 drm_dp_dsc_sink_supports_format(const u8 dsc_dpcd[DP_DSC_RECEIVER_CAP_SIZE], u8 output_format)

include/drm/display/drm_dp_helper.h drm_dp_sink_can_do_video_without_timing_ · line 285

Quoted 7 lines
include/drm/display/drm_dp_helper.h +2 -2
@@ -280,8 +281,8 @@ drm_dp_sink_can_do_video_without_timing_
  * backlight features but which require the brightness be set through PWM, and don't support setting
  * the brightness level via the DPCD.
  *
- * Returns: %True if @edp_dpcd indicates that VESA backlight controls are supported, %false
- * otherwise
+ * Returns: %true if @edp_dpcd indicates that VESA backlight controls are
+ * supported, %false otherwise

If you are touching this part, maybe it's better to change 'Returns' to 'Return' as documented by Documentation/doc-guide/kernel-doc.rst ? (the same comment applies to other chunks in the patch, I've trimmed them).

Quoted 4 lines
Quoted 2 lines

scripts/kernel-doc accepts either spelling, but sure, I can change these. Thanks.

An alternative way would be to fix kernel-doc.rst :-)

Yes, I thought of that last night.
I'll submit such a change.
Thanks.

Quoted 11 lines
Quoted 10 lines
Quoted 5 lines
Quoted 4 lines
include/drm/display/drm_dp_helper.h +0 -0
  */
 static inline bool
 drm_edp_backlight_supported(const u8 edp_dpcd[EDP_DISPLAY_CTL_CAP_SIZE])
Signature · 3 lines
#Randy
https://people.kernel.org/tglx/notes-about-netiquette
https://subspace.kernel.org/etiquette.html
Signature · 3 lines
#Randy
https://people.kernel.org/tglx/notes-about-netiquette
https://subspace.kernel.org/etiquette.html