Message ID | 20200626065738.93412-8-lee.jones@linaro.org (mailing list archive) |
---|---|
State | Mainlined |
Commit | 02d88863198c48675ceb2a244e5985c5650e5fe6 |
Headers | show
Return-Path: <SRS0=pbEX=AH=lists.infradead.org=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@kernel.org> Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A4D431392 for <patchwork-linux-arm@patchwork.kernel.org>; Fri, 26 Jun 2020 10:39:08 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 6CE4E20775 for <patchwork-linux-arm@patchwork.kernel.org>; Fri, 26 Jun 2020 10:39:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="dhpw5M3s"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="Vfi1pBqW" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6CE4E20775 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Ms/V5Bq7XX2Nkotu8fVNeliOdiIqVyJL1tICvf9OilA=; b=dhpw5M3spiq8VfF4qe1ZdttE7 DG+/sIK576BMsSIFW+o8QBhz13xvD7OfjvGI6kwqvozSRhXK/QrXcNbmnrQfGH2a+oC04KIe5k1Ul RXoNv+8GpX6TSYEKvN19bq7FWq5w2XdWHl4xu9Mtx9vWQpw+bvBOky5AKQHEVZqlqgKgF2JyjTXCP isiaYg8RIrQ3GD/SDfX1DQPgqWgyhjonyKdesj1YtSd0HwsxRiNZbm9mU7nfmRPqpkuYnNA24UoYN qq0dC8WU3GkwetbUzG7ABQ6dMQG3SctgzWA8dkImDoFZdzCik0IPevm+mJoW6BqKCCqdANW76u1On wKrNJP2ZQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jolj1-0007rx-Lc; Fri, 26 Jun 2020 10:36:51 +0000 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jolid-0007fG-9d for linux-arm-kernel@lists.infradead.org; Fri, 26 Jun 2020 10:36:32 +0000 Received: by mail-wm1-x344.google.com with SMTP id u26so8603192wmn.1 for <linux-arm-kernel@lists.infradead.org>; Fri, 26 Jun 2020 03:36:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=LxP+pj5dAfq9jSQlmqxGkL2BQjDUMxM20D8uW61hd/0=; b=Vfi1pBqWKvy+Zc8b6ok7wbVccd/dzbvbdRZeJ5pR8nYf1oFkBEn+32PfanZ68mKmr4 X7Tz4VRmpdTJNEbXUjgt/SMOKgRA7SoYdp1+rdmzItdFaoND9odQiqI4x7PWlymMow7j 47xl3ZNui7jVUD3/NPVzpvi3EVWYilYP2Jzrcr63XY4eDP1liqeFJQyXGPgziN12Wj82 b/Wl7AaVTxk1N7JZssKKbllkIfoVOUuPtnnjpdNEOVIDFnW/8NycoeMynve7OiuLkyFm MSiuq21fBdUJwWGnr52ypxku7WTHmFnVpZf+bceWW8T7hjkb7IxLrE+km3hzsv6Wnq9y QqIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=LxP+pj5dAfq9jSQlmqxGkL2BQjDUMxM20D8uW61hd/0=; b=NIHexWLHn/YMXMSIsz/uFmzkl6WcIZukfNKL7A+UogX62YbVywMYyzi1v2yo9PMqQ1 F30s5OdQcRlyBOvZvpKRxiEak3grFYiQBOflauaBe53HV96q4ug66AiZhMqKhwFkiEMo W81ku4j7Nrm8DnOCOPikS5WxBTNfVwF1Xy+dXrNszzHLyAcs5uFMJb9eyk3LigyICFjQ veBoEPFg6ulzz8zGeH5+LmDNRh+VW18ih1yE7pVto15A3QUn0RuuAKTSoAsIHhdZUdPX KhlmK/fmP1q2Jdg6cosPoSc/X6Nlty6/pIHeZDqi9D5qJB0n09ayeBMlqFsgb7KwJm6U c3Mg== X-Gm-Message-State: AOAM530IPkrdydHWSOia3Tus8C1KSk7hJw8p/dfIAUAmcW90kwR9Xk4k Tcfvm7xlun+uTF67kn3u/2iIsraScoI= X-Google-Smtp-Source: ABdhPJw73SIBNHcTFiMa5r63xLyQriFo1/WVEXa9xIrz7jwg0GpR9c0vG5B4g091gEXs8yriVT/9Og== X-Received: by 2002:a1c:4185:: with SMTP id o127mr1808366wma.8.1593154669736; Thu, 25 Jun 2020 23:57:49 -0700 (PDT) Received: from localhost.localdomain ([2.27.35.144]) by smtp.gmail.com with ESMTPSA id x18sm15355269wmi.35.2020.06.25.23.57.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jun 2020 23:57:49 -0700 (PDT) From: Lee Jones <lee.jones@linaro.org> To: broonie@kernel.org, lgirdwood@gmail.com Subject: [PATCH 7/9] regulator: tps65218-regulator: Remove pointless 'is unsigned int <0' check Date: Fri, 26 Jun 2020 07:57:36 +0100 Message-Id: <20200626065738.93412-8-lee.jones@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200626065738.93412-1-lee.jones@linaro.org> References: <20200626065738.93412-1-lee.jones@linaro.org> MIME-Version: 1.0 X-Spam-Note: CRM114 invocation failed X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:344 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Cc: Dave Gerlach <d-gerlach@ti.com>, Keerthy <j-keerthy@ti.com>, linux-kernel@vger.kernel.org, Tero Kristo <t-kristo@ti.com>, linux-omap@vger.kernel.org, Lee Jones <lee.jones@linaro.org>, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org |
Series |
Fix a bunch more W=1 warnings in Regulator
|
expand
|
diff --git a/drivers/regulator/tps65218-regulator.c b/drivers/regulator/tps65218-regulator.c index 05d13f8079182..9133d0af793a7 100644 --- a/drivers/regulator/tps65218-regulator.c +++ b/drivers/regulator/tps65218-regulator.c @@ -128,7 +128,7 @@ static int tps65218_pmic_set_suspend_enable(struct regulator_dev *dev) struct tps65218 *tps = rdev_get_drvdata(dev); unsigned int rid = rdev_get_id(dev); - if (rid < TPS65218_DCDC_1 || rid > TPS65218_LDO_1) + if (rid > TPS65218_LDO_1) return -EINVAL; return tps65218_clear_bits(tps, dev->desc->bypass_reg, @@ -141,7 +141,7 @@ static int tps65218_pmic_set_suspend_disable(struct regulator_dev *dev) struct tps65218 *tps = rdev_get_drvdata(dev); unsigned int rid = rdev_get_id(dev); - if (rid < TPS65218_DCDC_1 || rid > TPS65218_LDO_1) + if (rid > TPS65218_LDO_1) return -EINVAL; /*
'rid' is declared as unsigned int, so there is little point checking for <0. Removing these checks fixes the following W=1 warnings: drivers/regulator/tps65218-regulator.c: In function ‘tps65218_pmic_set_suspend_enable’: drivers/regulator/tps65218-regulator.c:131:10: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] 131 | if (rid < TPS65218_DCDC_1 || rid > TPS65218_LDO_1) | ^ drivers/regulator/tps65218-regulator.c: In function ‘tps65218_pmic_set_suspend_disable’: drivers/regulator/tps65218-regulator.c:144:10: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] 144 | if (rid < TPS65218_DCDC_1 || rid > TPS65218_LDO_1) | ^ Cc: Keerthy <j-keerthy@ti.com> Cc: Tero Kristo <t-kristo@ti.com> Cc: Dave Gerlach <d-gerlach@ti.com> Cc: linux-omap@vger.kernel.org Signed-off-by: Lee Jones <lee.jones@linaro.org> --- drivers/regulator/tps65218-regulator.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)