* [PATCH] tty/isicom: remove redundant assignment to variable word_count
@ 2019-07-23 15:03 ` Colin King
0 siblings, 0 replies; 4+ messages in thread
From: Colin King @ 2019-07-23 15:03 UTC (permalink / raw)
To: Greg Kroah-Hartman, Jiri Slaby; +Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
The variable word_count is being assigned a value that is never read before
a return, the assignment is redundant and can be removed.
Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/tty/isicom.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/tty/isicom.c b/drivers/tty/isicom.c
index e04a43e89f6b..fc38f96475bf 100644
--- a/drivers/tty/isicom.c
+++ b/drivers/tty/isicom.c
@@ -553,7 +553,6 @@ static irqreturn_t isicom_interrupt(int irq, void *dev_id)
tty = tty_port_tty_get(&port->port);
if (tty == NULL) {
- word_count = byte_count >> 1;
while (byte_count > 1) {
inw(base);
byte_count -= 2;
--
2.20.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] tty/isicom: remove redundant assignment to variable word_count
@ 2019-07-23 15:03 ` Colin King
0 siblings, 0 replies; 4+ messages in thread
From: Colin King @ 2019-07-23 15:03 UTC (permalink / raw)
To: Greg Kroah-Hartman, Jiri Slaby; +Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
The variable word_count is being assigned a value that is never read before
a return, the assignment is redundant and can be removed.
Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/tty/isicom.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/tty/isicom.c b/drivers/tty/isicom.c
index e04a43e89f6b..fc38f96475bf 100644
--- a/drivers/tty/isicom.c
+++ b/drivers/tty/isicom.c
@@ -553,7 +553,6 @@ static irqreturn_t isicom_interrupt(int irq, void *dev_id)
tty = tty_port_tty_get(&port->port);
if (tty = NULL) {
- word_count = byte_count >> 1;
while (byte_count > 1) {
inw(base);
byte_count -= 2;
--
2.20.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] tty/isicom: remove redundant assignment to variable word_count
2019-07-23 15:03 ` Colin King
@ 2019-07-24 10:09 ` Jiri Slaby
-1 siblings, 0 replies; 4+ messages in thread
From: Jiri Slaby @ 2019-07-24 10:09 UTC (permalink / raw)
To: Colin King, Greg Kroah-Hartman; +Cc: kernel-janitors, linux-kernel
On 23. 07. 19, 17:03, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The variable word_count is being assigned a value that is never read before
> a return, the assignment is redundant and can be removed.
>
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Looks good, it predates git. Maybe the while loop wanted to use
word_count originally.
Acked-by: Jiri Slaby <jslaby@suse.cz>
> ---
> drivers/tty/isicom.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/tty/isicom.c b/drivers/tty/isicom.c
> index e04a43e89f6b..fc38f96475bf 100644
> --- a/drivers/tty/isicom.c
> +++ b/drivers/tty/isicom.c
> @@ -553,7 +553,6 @@ static irqreturn_t isicom_interrupt(int irq, void *dev_id)
>
> tty = tty_port_tty_get(&port->port);
> if (tty == NULL) {
> - word_count = byte_count >> 1;
> while (byte_count > 1) {
> inw(base);
> byte_count -= 2;
>
--
js
suse labs
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] tty/isicom: remove redundant assignment to variable word_count
@ 2019-07-24 10:09 ` Jiri Slaby
0 siblings, 0 replies; 4+ messages in thread
From: Jiri Slaby @ 2019-07-24 10:09 UTC (permalink / raw)
To: Colin King, Greg Kroah-Hartman; +Cc: kernel-janitors, linux-kernel
On 23. 07. 19, 17:03, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The variable word_count is being assigned a value that is never read before
> a return, the assignment is redundant and can be removed.
>
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Looks good, it predates git. Maybe the while loop wanted to use
word_count originally.
Acked-by: Jiri Slaby <jslaby@suse.cz>
> ---
> drivers/tty/isicom.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/tty/isicom.c b/drivers/tty/isicom.c
> index e04a43e89f6b..fc38f96475bf 100644
> --- a/drivers/tty/isicom.c
> +++ b/drivers/tty/isicom.c
> @@ -553,7 +553,6 @@ static irqreturn_t isicom_interrupt(int irq, void *dev_id)
>
> tty = tty_port_tty_get(&port->port);
> if (tty = NULL) {
> - word_count = byte_count >> 1;
> while (byte_count > 1) {
> inw(base);
> byte_count -= 2;
>
--
js
suse labs
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-07-24 10:09 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-23 15:03 [PATCH] tty/isicom: remove redundant assignment to variable word_count Colin King
2019-07-23 15:03 ` Colin King
2019-07-24 10:09 ` Jiri Slaby
2019-07-24 10:09 ` Jiri Slaby
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.