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: 412891 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp609706jai; Wed, 31 Mar 2021 08:56:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzjmwa9xiFCd+etuEV27ttOZdEqhlgSjAH4mEd2T7j3Z8w+RTM/ua0jt7xbU8IlQj7dU0Hp X-Received: by 2002:a05:6402:2076:: with SMTP id bd22mr4537123edb.378.1617206186870; Wed, 31 Mar 2021 08:56:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617206186; cv=none; d=google.com; s=arc-20160816; b=BHTZU9imGdmali9vEntuYi52MvoMLouJkRwtAZ0UKs6/ue5HtGrPDMAlqBymqn/lRo uTq/VFrqRCHL3FvtYAjXkxrnbeubMYkR6yMxhvEX+bfbyQ2B7olKDqT5nlKby7x0RlJf vtDOjUGbTKu8mXaMd8+EaZ4IWWnTRasMrPpfuheCyksf8nPbxvKhLinSOqltyQPaCvxw XTpKn5x7Ky4hbs5yqcDuItlXuGGVz/Lp5keTvcXTmC+5cA6mW5TqAKpz0jRn+5jmD4pF Tm9Sjt5UN7rsTSRZqVp9jMEGOy0O95o+uFr3cPnzpD4zEouspdH3/MBmGP9sZ/JYfrYo BAhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=6jXfiCGCk9MW3cWg2IjwpzMpfN9pVWa0ld1FwH9zXkg=; b=On60awvedcScAXNdZ2PV8GU63MaXqaz/zbPvxNycHWj1LWBlmjiHHuIeo1unEjZ3C5 9/9IVEgcYCUekIvM5IGiY/S+hsTf4Ndg4t4NN22CHcRC6tm8UaiRfczaevMwtzoY6kV9 Q0dhIxEFAQWUq04CuQdfsPX0XQ9eLc6uiKwfWPDC678ANXSmDTRfGrwYQApjO3xqXF/Z 1291q+UwQYfFrzF9w9SjDzSq6obBhBCHzhgaxnQzI10HSYkyWJuG3z9POkGLM3uzt3pY WyFqBxp36blA1Rk1ie/HrYl0vk4uuksUmkbGPli2pygKaoKAJlZ7XDhJOJ5piu5nOnEG 0Ohg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GmS6uYKw; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r7si2145851edt.237.2021.03.31.08.56.26; Wed, 31 Mar 2021 08:56:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GmS6uYKw; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233575AbhCaPzy (ORCPT + 17 others); Wed, 31 Mar 2021 11:55:54 -0400 Received: from mail.kernel.org ([198.145.29.99]:39260 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233433AbhCaPzb (ORCPT ); Wed, 31 Mar 2021 11:55:31 -0400 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 Cc: Vinod Koul , Bjorn Andersson , Bard Liao , Pierre-Louis Bossart , Sanyog Kale , linux-arm-msm@vger.kernel.org, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, kernel test robot 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 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org 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 --- drivers/soundwire/qcom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.26.3 Reviewed-by: Pierre-Louis Bossart Reviewed-by: Bjorn Andersson 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);