From patchwork Wed Mar 31 15:55:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinod Koul X-Patchwork-Id: 12175663 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.0 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 391E0C433B4 for ; Wed, 31 Mar 2021 15:56:35 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 19A5C61029 for ; Wed, 31 Mar 2021 15:56:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 19A5C61029 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 804B21660; Wed, 31 Mar 2021 17:55:42 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 804B21660 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1617206192; bh=DdAxpoEII7X/fiK9DIy81GeAD/w0tH8k+zXxR3jH5OU=; h=From:To:Subject:Date:Cc:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=vuezdj4g7Ypl74mJcKVnuBER0G9Tfp9lJ1KvB0Ipw4mZhamOiGYx+naqC90xJUODt czqU0m22TWmmLdXdwcixYObkfem8ATwPqP14kwKq5CylwwDfP4dJmVxz81LfIl02yM Ob0eMuvcfYVGVnlUPryLfXpMrmbejMNYRFYMT92A= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id DFC20F8015A; Wed, 31 Mar 2021 17:55:41 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 8B7AFF80166; Wed, 31 Mar 2021 17:55:40 +0200 (CEST) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 31ED5F8013C for ; Wed, 31 Mar 2021 17:55:33 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 31ED5F8013C Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="GmS6uYKw" Received: by mail.kernel.org (Postfix) with ESMTPSA id D52B961006; Wed, 31 Mar 2021 15:55:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1617206131; bh=DdAxpoEII7X/fiK9DIy81GeAD/w0tH8k+zXxR3jH5OU=; h=From:To:Cc:Subject:Date:From; b=GmS6uYKwWxOUkWYbuRf/2itDpnOJvyIKt35hgTs6x79z+IQGAbRAGpbNdfhiD+54Y fhzeh+xmkrAsnELIf5lZiG9SXYwYenIPCt3/HSoNuJCedttwDMeM5vtvuhOta6nJ8J Pk2CEKmvvGakZuf5ER/m3ibx3cenlCi88rZ4RTn5LQvtAOjj8pmr/wgwNq6Sx9il6y MGA4Lvw6ak+0pzoijg4a6NAALWobxavn+bfuOVYYZHole6fCKGeTkhMs4bzutFJmL5 3Vke09cOVrJFwQOQ/BqSqvK7etmeaB/ysnAZVRY9MSVPjqYcMJ9EVXrW8GqUUdupb1 4BCVhV8IlUHpg== From: Vinod Koul To: Srinivas Kandagatla Subject: [PATCH V2] soundwire: qcom: use signed variable for error return Date: Wed, 31 Mar 2021 21:25:20 +0530 Message-Id: <20210331155520.2987823-1-vkoul@kernel.org> X-Mailer: git-send-email 2.26.3 MIME-Version: 1.0 Cc: alsa-devel@alsa-project.org, kernel test robot , linux-arm-msm@vger.kernel.org, Pierre-Louis Bossart , Bjorn Andersson , Vinod Koul , Sanyog Kale , Bard Liao , linux-kernel@vger.kernel.org X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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" We get warning of using a unsigned variable being compared to less than zero. The comparison is correct as it checks for errors from previous call to qcom_swrm_get_alert_slave_dev_num(), so we should use a signed variable here. While at it, drop the superfluous initialization as well drivers/soundwire/qcom.c: qcom_swrm_irq_handler() warn: impossible condition '(devnum < 0) => (0-255 < 0)' Reported-by: kernel test robot Signed-off-by: Vinod Koul Reviewed-by: Pierre-Louis Bossart Reviewed-by: Bjorn Andersson --- drivers/soundwire/qcom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/soundwire/qcom.c b/drivers/soundwire/qcom.c index b08ecb9b418c..ec86c4e53fdb 100644 --- a/drivers/soundwire/qcom.c +++ b/drivers/soundwire/qcom.c @@ -428,7 +428,7 @@ static irqreturn_t qcom_swrm_irq_handler(int irq, void *dev_id) struct qcom_swrm_ctrl *swrm = dev_id; u32 value, intr_sts, intr_sts_masked, slave_status; u32 i; - u8 devnum = 0; + int devnum; int ret = IRQ_HANDLED; swrm->reg_read(swrm, SWRM_INTERRUPT_STATUS, &intr_sts);