All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Colin King <colin.king@canonical.com>
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: Fri, 21 May 2021 14:40:48 +0200	[thread overview]
Message-ID: <YKeqUBZ+Zy/mvZNQ@kroah.com> (raw)
In-Reply-To: <20210518182126.140978-1-colin.king@canonical.com>

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 :(

greg k-h

  reply	other threads:[~2021-05-21 12:41 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 [this message]
2021-05-25  8:54   ` Colin Ian King
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=YKeqUBZ+Zy/mvZNQ@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=arnd@arndb.de \
    --cc=colin.king@canonical.com \
    --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.