From: Jonathan Cameron <jic23@kernel.org>
To: SF Markus Elfring <elfring@users.sourceforge.net>,
linux-iio@vger.kernel.org, Hartmut Knaack <knaack.h@gmx.de>,
Lars-Peter Clausen <lars@metafoo.de>,
Peter Meerwald <pmeerw@pmeerw.net>
Cc: LKML <linux-kernel@vger.kernel.org>,
kernel-janitors@vger.kernel.org,
Julia Lawall <julia.lawall@lip6.fr>
Subject: Re: [PATCH] iio-light: Use a signed return type for ltr501_match_samp_freq()
Date: Sat, 19 Dec 2015 15:02:48 +0000 [thread overview]
Message-ID: <56757198.6020001@kernel.org> (raw)
In-Reply-To: <56755A4D.7000406@users.sourceforge.net>
On 19/12/15 13:23, SF Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Sat, 19 Dec 2015 14:14:54 +0100
>
> The return type "unsigned int" was used by the ltr501_match_samp_freq()
> function despite of the aspect that it will eventually return a negative
> error code.
> Improve this implementation detail by deletion of the type modifier then.
>
> This issue was detected by using the Coccinelle software.
>
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Applied to the fixes-togreg branch of iio.git and marked for stable.
Peter, I'll probably hold this locally for a few days anyway as Greg
hasn't picked up the previous pull request yet. So if you want
to add anything give me a shout.
Jonathan
> ---
> drivers/iio/light/ltr501.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/iio/light/ltr501.c b/drivers/iio/light/ltr501.c
> index 809a961..6bf89d8 100644
> --- a/drivers/iio/light/ltr501.c
> +++ b/drivers/iio/light/ltr501.c
> @@ -180,7 +180,7 @@ static const struct ltr501_samp_table ltr501_ps_samp_table[] = {
> {500000, 2000000}
> };
>
> -static unsigned int ltr501_match_samp_freq(const struct ltr501_samp_table *tab,
> +static int ltr501_match_samp_freq(const struct ltr501_samp_table *tab,
> int len, int val, int val2)
> {
> int i, freq;
>
prev parent reply other threads:[~2015-12-19 15:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-19 13:23 [PATCH] iio-light: Use a signed return type for ltr501_match_samp_freq() SF Markus Elfring
2015-12-19 15:02 ` 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=56757198.6020001@kernel.org \
--to=jic23@kernel.org \
--cc=elfring@users.sourceforge.net \
--cc=julia.lawall@lip6.fr \
--cc=kernel-janitors@vger.kernel.org \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pmeerw@pmeerw.net \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox