All of lore.kernel.org
 help / color / mirror / Atom feed
From: Colin Ian King <colin.king@canonical.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Arnd Bergmann <arnd@arndb.de>,
	kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH][next] ttyprintk: remove redundant initialization of variable i
Date: Tue, 25 May 2021 09:54:37 +0100	[thread overview]
Message-ID: <73809ad0-cdb0-695e-c9aa-55b6f8f3710b@canonical.com> (raw)
In-Reply-To: <YKeqUBZ+Zy/mvZNQ@kroah.com>

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?


> 
> greg k-h
> 


  reply	other threads:[~2021-05-25  8:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-18 18:21 [PATCH][next] ttyprintk: remove redundant initialization of variable i Colin King
2021-05-21 12:40 ` Greg Kroah-Hartman
2021-05-25  8:54   ` Colin Ian King [this message]
2021-05-27 12:20     ` Greg Kroah-Hartman

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=73809ad0-cdb0-695e-c9aa-55b6f8f3710b@canonical.com \
    --to=colin.king@canonical.com \
    --cc=arnd@arndb.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=kernel-janitors@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 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.