Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1295548 > unrolled thread

[PATCH] ASoC: ssm2518: Use a signed return type for ssm2518_lookup_mcs()

Started bySF Markus Elfring <elfring@users.sourceforge.net>
First post2015-12-20 10:50 +0100
Last post2015-12-20 10:50 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH] ASoC: ssm2518: Use a signed return type for  ssm2518_lookup_mcs() SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-20 10:50 +0100

#1295548 — [PATCH] ASoC: ssm2518: Use a signed return type for ssm2518_lookup_mcs()

FromSF Markus Elfring <elfring@users.sourceforge.net>
Date2015-12-20 10:50 +0100
Subject[PATCH] ASoC: ssm2518: Use a signed return type for ssm2518_lookup_mcs()
Message-ID<qHIMN-7hS-9@gated-at.bofh.it>
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sun, 20 Dec 2015 10:34:25 +0100

The return type "unsigned int" was used by the ssm2518_lookup_mcs()
function even though 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>
---
 sound/soc/codecs/ssm2518.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/codecs/ssm2518.c b/sound/soc/codecs/ssm2518.c
index 86b81a6..e2e0bfa 100644
--- a/sound/soc/codecs/ssm2518.c
+++ b/sound/soc/codecs/ssm2518.c
@@ -309,7 +309,7 @@ static const struct snd_pcm_hw_constraint_list ssm2518_constraints_12288000 = {
 	.count = ARRAY_SIZE(ssm2518_rates_12288000),
 };
 
-static unsigned int ssm2518_lookup_mcs(struct ssm2518 *ssm2518,
+static int ssm2518_lookup_mcs(struct ssm2518 *ssm2518,
 	unsigned int rate)
 {
 	const unsigned int *sysclks = NULL;
-- 
2.6.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web