diff mbox series

[-next] hwmon: Fix some kernel-doc comments

Message ID 20231110055341.39939-1-yang.lee@linux.alibaba.com (mailing list archive)
State Accepted
Headers show
Series [-next] hwmon: Fix some kernel-doc comments | expand

Commit Message

Yang Li Nov. 10, 2023, 5:53 a.m. UTC
Fix some kernel-doc comments to silence the warnings:
drivers/hwmon/sht4x.c:65: warning: Function parameter or member 'valid' not described in 'sht4x_data'
drivers/hwmon/sht4x.c:73: warning: Function parameter or member 'data' not described in 'sht4x_read_values'
drivers/hwmon/sht4x.c:73: warning: Excess function parameter 'sht4x_data' description in 'sht4x_read_values'

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=7220
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
---
 drivers/hwmon/sht4x.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Randy Dunlap Nov. 11, 2023, 3:06 a.m. UTC | #1
On 11/9/23 21:53, Yang Li wrote:
> Fix some kernel-doc comments to silence the warnings:
> drivers/hwmon/sht4x.c:65: warning: Function parameter or member 'valid' not described in 'sht4x_data'
> drivers/hwmon/sht4x.c:73: warning: Function parameter or member 'data' not described in 'sht4x_read_values'
> drivers/hwmon/sht4x.c:73: warning: Excess function parameter 'sht4x_data' description in 'sht4x_read_values'
> 
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=7220
> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>

Acked-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org>

Thanks.

> ---
>  drivers/hwmon/sht4x.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/hwmon/sht4x.c b/drivers/hwmon/sht4x.c
> index 7ee797410458..4883755d4b1e 100644
> --- a/drivers/hwmon/sht4x.c
> +++ b/drivers/hwmon/sht4x.c
> @@ -49,6 +49,7 @@ DECLARE_CRC8_TABLE(sht4x_crc8_table);
>   * struct sht4x_data - All the data required to operate an SHT4X chip
>   * @client: the i2c client associated with the SHT4X
>   * @lock: a mutex that is used to prevent parallel access to the i2c client
> + * @valid: validity of fields below
>   * @update_interval: the minimum poll interval
>   * @last_updated: the previous time that the SHT4X was polled
>   * @temperature: the latest temperature value received from the SHT4X
> @@ -66,7 +67,7 @@ struct sht4x_data {
>  
>  /**
>   * sht4x_read_values() - read and parse the raw data from the SHT4X
> - * @sht4x_data: the struct sht4x_data to use for the lock
> + * @data: the struct sht4x_data to use for the lock
>   * Return: 0 if successful, -ERRNO if not
>   */
>  static int sht4x_read_values(struct sht4x_data *data)
Guenter Roeck Nov. 14, 2023, 1:43 p.m. UTC | #2
On Fri, Nov 10, 2023 at 01:53:41PM +0800, Yang Li wrote:
> Fix some kernel-doc comments to silence the warnings:
> drivers/hwmon/sht4x.c:65: warning: Function parameter or member 'valid' not described in 'sht4x_data'
> drivers/hwmon/sht4x.c:73: warning: Function parameter or member 'data' not described in 'sht4x_read_values'
> drivers/hwmon/sht4x.c:73: warning: Excess function parameter 'sht4x_data' description in 'sht4x_read_values'
> 
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=7220
> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
> Acked-by: Randy Dunlap <rdunlap@infradead.org>
> Tested-by: Randy Dunlap <rdunlap@infradead.org>

Applied.

Thanks,
Guenter
diff mbox series

Patch

diff --git a/drivers/hwmon/sht4x.c b/drivers/hwmon/sht4x.c
index 7ee797410458..4883755d4b1e 100644
--- a/drivers/hwmon/sht4x.c
+++ b/drivers/hwmon/sht4x.c
@@ -49,6 +49,7 @@  DECLARE_CRC8_TABLE(sht4x_crc8_table);
  * struct sht4x_data - All the data required to operate an SHT4X chip
  * @client: the i2c client associated with the SHT4X
  * @lock: a mutex that is used to prevent parallel access to the i2c client
+ * @valid: validity of fields below
  * @update_interval: the minimum poll interval
  * @last_updated: the previous time that the SHT4X was polled
  * @temperature: the latest temperature value received from the SHT4X
@@ -66,7 +67,7 @@  struct sht4x_data {
 
 /**
  * sht4x_read_values() - read and parse the raw data from the SHT4X
- * @sht4x_data: the struct sht4x_data to use for the lock
+ * @data: the struct sht4x_data to use for the lock
  * Return: 0 if successful, -ERRNO if not
  */
 static int sht4x_read_values(struct sht4x_data *data)