lkml.org 
[lkml]   [2021]   [May]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH][next] ttyprintk: remove redundant initialization of variable i
On Tue, May 25, 2021 at 09:54:37AM +0100, Colin Ian King wrote:
> On 21/05/2021 13:40, Greg Kroah-Hartman wrote:
> > On Tue, May 18, 2021 at 07:21:26PM +0100, Colin King wrote:
> >> From: Colin Ian King <colin.king@canonical.com>
> >>
> >> The variable i is being initialized with a value that is never read,
> >> it is being updated later on. The assignment is redundant and can be
> >> removed.
> >>
> >> Addresses-Coverity: ("Unused value")
> >> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> >> ---
> >> drivers/char/ttyprintk.c | 2 +-
> >> 1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> diff --git a/drivers/char/ttyprintk.c b/drivers/char/ttyprintk.c
> >> index 219fa1382396..230b2c9b3e3c 100644
> >> --- a/drivers/char/ttyprintk.c
> >> +++ b/drivers/char/ttyprintk.c
> >> @@ -52,7 +52,7 @@ static void tpk_flush(void)
> >>
> >> static int tpk_printk(const unsigned char *buf, int count)
> >> {
> >> - int i = tpk_curr;
> >> + int i;
> >>
> >> for (i = 0; i < count; i++) {
> >> if (tpk_curr >= TPK_STR_SIZE) {
> >> --
> >> 2.31.1
> >>
> >
> > This is not ok for what is currently in linux-next :(
>
> Hmm, it applies cleanly on today's linux-next, do you mind re-apply it?

Argh, I was looking at the wrong tree, sorry, now queued up.

thanks,

greg "I have too many different trees" k-h

\
 
 \ /
  Last update: 2021-05-27 14:21    [W:0.089 / U:0.448 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site