All of
 help / color / mirror / Atom feed
From: Colin King <>
To: Arnd Bergmann <>,
	Greg Kroah-Hartman <>
Subject: [PATCH][next] ttyprintk: remove redundant initialization of variable i
Date: Tue, 18 May 2021 19:21:26 +0100	[thread overview]
Message-ID: <> (raw)

From: Colin Ian King <>

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

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <>
 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) {

             reply	other threads:[~2021-05-18 18:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-18 18:21 Colin King [this message]
2021-05-21 12:40 ` [PATCH][next] ttyprintk: remove redundant initialization of variable i Greg Kroah-Hartman
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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \

* 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.