From patchwork Wed Mar 31 07:21:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinod Koul X-Patchwork-Id: 412835 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp261954jai; Wed, 31 Mar 2021 00:22:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwZc9jk5W1ZMbUukfwYBWjUO6vIwkd22oHnfAuNgnsnXRp5kWYDGNVd8VDsQIF2l1ZYEHEg X-Received: by 2002:a05:6402:c:: with SMTP id d12mr1984433edu.100.1617175330455; Wed, 31 Mar 2021 00:22:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617175330; cv=none; d=google.com; s=arc-20160816; b=eznDRpI+wJ6/eS1YDdzMK/ZbHnzIrX1+WHDaT2XqPyiArtse92gis2W/F750wWNX+J OewKjmZS3Iw3bIRzu8YHO0hXacu3/3tKZPR+AB3iO7xm1Xl2wd7SVVW87XyiwSQPJZiy t28ZEOzuHWzmHr3ldYpOg8RjdwnOkHH/EcUMbxuuwYjC+NS4HawtD2NlrHpmvN6/QOvT 1F1JLK3ovpE8VeeJhQCiWlNezfA6xF8Lb5jW8QT0I5fN4yym9hWUzbHQysah1KgjuLNw y+DAiSsWvR4vHSfpWLNkv4PNsicIUML2MitlPKhOdNHJBBBTSRHmZfnRDaR/7xXeh5SI s4eQ== 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=STJZ1OYx8jB/vHIlUBVWPcWZIejEmcMQ4btxhKIYmo4=; b=Ntt1WGQVKw2QS0EqYvz6Hn1fJNNnD2pgpgV0X/Ic50Rs3LIGefd1wAxjIlt/tXYLeI bNU02xyotCXqam4/woThruTiD/+B3HJRdB19l4rFfOWQPRQEuOQHJgG7BMWxBfsg//Rl n3AbQl1qEWhjTnQdIAen/yijZjl1jDJZFwRuBrLfqqiICWpivUVRKleckMaIvzqJkZLE TzLvxuj84+KKqzYTL6hTzGIMQH03ic4o1k4D6lAut33dtpP6uLplH/OviIc0l8mHghf/ mM43w4NKMjOMiWSkXA7geABKjFn+NbmUIrmn7q1QG+ELMLpMQfJCpTAXHAf1i/uf/1iU q37w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=cRlXjrD+; 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 l10si1068086edc.380.2021.03.31.00.22.09; Wed, 31 Mar 2021 00:22:10 -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=cRlXjrD+; 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 S233996AbhCaHVc (ORCPT + 17 others); Wed, 31 Mar 2021 03:21:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:40380 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233843AbhCaHVZ (ORCPT ); Wed, 31 Mar 2021 03:21:25 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4248D619D3; Wed, 31 Mar 2021 07:21:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1617175284; bh=BTW66Z06dN1EnDtCDk+B5PVhTFQ03DeugVVi33Kyn6g=; h=From:To:Cc:Subject:Date:From; b=cRlXjrD+sBhiggkelJca4Yru5SmIA2dMAaYw4G/zGGCKOuHN/CGuAYRP/vakrl8bl Pyu4U9EBSVsez7n4/Bf41cAlYGsb4QL5TWNJShnfDP8QHQfN7AFetC7KNCiEUAJVa7 YJOJNmSXWk0j1b6sKA7BFeBi9IfLi/utPcn3pPMA1RtmGHcQ6ahMRFVrCKAE1bXQpy OQgbcHlRqzs/ro7eCohXmxGvyndkcx4gn4CQb0hNUjxkKWaL6hOKmRvIm1D2yMQ73Z 9q3ZCXt6/8950v9Pd02qBX1qv//NhssFRibhpH2CU84z2979AMjzRuLrc2IBoqHvS9 5CQeIYuLtt7SA== 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] soundwire: qcom: use signed variable for error return Date: Wed, 31 Mar 2021 12:51:11 +0530 Message-Id: <20210331072111.2945945-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 for 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 instead. 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 diff --git a/drivers/soundwire/qcom.c b/drivers/soundwire/qcom.c index b08ecb9b418c..55ed133c6704 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; + s8 devnum = 0; int ret = IRQ_HANDLED; swrm->reg_read(swrm, SWRM_INTERRUPT_STATUS, &intr_sts);