From: wangkailong@jari.cn
To: jdelvare@suse.com, linux@roeck-us.net
Cc: linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] hwmon: (amc6821) Fix unsigned expression compared with zero
Date: Thu, 3 Nov 2022 10:27:56 +0800 (GMT+08:00) [thread overview]
Message-ID: <1872639a.89.1843b5106aa.Coremail.wangkailong@jari.cn> (raw)
Fix the following coccicheck warning:
drivers/hwmon/amc6821.c:215: WARNING: Unsigned expression compared
with zero: reg > 0
drivers/hwmon/amc6821.c:228: WARNING: Unsigned expression compared
with zero: reg > 0
Signed-off-by: KaiLong Wang <wangkailong@jari.cn>
---
drivers/hwmon/amc6821.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/hwmon/amc6821.c b/drivers/hwmon/amc6821.c
index 3bfd12ff4b3c..1f5382f8d52b 100644
--- a/drivers/hwmon/amc6821.c
+++ b/drivers/hwmon/amc6821.c
@@ -166,7 +166,7 @@ static struct amc6821_data *amc6821_update_device(struct device *dev)
struct amc6821_data *data = dev_get_drvdata(dev);
struct i2c_client *client = data->client;
int timeout = HZ;
- u8 reg;
+ int reg;
int i;
mutex_lock(&data->update_lock);
--
2.25.1
next reply other threads:[~2022-11-03 2:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-03 2:27 wangkailong [this message]
2022-11-03 2:59 ` Randy Dunlap
2022-11-03 14:17 ` Guenter Roeck
2022-11-03 15:03 ` Randy Dunlap
2022-11-03 15:25 ` Guenter Roeck
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=1872639a.89.1843b5106aa.Coremail.wangkailong@jari.cn \
--to=wangkailong@jari.cn \
--cc=jdelvare@suse.com \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
/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
all inboxes | Powered by JetHome®