From: Markus Elfring Date: Sat, 19 Dec 2015 13:14:54 +0000 (+0100) Subject: iio-light: Use a signed return type for ltr501_match_samp_freq() X-Git-Tag: v5.15~14251^2~1^2~8 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c08ae18560aaed50fed306a2e11f36ce70130f65;p=platform%2Fkernel%2Flinux-starfive.git 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 Acked-by: Peter Meerwald-Stadler Cc: Signed-off-by: Jonathan Cameron --- 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;