From patchwork Mon May 13 07:34:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 164004 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp1000396ili; Mon, 13 May 2019 00:34:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqywhg1QnyTkg7MpHcaO2LetEQa7tMdFpYEuJULgnV5u1E+6vbkIGExsLlkEalllKsQqx9AB X-Received: by 2002:a17:902:d715:: with SMTP id w21mr12737862ply.234.1557732885053; Mon, 13 May 2019 00:34:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557732885; cv=none; d=google.com; s=arc-20160816; b=sH8Q0O05/5mrQNq8rArvJxiypHBmBFGErLJeENTAAJA7CiZeQsyVCpBI2wPhESnV9B KhqVLcJCp6x2/FyvQRUZHEiOfnpUq0OQrIyJKWnT3OwMTFIWhIOUD6Aglcke7fzPjFs4 7l1oPnGwZWeSocrxfUC/Sha61m3FEtlg6FuA57QQmx8ULQTLi8YQhIWYodBLpQ7+mTNZ sWWCf5ahD6hmSMWVDKAAzTt9jXg0KBBrN6udDLanNJB/Z9+9KATcqALpott1JpjyZrud GFDeHhKhpLh6Tst7Owh205MmbhMmRBm48X572G/Q0PMyVqily/emarDu5wHOg9OLM1li Crpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=haQ6ph677t8ZOscojVyK7EbyIxkmtAMauBV824XBBeM=; b=k9cGKKB9toaWRLc61bUq3xnIFiPItJBbc9waNqE2TmtfCaAIZ09M0lm9yyV0ukERU9 7Im/9ZtW7lRfZOdxlIADFP8pJbM//bKDIsaZoI2Uzs95AXA3nPOdV6b9jwXm7BRBDpPl WIY1YGsPRpkoqmOaz76v5M+14WLDOl9mHT+oKQc/Gf8TU/Zx3IvxTwHaN/aEMpfyTNXm 5DJzga6CHNAOvBVR8T+jxrtHLoiANLsDnCuM/EdaZqGMiGqYiWWBzrP6swRdtEPR9sr/ m4qr18P366JPJzGlusm2VHJfN0p7HlwiHSCWjvJYeO2XGFbbPZY5kJPadhIl2OndZ4Ds j1sA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LnsKP2xU; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f3si10221982pln.263.2019.05.13.00.34.44; Mon, 13 May 2019 00:34:45 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LnsKP2xU; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728014AbfEMHem (ORCPT + 30 others); Mon, 13 May 2019 03:34:42 -0400 Received: from mail-wm1-f68.google.com ([209.85.128.68]:39279 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727440AbfEMHem (ORCPT ); Mon, 13 May 2019 03:34:42 -0400 Received: by mail-wm1-f68.google.com with SMTP id n25so12482793wmk.4 for ; Mon, 13 May 2019 00:34:41 -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; bh=haQ6ph677t8ZOscojVyK7EbyIxkmtAMauBV824XBBeM=; b=LnsKP2xUW4/hQoqpIysOFuXia9Hapy8nU1BFolQOB8c0yH8K6GH3E9Hw8avty3dusE 8wi/2YHum+QcZjbajUO8I9CZlBT2k45swDJsrO09WVVCmbZ7ZPcC7Vzm83dE0mbBA6/8 hejV413jPBLpvIIyts3r7klerRF6MojuEY5BB5ndNPRWOHn/nLWaqMFDcvFpUjM3zcdX HsdFfVmYylmD+gSxJ/H/ZpVVZQlff5Ir2Yzt4FG/3JJNZ7GzlaqM/JWe01rwDTUeuo/S OPPw5y+eEeiBG+prVSapCyhbw6FJuZ94hDeRiyD3hmPuGIeXbJvcZ/sbVmEbM1VCSuJi i/Qw== 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; bh=haQ6ph677t8ZOscojVyK7EbyIxkmtAMauBV824XBBeM=; b=W0LABFGflUoAgv9OjpooOjeLHQSf8kHNpEuRGIP3UYn2dQPfq3hlbKEkemBPHiqBPb zBQTnht70F2qIKQ9tVxT8pZx8BhsvgYWcSydAsjAMqVOjXx6rZRqaJ9RClO+UWiw8mSZ zZmPDavxbJRa1mv2pRrOgh3igxmZIdcYQIQDnh/PqoPDeY2jguvdpnSj4O0jqrs+3Lgm yhsXk7zmKUEjBnhl6/ITIDxlS0Azl/Wil4otKKX5nluRiLTmR1p56vFbWAiK6UZNL9Zj L7iC9ZValJ6qvLJQ1FTmO4/vCgr20M+QWLKA7g9NLPWitpYz9j6bmpF4zeOHcVbZ2piG 8Osw== X-Gm-Message-State: APjAAAXyKOoFXqk2tL9Bdrzua+Xsoq2E1c8VHgExfBcwQFPdkxypeE6b YJHiMSBZgADlhSx8POXJbyoFaA== X-Received: by 2002:a05:600c:24d2:: with SMTP id 18mr15328423wmu.117.1557732880915; Mon, 13 May 2019 00:34:40 -0700 (PDT) Received: from localhost.localdomain ([2.27.167.43]) by smtp.gmail.com with ESMTPSA id h14sm1009883wrt.11.2019.05.13.00.34.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 13 May 2019 00:34:40 -0700 (PDT) From: Lee Jones To: linus.walleij@linaro.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, amelie.delaunay@st.com, Lee Jones Subject: [PATCH 1/2] pinctrl: stmfx: Fix 'warn: unsigned is never less than zero' Date: Mon, 13 May 2019 08:34:28 +0100 Message-Id: <20190513073429.12023-1-lee.jones@linaro.org> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org smatch warnings: drivers/pinctrl/pinctrl-stmfx.c:225 stmfx_pinconf_get() warn: unsigned 'dir' is never less than zero. drivers/pinctrl/pinctrl-stmfx.c:228 stmfx_pinconf_get() warn: unsigned 'type' is never less than zero. drivers/pinctrl/pinctrl-stmfx.c:231 stmfx_pinconf_get() warn: unsigned 'pupd' is never less than zero. Reported-by: kbuild test robot Signed-off-by: Lee Jones --- drivers/pinctrl/pinctrl-stmfx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- 2.17.1 Reviewed-by: Linus Walleij diff --git a/drivers/pinctrl/pinctrl-stmfx.c b/drivers/pinctrl/pinctrl-stmfx.c index bcd81269445e..074c8fa3e75c 100644 --- a/drivers/pinctrl/pinctrl-stmfx.c +++ b/drivers/pinctrl/pinctrl-stmfx.c @@ -213,9 +213,8 @@ static int stmfx_pinconf_get(struct pinctrl_dev *pctldev, struct stmfx_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); u32 param = pinconf_to_config_param(*config); struct pinctrl_gpio_range *range; - u32 dir, type, pupd; u32 arg = 0; - int ret; + int ret, dir, type, pupd; range = pinctrl_find_gpio_range_from_pin_nolock(pctldev, pin); if (!range)