From patchwork Sun Dec 20 09:40:24 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SF Markus Elfring X-Patchwork-Id: 7891521 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 988689F32E for ; Sun, 20 Dec 2015 09:41:02 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C3587204AD for ; Sun, 20 Dec 2015 09:41:01 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id F32F720481 for ; Sun, 20 Dec 2015 09:40:58 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id CD45C2606D7; Sun, 20 Dec 2015 10:40:56 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 3F0A12606CA; Sun, 20 Dec 2015 10:40:49 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id CD6312606CB; Sun, 20 Dec 2015 10:40:47 +0100 (CET) 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) Received: from [192.168.1.3] ([78.48.227.96]) by smtp.web.de (mrweb004) with ESMTPSA (Nemesis) id 0MfTx5-1ZqQvl2lNT-00P3nm; Sun, 20 Dec 2015 10:40:30 +0100 To: alsa-devel@alsa-project.org, Jaroslav Kysela , Lars-Peter Clausen , Liam Girdwood , Mark Brown , Takashi Iwai From: SF Markus Elfring Message-ID: <56767788.4020709@users.sourceforge.net> Date: Sun, 20 Dec 2015 10:40:24 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 X-Provags-ID: V03:K0:mXaV/SgHZkQn1e4wVsdAU6Exdad4diXvHkhD6/umd4siIP1Cap8 VbfxNzuflIJwp7omaAZEIKSWozkd11uiup8WkahGnHgK6Gv5ADmAsQ+pgq00Afh8EbMjPYZ rWTs6O9Wq2/n84NaYAigu9AhnF6pycoKK5ZiD1asUHroXy7p4ZPKbBb4rDAv7URhs6Fdzxh pjiqLT8OWz+Sfln21h0ig== X-UI-Out-Filterresults: notjunk:1; V01:K0:HlKbUleWP5A=:6frTLTMH0Ig3+3Q5sifLpc gVLd7Pq9msaxmnKCke50Z00PuDimBWl5QFQ0Yzk3AWsZYf+9H2TPeDj6YAESrzl00v8OqZTO3 TK1Khk6iBS8Os3aQnplR6N6vyLMxz17A+2JoYgx/Wwc38u9fsIKmWwcoKimvZZSHPkSvqNNP1 wZ7IH4++k2pvh0fnfqpvn6S4X7ZDT7DbkEA1heoYWZS18ijy/0w9IRPIacQDuBtrjqDtCC6ZJ YdXKWWXo+PRa3k6i/UjKg+KmHKHtl0Rhf+Y63cVZ6gQXoh/98euvzBDbSGjO/8cAl6+RDC1LP 8o1bqgkhlFYzx73bOnucpm0Lb/JzTTYuLBafXgqMyS2yUnhDQYl9BF2N1mFQ1EYlB7sg7iJOY ke/JY+TaHpiMaP4MMxcVj0UCCa/cdmJDuti3Hxzr4RdiQz17wo+d43M7ayn902ktzwx8cnPhD qp9Y9Ulv1p71aGieCjLCYHL1DmEkSQpH9OEnh62tGQaqvtmDT/b1wwgc6/m5AIpmxPiGqVvqa l+xMRFZa9FtViBXWKIv+iLfLpuSAfxm+IItZhRQZS1ejuzEzq9c6vmtKuSPPXiSChutP7v8tj VTdfmc+hwH2OJlZuKgkNJwZ6oYrvYUXfsjSyN/fwyo7KfJjQtuRiDrCGe/G8X2tFILgjARdeo HZBCQOe07CULYeN6h6OVzkgtbU3oZrdM4EmyjG1prN8/mgwgmATM38Z3FQc83bbI68GKVm1bY F4hHxw6y9dxUhEl5cOagawsISyM3tU5uX1tHf1/tJMz2zFtskxVrmFp5NQp1vD0m7oghjYQdi Kwtre/t Cc: Julia Lawall , kernel-janitors@vger.kernel.org, LKML Subject: [alsa-devel] [PATCH] ASoC: ssm2518: Use a signed return type for ssm2518_lookup_mcs() X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" 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 X-Virus-Scanned: ClamAV using ClamSMTP 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;