Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp4310897pxu; Tue, 1 Dec 2020 01:35:17 -0800 (PST) X-Google-Smtp-Source: ABdhPJyrnD9jJwzp4JMainPrr6ekfbO7phFXAnziFMnB+r7OR5t9tv/ySgwLlVTPu6lnZebqjDTR X-Received: by 2002:a50:e84d:: with SMTP id k13mr2050377edn.154.1606815317507; Tue, 01 Dec 2020 01:35:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606815317; cv=none; d=google.com; s=arc-20160816; b=kuFoZb6vS8VfASa6AN71/MQkZmY/9L8NyNFv4FM2en4E//o6tEZfD3KJEScypkPOHL vz6WMuQQXWq59RDcRMOktN8saZJhJSC0Ee/sD0yrxXuIa03E40pbU+d1dytGKIePvATz CBWy9wtQ6sP1I3WwVgcxBC3DWFboixr7kk4dPxKD65S2eBeG/VSyj9OZO+hSTBt/kWnd t7r/W1WgLGVjGTGTlwslgFCAiis05/n7rJGzjplDjqztLCx+Im1jtcJmzr+0jYvm+2Zi kqmaFWhnhHaqvU3hTvysr9HgDRp90UAKuwV9IjZ8BUjnGXH+hK1sObiRdGMqcW6NhcRO Rubw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=QkgQztQXLb+aT18E6mLRriQnsB/FzKQRh5sPl917XRY=; b=dYnnQ2GNX5d1Lvvt0a6lUgT0hc7q/sZYHyAgMp7lzweSdoK86MJvWHahA57Sf1X7NG 69rnPwN0PaOgNvdcFE5T9zibNYmF9JK3p8k/PYVq+rK59KEnvppAzY2R7H2oeU9LnMOV Hd1PrR5i6KKZIoUNmpf/YRV91oA76Lk8kDLPmH1Ie/aRcg19l0AP2sRCQZHSBLhb2bI0 QG+SguVqVjXqz5u8i9DcSTX0e8Z3T8Nv1W1WBdn3omZQui3HHNKX7fv+3Um/oagp3OFx s8/5iNnseti/baQlQ8tjbDr9LviSfhC7kvg5zn4ust/6yeElCvjCPv4OP8+m2vTX9v6o /mNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ERkrLWP3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u9si780125edr.63.2020.12.01.01.34.55; Tue, 01 Dec 2020 01:35:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-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=@linuxfoundation.org header.s=korg header.b=ERkrLWP3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391180AbgLAJ3z (ORCPT + 99 others); Tue, 1 Dec 2020 04:29:55 -0500 Received: from mail.kernel.org ([198.145.29.99]:34750 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388004AbgLAI7C (ORCPT ); Tue, 1 Dec 2020 03:59:02 -0500 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9D2152220B; Tue, 1 Dec 2020 08:58:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1606813102; bh=+KAV5TpWZsMtus3sPqDNKIJn9zEMcmInVFdr/5H7mBI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ERkrLWP30KmQtwgBD+ITCacuAI2xMCr2nKSamgSQJTTVdvKWMgkIQiK8rfPoFm4tN CKm6Glasxr2bIfORuJ0eQsQY3nbL8IUdfgf8/ON+GI9l+gnAzQjf17/GVui732K2Cg xI8DrqHOXCN++Ssu7VWdHOEMhPFD5xu1/Hlg91z8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Krzysztof Kozlowski , Jakub Kicinski , Sasha Levin Subject: [PATCH 4.14 34/50] nfc: s3fwrn5: use signed integer for parsing GPIO numbers Date: Tue, 1 Dec 2020 09:53:33 +0100 Message-Id: <20201201084649.241092843@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201201084644.803812112@linuxfoundation.org> References: <20201201084644.803812112@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Krzysztof Kozlowski [ Upstream commit d8f0a86795c69f5b697f7d9e5274c124da93c92d ] GPIOs - as returned by of_get_named_gpio() and used by the gpiolib - are signed integers, where negative number indicates error. The return value of of_get_named_gpio() should not be assigned to an unsigned int because in case of !CONFIG_GPIOLIB such number would be a valid GPIO. Fixes: c04c674fadeb ("nfc: s3fwrn5: Add driver for Samsung S3FWRN5 NFC Chip") Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201123162351.209100-1-krzk@kernel.org Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/nfc/s3fwrn5/i2c.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/nfc/s3fwrn5/i2c.c b/drivers/nfc/s3fwrn5/i2c.c index 3f09d7fd2285f..da7ca08d185e4 100644 --- a/drivers/nfc/s3fwrn5/i2c.c +++ b/drivers/nfc/s3fwrn5/i2c.c @@ -37,8 +37,8 @@ struct s3fwrn5_i2c_phy { struct i2c_client *i2c_dev; struct nci_dev *ndev; - unsigned int gpio_en; - unsigned int gpio_fw_wake; + int gpio_en; + int gpio_fw_wake; struct mutex mutex; -- 2.27.0