diff mbox series

[09/30] iio: dummy: iio_simple_dummy: Demote unworthy kerneldocs and correct misspelling

Message ID 20200716135928.1456727-10-lee.jones@linaro.org (mailing list archive)
State New, archived
Headers show
Series First batch of W=1 fixes for IIO | expand

Commit Message

Lee Jones July 16, 2020, 1:59 p.m. UTC
File header comments are not good candidates for kerneldoc.  Neither
are generic comment blocks.

Fixes the following W=1 kernel build warning(s):

 drivers/iio/dummy/iio_simple_dummy.c:26: warning: cannot understand function prototype: 'const struct config_item_type iio_dummy_type = '
 drivers/iio/dummy/iio_simple_dummy.c:564: warning: Function parameter or member 'name' not described in 'iio_dummy_probe'
 drivers/iio/dummy/iio_simple_dummy.c:564: warning: Excess function parameter 'index' description in 'iio_dummy_probe'
 drivers/iio/dummy/iio_simple_dummy.c:700: warning: cannot understand function prototype: 'const struct iio_sw_device_ops iio_dummy_device_ops = '

Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/iio/dummy/iio_simple_dummy.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Jonathan Cameron July 18, 2020, 2:39 p.m. UTC | #1
On Thu, 16 Jul 2020 14:59:07 +0100
Lee Jones <lee.jones@linaro.org> wrote:

> File header comments are not good candidates for kerneldoc.  Neither
> are generic comment blocks.
> 
> Fixes the following W=1 kernel build warning(s):
> 
>  drivers/iio/dummy/iio_simple_dummy.c:26: warning: cannot understand function prototype: 'const struct config_item_type iio_dummy_type = '
>  drivers/iio/dummy/iio_simple_dummy.c:564: warning: Function parameter or member 'name' not described in 'iio_dummy_probe'
>  drivers/iio/dummy/iio_simple_dummy.c:564: warning: Excess function parameter 'index' description in 'iio_dummy_probe'
>  drivers/iio/dummy/iio_simple_dummy.c:700: warning: cannot understand function prototype: 'const struct iio_sw_device_ops iio_dummy_device_ops = '
> 
Misspelling is an interesting way of describing that part.  I changed
it to "wrong parameter in docs".

Applied.

> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> ---
>  drivers/iio/dummy/iio_simple_dummy.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/iio/dummy/iio_simple_dummy.c b/drivers/iio/dummy/iio_simple_dummy.c
> index 6cb02299a2152..be66b26373723 100644
> --- a/drivers/iio/dummy/iio_simple_dummy.c
> +++ b/drivers/iio/dummy/iio_simple_dummy.c
> @@ -1,5 +1,5 @@
>  // SPDX-License-Identifier: GPL-2.0-only
> -/**
> +/*
>   * Copyright (c) 2011 Jonathan Cameron
>   *
>   * A reference industrial I/O driver to illustrate the functionality available.
> @@ -553,7 +553,7 @@ static int iio_dummy_init_device(struct iio_dev *indio_dev)
>  
>  /**
>   * iio_dummy_probe() - device instance probe
> - * @index: an id number for this instance.
> + * @name: name of this instance.
>   *
>   * Arguments are bus type specific.
>   * I2C: iio_dummy_probe(struct i2c_client *client,
> @@ -687,7 +687,7 @@ static int iio_dummy_remove(struct iio_sw_device *swd)
>  
>  	return 0;
>  }
> -/**
> +/*
>   * module_iio_sw_device_driver() -  device driver registration
>   *
>   * Varies depending on bus type of the device. As there is no device
diff mbox series

Patch

diff --git a/drivers/iio/dummy/iio_simple_dummy.c b/drivers/iio/dummy/iio_simple_dummy.c
index 6cb02299a2152..be66b26373723 100644
--- a/drivers/iio/dummy/iio_simple_dummy.c
+++ b/drivers/iio/dummy/iio_simple_dummy.c
@@ -1,5 +1,5 @@ 
 // SPDX-License-Identifier: GPL-2.0-only
-/**
+/*
  * Copyright (c) 2011 Jonathan Cameron
  *
  * A reference industrial I/O driver to illustrate the functionality available.
@@ -553,7 +553,7 @@  static int iio_dummy_init_device(struct iio_dev *indio_dev)
 
 /**
  * iio_dummy_probe() - device instance probe
- * @index: an id number for this instance.
+ * @name: name of this instance.
  *
  * Arguments are bus type specific.
  * I2C: iio_dummy_probe(struct i2c_client *client,
@@ -687,7 +687,7 @@  static int iio_dummy_remove(struct iio_sw_device *swd)
 
 	return 0;
 }
-/**
+/*
  * module_iio_sw_device_driver() -  device driver registration
  *
  * Varies depending on bus type of the device. As there is no device