From mboxrd@z Thu Jan 1 00:00:00 1970 From: SF Markus Elfring Subject: [PATCH] ASoC: ssm2518: Use a signed return type for ssm2518_lookup_mcs() Date: Sun, 20 Dec 2015 10:40:24 +0100 Message-ID: <56767788.4020709@users.sourceforge.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mout.web.de (mout.web.de [212.227.15.4]) by alsa0.perex.cz (Postfix) with ESMTP id BE0F92606C9 for ; Sun, 20 Dec 2015 10:40:40 +0100 (CET) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: alsa-devel@alsa-project.org, Jaroslav Kysela , Lars-Peter Clausen , Liam Girdwood , Mark Brown , Takashi Iwai Cc: Julia Lawall , kernel-janitors@vger.kernel.org, LKML List-Id: alsa-devel@alsa-project.org From: Markus Elfring 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 --- 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