From: angkery <angkery@163.com>
To: dmitry.torokhov@gmail.com, hdegoede@redhat.com,
rajatja@google.com, luomeng12@huawei.com, gustavoars@kernel.org
Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
Junlin Yang <yangjunlin@yulong.com>
Subject: [PATCH] Input: i8042: Remove unneeded variable
Date: Thu, 25 Feb 2021 17:29:43 +0800 [thread overview]
Message-ID: <20210225092943.657-1-angkery@163.com> (raw)
From: Junlin Yang <yangjunlin@yulong.com>
The variable "delay" is initialized to zero and then returned.
So remove the delay variable and return zero.
Generated by:scripts/coccinelle/misc/returnvar.cocci
Signed-off-by: Junlin Yang <yangjunlin@yulong.com>
---
drivers/input/serio/i8042.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c
index abae23a..145bda1 100644
--- a/drivers/input/serio/i8042.c
+++ b/drivers/input/serio/i8042.c
@@ -1126,7 +1126,6 @@ static void i8042_controller_reset(bool s2r_wants_reset)
static long i8042_panic_blink(int state)
{
- long delay = 0;
char led;
led = (state) ? 0x01 | 0x04 : 0;
@@ -1142,7 +1141,7 @@ static long i8042_panic_blink(int state)
dbg("%02x -> i8042 (panic blink)\n", led);
i8042_write_data(led);
DELAY;
- return delay;
+ return 0;
}
#undef DELAY
--
1.9.1
next reply other threads:[~2021-02-25 13:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-25 9:29 angkery [this message]
2021-02-25 15:30 ` [PATCH] Input: i8042: Remove unneeded variable kernel test robot
2021-02-25 15:36 ` kernel test robot
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=20210225092943.657-1-angkery@163.com \
--to=angkery@163.com \
--cc=dmitry.torokhov@gmail.com \
--cc=gustavoars@kernel.org \
--cc=hdegoede@redhat.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luomeng12@huawei.com \
--cc=rajatja@google.com \
--cc=yangjunlin@yulong.com \
/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).