diff mbox series

[01/30] drm/dp: Rewrap kdocs for struct drm_dp_aux

Message ID 20210219215326.2227596-2-lyude@redhat.com (mailing list archive)
State New, archived
Headers show
Series drm: Use new DRM printk funcs (like drm_dbg_*()) in DP helpers | expand

Commit Message

Lyude Paul Feb. 19, 2021, 9:52 p.m. UTC
Since we're about to be adding some more fields and update this
documentation, let's rewrap it to the new column limit of 100 beforehand.
No actual doc or functional changes are made here.

Signed-off-by: Lyude Paul <lyude@redhat.com>
---
 include/drm/drm_dp_helper.h | 42 ++++++++++++++++---------------------
 1 file changed, 18 insertions(+), 24 deletions(-)

Comments

Randy Dunlap Feb. 19, 2021, 11:42 p.m. UTC | #1
On 2/19/21 1:52 PM, Lyude Paul wrote:
> Since we're about to be adding some more fields and update this
> documentation, let's rewrap it to the new column limit of 100 beforehand.
> No actual doc or functional changes are made here.
>

The preferred column limit is still 80.
For some (exceptional) cases, going up to 100 is OK,
but I don't see any reason here to go beyond 80.


> Signed-off-by: Lyude Paul <lyude@redhat.com>
> ---
>  include/drm/drm_dp_helper.h | 42 ++++++++++++++++---------------------
>  1 file changed, 18 insertions(+), 24 deletions(-)
> 
> diff --git a/include/drm/drm_dp_helper.h b/include/drm/drm_dp_helper.h
> index edffd1dcca3e..2891a98eebc8 100644
> --- a/include/drm/drm_dp_helper.h
> +++ b/include/drm/drm_dp_helper.h
> @@ -1839,34 +1839,28 @@ struct drm_dp_aux_cec {
>   * @crc_count: counter of captured frame CRCs
>   * @transfer: transfers a message representing a single AUX transaction
>   *
> - * The .dev field should be set to a pointer to the device that implements
> - * the AUX channel.
> + * The .dev field should be set to a pointer to the device that implements the AUX channel.
>   *
> - * The .name field may be used to specify the name of the I2C adapter. If set to
> - * NULL, dev_name() of .dev will be used.
> + * The .name field may be used to specify the name of the I2C adapter. If set to NULL, dev_name() of
> + * .dev will be used.
>   *
> - * Drivers provide a hardware-specific implementation of how transactions
> - * are executed via the .transfer() function. A pointer to a drm_dp_aux_msg
> - * structure describing the transaction is passed into this function. Upon
> - * success, the implementation should return the number of payload bytes
> - * that were transferred, or a negative error-code on failure. Helpers
> - * propagate errors from the .transfer() function, with the exception of
> - * the -EBUSY error, which causes a transaction to be retried. On a short,
> - * helpers will return -EPROTO to make it simpler to check for failure.
> + * Drivers provide a hardware-specific implementation of how transactions are executed via the
> + * .transfer() function. A pointer to a drm_dp_aux_msg structure describing the transaction is
> + * passed into this function. Upon success, the implementation should return the number of payload
> + * bytes that were transferred, or a negative error-code on failure. Helpers propagate errors from
> + * the .transfer() function, with the exception of the -EBUSY error, which causes a transaction to
> + * be retried. On a short, helpers will return -EPROTO to make it simpler to check for failure.
>   *
> - * An AUX channel can also be used to transport I2C messages to a sink. A
> - * typical application of that is to access an EDID that's present in the
> - * sink device. The .transfer() function can also be used to execute such
> - * transactions. The drm_dp_aux_register() function registers an I2C
> - * adapter that can be passed to drm_probe_ddc(). Upon removal, drivers
> - * should call drm_dp_aux_unregister() to remove the I2C adapter.
> - * The I2C adapter uses long transfers by default; if a partial response is
> - * received, the adapter will drop down to the size given by the partial
> - * response for this transaction only.
> + * An AUX channel can also be used to transport I2C messages to a sink. A typical application of
> + * that is to access an EDID that's present in the sink device. The .transfer() function can also be
> + * used to execute such transactions. The drm_dp_aux_register() function registers an I2C adapter
> + * that can be passed to drm_probe_ddc(). Upon removal, drivers should call drm_dp_aux_unregister()
> + * to remove the I2C adapter. The I2C adapter uses long transfers by default; if a partial response
> + * is received, the adapter will drop down to the size given by the partial response for this
> + * transaction only.
>   *
> - * Note that the aux helper code assumes that the .transfer() function
> - * only modifies the reply field of the drm_dp_aux_msg structure.  The
> - * retry logic and i2c helpers assume this is the case.
> + * Note that the aux helper code assumes that the .transfer() function only modifies the reply field
> + * of the drm_dp_aux_msg structure. The retry logic and i2c helpers assume this is the case.
>   */
>  struct drm_dp_aux {
>  	const char *name;
>
Lyude Paul Feb. 24, 2021, 6:31 p.m. UTC | #2
On Fri, 2021-02-19 at 15:42 -0800, Randy Dunlap wrote:
> On 2/19/21 1:52 PM, Lyude Paul wrote:
> > Since we're about to be adding some more fields and update this
> > documentation, let's rewrap it to the new column limit of 100 beforehand.
> > No actual doc or functional changes are made here.
> > 
> 
> The preferred column limit is still 80.
> For some (exceptional) cases, going up to 100 is OK,
> but I don't see any reason here to go beyond 80.

Found some posts online that discussed this in detail:

https://linux.slashdot.org/story/20/05/31/211211/linus-torvalds-argues-against-80-column-line-length-coding-style-as-linux-kernel-deprecates-it

so I guess I'm fine with rewrapping these to 80 cols (although honestly, it'd be
really nice to just have a single col limit to make things easier on text
editors :) in the next respin.


> Signed-off-by: Lyude Paul <lyude@redhat.com>
> ---
>  include/drm/drm_dp_helper.h | 42 ++++++++++++++++---------------------
>  1 file changed, 18 insertions(+), 24 deletions(-)
> 
> diff --git a/include/drm/drm_dp_helper.h b/include/drm/drm_dp_helper.h
> index edffd1dcca3e..2891a98eebc8 100644
> --- a/include/drm/drm_dp_helper.h
> +++ b/include/drm/drm_dp_helper.h
> @@ -1839,34 +1839,28 @@ struct drm_dp_aux_cec {
>   * @crc_count: counter of captured frame CRCs
>   * @transfer: transfers a message representing a single AUX transaction
>   *
> - * The .dev field should be set to a pointer to the device that implements
> - * the AUX channel.
> + * The .dev field should be set to a pointer to the device that implements
> the AUX channel.
>   *
> - * The .name field may be used to specify the name of the I2C adapter. If set
> to
> - * NULL, dev_name() of .dev will be used.
> + * The .name field may be used to specify the name of the I2C adapter. If set
> to NULL, dev_name() of
> + * .dev will be used.
>   *
> - * Drivers provide a hardware-specific implementation of how transactions
> - * are executed via the .transfer() function. A pointer to a drm_dp_aux_msg
> - * structure describing the transaction is passed into this function. Upon
> - * success, the implementation should return the number of payload bytes
> - * that were transferred, or a negative error-code on failure. Helpers
> - * propagate errors from the .transfer() function, with the exception of
> - * the -EBUSY error, which causes a transaction to be retried. On a short,
> - * helpers will return -EPROTO to make it simpler to check for failure.
> + * Drivers provide a hardware-specific implementation of how transactions are
> executed via the
> + * .transfer() function. A pointer to a drm_dp_aux_msg structure describing
> the transaction is
> + * passed into this function. Upon success, the implementation should return
> the number of payload
> + * bytes that were transferred, or a negative error-code on failure. Helpers
> propagate errors from
> + * the .transfer() function, with the exception of the -EBUSY error, which
> causes a transaction to
> + * be retried. On a short, helpers will return -EPROTO to make it simpler to
> check for failure.
>   *
> - * An AUX channel can also be used to transport I2C messages to a sink. A
> - * typical application of that is to access an EDID that's present in the
> - * sink device. The .transfer() function can also be used to execute such
> - * transactions. The drm_dp_aux_register() function registers an I2C
> - * adapter that can be passed to drm_probe_ddc(). Upon removal, drivers
> - * should call drm_dp_aux_unregister() to remove the I2C adapter.
> - * The I2C adapter uses long transfers by default; if a partial response is
> - * received, the adapter will drop down to the size given by the partial
> - * response for this transaction only.
> + * An AUX channel can also be used to transport I2C messages to a sink. A
> typical application of
> + * that is to access an EDID that's present in the sink device. The
> .transfer() function can also be
> + * used to execute such transactions. The drm_dp_aux_register() function
> registers an I2C adapter
> + * that can be passed to drm_probe_ddc(). Upon removal, drivers should call
> drm_dp_aux_unregister()
> + * to remove the I2C adapter. The I2C adapter uses long transfers by default;
> if a partial response
> + * is received, the adapter will drop down to the size given by the partial
> response for this
> + * transaction only.
>   *
> - * Note that the aux helper code assumes that the .transfer() function
> - * only modifies the reply field of the drm_dp_aux_msg structure.  The
> - * retry logic and i2c helpers assume this is the case.
> + * Note that the aux helper code assumes that the .transfer() function only
> modifies the reply field
> + * of the drm_dp_aux_msg structure. The retry logic and i2c helpers assume
> this is the case.
>   */
>  struct drm_dp_aux {
>         const char *name;
>
diff mbox series

Patch

diff --git a/include/drm/drm_dp_helper.h b/include/drm/drm_dp_helper.h
index edffd1dcca3e..2891a98eebc8 100644
--- a/include/drm/drm_dp_helper.h
+++ b/include/drm/drm_dp_helper.h
@@ -1839,34 +1839,28 @@  struct drm_dp_aux_cec {
  * @crc_count: counter of captured frame CRCs
  * @transfer: transfers a message representing a single AUX transaction
  *
- * The .dev field should be set to a pointer to the device that implements
- * the AUX channel.
+ * The .dev field should be set to a pointer to the device that implements the AUX channel.
  *
- * The .name field may be used to specify the name of the I2C adapter. If set to
- * NULL, dev_name() of .dev will be used.
+ * The .name field may be used to specify the name of the I2C adapter. If set to NULL, dev_name() of
+ * .dev will be used.
  *
- * Drivers provide a hardware-specific implementation of how transactions
- * are executed via the .transfer() function. A pointer to a drm_dp_aux_msg
- * structure describing the transaction is passed into this function. Upon
- * success, the implementation should return the number of payload bytes
- * that were transferred, or a negative error-code on failure. Helpers
- * propagate errors from the .transfer() function, with the exception of
- * the -EBUSY error, which causes a transaction to be retried. On a short,
- * helpers will return -EPROTO to make it simpler to check for failure.
+ * Drivers provide a hardware-specific implementation of how transactions are executed via the
+ * .transfer() function. A pointer to a drm_dp_aux_msg structure describing the transaction is
+ * passed into this function. Upon success, the implementation should return the number of payload
+ * bytes that were transferred, or a negative error-code on failure. Helpers propagate errors from
+ * the .transfer() function, with the exception of the -EBUSY error, which causes a transaction to
+ * be retried. On a short, helpers will return -EPROTO to make it simpler to check for failure.
  *
- * An AUX channel can also be used to transport I2C messages to a sink. A
- * typical application of that is to access an EDID that's present in the
- * sink device. The .transfer() function can also be used to execute such
- * transactions. The drm_dp_aux_register() function registers an I2C
- * adapter that can be passed to drm_probe_ddc(). Upon removal, drivers
- * should call drm_dp_aux_unregister() to remove the I2C adapter.
- * The I2C adapter uses long transfers by default; if a partial response is
- * received, the adapter will drop down to the size given by the partial
- * response for this transaction only.
+ * An AUX channel can also be used to transport I2C messages to a sink. A typical application of
+ * that is to access an EDID that's present in the sink device. The .transfer() function can also be
+ * used to execute such transactions. The drm_dp_aux_register() function registers an I2C adapter
+ * that can be passed to drm_probe_ddc(). Upon removal, drivers should call drm_dp_aux_unregister()
+ * to remove the I2C adapter. The I2C adapter uses long transfers by default; if a partial response
+ * is received, the adapter will drop down to the size given by the partial response for this
+ * transaction only.
  *
- * Note that the aux helper code assumes that the .transfer() function
- * only modifies the reply field of the drm_dp_aux_msg structure.  The
- * retry logic and i2c helpers assume this is the case.
+ * Note that the aux helper code assumes that the .transfer() function only modifies the reply field
+ * of the drm_dp_aux_msg structure. The retry logic and i2c helpers assume this is the case.
  */
 struct drm_dp_aux {
 	const char *name;