Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp4293137pxu; Tue, 1 Dec 2020 01:02:17 -0800 (PST) X-Google-Smtp-Source: ABdhPJziGVWaqE8m7qYbKvfEY4gvfbsLxqrVPktldnQKUBqJ+LI/xzXVQkOXDzLRRYr/fxFcG4wc X-Received: by 2002:a05:6402:1b19:: with SMTP id by25mr1961311edb.108.1606813337559; Tue, 01 Dec 2020 01:02:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606813337; cv=none; d=google.com; s=arc-20160816; b=cOuWaGIXFMy/41Ob+7SCxPwREHUiWcIuHw/Ryc71IS6aA6I9KqucnPJhajXsZev/pL 0dmSikJm008/S5n5Z9r1E9clN6FF7PKb0aruvkBrf3iNJWKIKZhg/aOPgiBdDlfSNmv3 DESMwdjiNPnv6PO8pnVijqMjG0b77dF8QYsJ5C2jsBIzUUQ23eJKpSZFVRt9soIwEsiZ JJpi6IqKlz4Pf01Ze8ZHqtPk/EKNeI9lK58+TO9I3NtUOOOoYJfE+pS65Iq5fos8DUdR 3cPV6wKD1Zz8O9YEGxvHNe1rwIRONI7xsSheF4sNBCWcgqnF4l+l63PEHbcXwsRvSM0H LZyg== 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=pBzYvdLkhHHij4ZVNvMjbOY7YnZ/Dmc44vD84xpBQyA=; b=Mzn7hERPXyvnDG95UbWNOSluycC7JL4bZ7JKLgWY69dHdb1QLW0eXIuPpB7r3poqpq cW10Z02BueOCUt+WkrbhpZT/ND0MJxoFQZxeRx3UeuiYfi7pgysxMo+wNFkvTtjLbZGf cTpas+/GM9NVGfpjRb2mmayLLmIhe7sGMoAqPB5rxzkrJXKD/crhV57vPpw4JcmgyakD dOWnRPQzj6lQuFastKgC6a/+q0wrJvx4Fw7pg0n1g9G+fCN+oVxWe8BR7Ph7uDJRVbzu nx65f+qCwFyfAvR0s+wu7A5LRaBqovoNDYAnaDpuZ2BZBU9HgjTgrcX+eGGoQ9S5/f8y C70Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=owNrlNU2; 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 ec4si512757ejb.549.2020.12.01.01.01.54; Tue, 01 Dec 2020 01:02: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=owNrlNU2; 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 S1729219AbgLAI5T (ORCPT + 99 others); Tue, 1 Dec 2020 03:57:19 -0500 Received: from mail.kernel.org ([198.145.29.99]:60560 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387776AbgLAI5J (ORCPT ); Tue, 1 Dec 2020 03:57:09 -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 8A82721D46; Tue, 1 Dec 2020 08:56:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1606812983; bh=vVo6xRBuEmD283EBAlMZ8JQd4NILCllEYVVQDL/wIg8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=owNrlNU2gS/qwNtdRxTiIym9XjTFKRLCQDmdum5Uej+zWbRZyNe8XdQR6djNXVO1e bb3DbT6jO/TSGtAazav6hZxh0iBXC6FPt91zIi7mPC655CXMODtQzaOYG3bib2UiWa 7rhCdTASE61ZENGfz1cbH9XgG5NmzyRWTapZ0t3s= 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.9 28/42] nfc: s3fwrn5: use signed integer for parsing GPIO numbers Date: Tue, 1 Dec 2020 09:53:26 +0100 Message-Id: <20201201084644.430476386@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201201084642.194933793@linuxfoundation.org> References: <20201201084642.194933793@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 3ed0adf6479b0..5b0c065bd279f 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