From: Jonathan Cameron <jic23@kernel.org>
To: Lars-Peter Clausen <lars@metafoo.de>
Cc: Jonathan Cameron <jic23@cam.ac.uk>,
linux-iio@vger.kernel.org, Milo Kim <Milo.Kim@ti.com>,
anish kumar <anish198519851985@gmail.com>
Subject: Re: [PATCH 1/4] iio: consumer.h: Fix kernel doc incosistency
Date: Sat, 15 Sep 2012 10:10:06 +0100 [thread overview]
Message-ID: <505445EE.5050601@kernel.org> (raw)
In-Reply-To: <1347636104-3419-1-git-send-email-lars@metafoo.de>
On 09/14/2012 04:21 PM, Lars-Peter Clausen wrote:
> For the iio_read_channel_raw and iio_read_channel_scale the kerneldoc comment
> refers to an argument called "channel", while the argument is called "chan" in
> the function signature. This leads to the following warnings from kerneldoc:
>
> Warning(include/linux/iio/consumer.h:71): No description found for parameter 'chan'
> Warning(include/linux/iio/consumer.h:71): Excess function parameter 'channel' description in 'iio_read_channel_raw'
> Warning(include/linux/iio/consumer.h:109): No description found for parameter 'chan'
> Warning(include/linux/iio/consumer.h:109): Excess function parameter 'channel' description in 'iio_read_channel_scale'
>
> This patch fixes the warnings by naming them consistently.
>
> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Why do it this way round? It is inconsistent with most of the other functions
in consumer.h and if you were to do this I'd argue in favour of also changing
the naming in the implementation.. Much easier to just change the documentation
to match the implementation!
> ---
> include/linux/iio/consumer.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/include/linux/iio/consumer.h b/include/linux/iio/consumer.h
> index 06ab4ec..27759ac3 100644
> --- a/include/linux/iio/consumer.h
> +++ b/include/linux/iio/consumer.h
> @@ -67,7 +67,7 @@ void iio_channel_release_all(struct iio_channel *chan);
> * Note raw reads from iio channels are in adc counts and hence
> * scale will need to be applied if standard units required.
> */
> -int iio_read_channel_raw(struct iio_channel *chan,
> +int iio_read_channel_raw(struct iio_channel *channel,
> int *val);
>
> /**
> @@ -90,7 +90,7 @@ int iio_get_channel_type(struct iio_channel *channel,
> * as IIO_VAL_INT_PLUS_MICRO telling us we have a value of val
> * + val2/1e6
> */
> -int iio_read_channel_scale(struct iio_channel *chan, int *val,
> +int iio_read_channel_scale(struct iio_channel *channel, int *val,
> int *val2);
>
> #endif
>
prev parent reply other threads:[~2012-09-15 9:10 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-14 15:21 [PATCH 1/4] iio: consumer.h: Fix kernel doc incosistency Lars-Peter Clausen
2012-09-14 15:21 ` [PATCH 2/4] iio: Introduce a new fractional value type Lars-Peter Clausen
2012-09-15 9:13 ` Jonathan Cameron
2012-09-14 15:21 ` [PATCH 3/4] iio:inkern: Add function to read the processed value Lars-Peter Clausen
2012-09-15 9:26 ` Jonathan Cameron
2012-09-15 9:31 ` Lars-Peter Clausen
2012-09-15 9:35 ` Jonathan Cameron
2012-09-14 15:21 ` [PATCH 4/4] staging:iio:hwmon bridge: Use iio_read_channel_processed Lars-Peter Clausen
2012-09-15 9:10 ` Jonathan Cameron [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=505445EE.5050601@kernel.org \
--to=jic23@kernel.org \
--cc=Milo.Kim@ti.com \
--cc=anish198519851985@gmail.com \
--cc=jic23@cam.ac.uk \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.