lkml.org 
[lkml]   [2019]   [Jul]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] tty/isicom: remove redundant assignment to variable word_count
From
Date
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

\
 
 \ /
  Last update: 2019-07-24 12:09    [W:0.025 / U:0.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site