From: bongsu.jeon2@gmail.com
To: krzk@kernel.org, k.opasiak@samsung.com
Cc: linux-nfc@lists.01.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, <stable@vger.kernel.org>
Subject: [PATCH net-next 1/3] nfc: s3fwrn5: use signed integer for parsing GPIO numbers
Date: Fri, 27 Nov 2020 00:33:37 +0900 [thread overview]
Message-ID: <1606404819-30647-1-git-send-email-bongsu.jeon@samsung.com> (raw)
From: Krzysztof Kozlowski <krzk@kernel.org>
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")
Cc: <stable@vger.kernel.org>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
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 0ffa389..ae26594 100644
--- a/drivers/nfc/s3fwrn5/i2c.c
+++ b/drivers/nfc/s3fwrn5/i2c.c
@@ -25,8 +25,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;
--
1.9.1
next reply other threads:[~2020-11-26 15:35 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-26 15:33 bongsu.jeon2 [this message]
2020-11-26 15:33 ` [PATCH net-next 2/3] nfc: s3fwrn5: reduce the EN_WAIT_TIME bongsu.jeon2
2020-11-26 17:03 ` Krzysztof Kozlowski
2020-11-26 15:33 ` [PATCH net-next 3/3] nfc: s3fwrn5: extract the common phy blocks bongsu.jeon2
2020-11-26 17:12 ` Krzysztof Kozlowski
2020-11-26 23:09 ` Bongsu Jeon
2020-11-28 11:45 ` Krzysztof Kozlowski
2020-11-26 17:01 ` [PATCH net-next 1/3] nfc: s3fwrn5: use signed integer for parsing GPIO numbers Krzysztof Kozlowski
2020-11-26 22:53 ` Bongsu Jeon
2020-11-27 5:41 ` Bongsu Jeon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1606404819-30647-1-git-send-email-bongsu.jeon@samsung.com \
--to=bongsu.jeon2@gmail.com \
--cc=k.opasiak@samsung.com \
--cc=krzk@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfc@lists.01.org \
--cc=netdev@vger.kernel.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).