From: xiakaixu1987@gmail.com
To: dmitry.torokhov@gmail.com
Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
Kaixu Xia <kaixuxia@tencent.com>
Subject: [PATCH] Input: synaptics-rmi4 - remove the useless unsigned variable compared with zero
Date: Mon, 23 Nov 2020 14:37:08 +0800 [thread overview]
Message-ID: <1606113428-21462-1-git-send-email-kaixuxia@tencent.com> (raw)
From: Kaixu Xia <kaixuxia@tencent.com>
It is always true that the value of unsigned variable size_presence_reg
greater than or equal to zero, so compared with zero is unnecessary.
Remove it.
Reported-by: Tosk Robot <tencent_os_robot@tencent.com>
Signed-off-by: Kaixu Xia <kaixuxia@tencent.com>
---
drivers/input/rmi4/rmi_driver.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/input/rmi4/rmi_driver.c b/drivers/input/rmi4/rmi_driver.c
index 258d5fe3d395..e7c9300417e3 100644
--- a/drivers/input/rmi4/rmi_driver.c
+++ b/drivers/input/rmi4/rmi_driver.c
@@ -580,7 +580,7 @@ int rmi_read_register_desc(struct rmi_device *d, u16 addr,
return ret;
++addr;
- if (size_presence_reg < 0 || size_presence_reg > 35)
+ if (size_presence_reg > 35)
return -EIO;
memset(buf, 0, sizeof(buf));
--
2.20.0
reply other threads:[~2020-11-23 6:37 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1606113428-21462-1-git-send-email-kaixuxia@tencent.com \
--to=xiakaixu1987@gmail.com \
--cc=dmitry.torokhov@gmail.com \
--cc=kaixuxia@tencent.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@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).