stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* patch "iio-light: Use a signed return type for ltr501_match_samp_freq()" added to staging-linus
@ 2016-02-01 21:08 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2016-02-01 21:08 UTC (permalink / raw)
  To: elfring, Stable, jic23, pmeerw


This is a note to let you know that I've just added the patch titled

    iio-light: Use a signed return type for ltr501_match_samp_freq()

to my staging git tree which can be found at
    git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
in the staging-linus branch.

The patch will show up in the next release of the linux-next tree
(usually sometime within the next 24 hours during the week.)

The patch will hopefully also be merged in Linus's tree for the
next -rc kernel release.

If you have any questions about this process, please let me know.


>From c08ae18560aaed50fed306a2e11f36ce70130f65 Mon Sep 17 00:00:00 2001
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 19 Dec 2015 14:14:54 +0100
Subject: iio-light: Use a signed return type for ltr501_match_samp_freq()

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>
Acked-by: Peter Meerwald-Stadler <pmeerw@pmeerw.net>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
---
 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 809a961b9a7f..6bf89d8f3741 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;
-- 
2.7.0



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2016-02-01 21:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-01 21:08 patch "iio-light: Use a signed return type for ltr501_match_samp_freq()" added to staging-linus gregkh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).