[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20231023062359.130633-1-kunyu@nfschina.com>
Date: Mon, 23 Oct 2023 14:23:59 +0800
From: Li kunyu <kunyu@...china.com>
To: pmladek@...e.com, rostedt@...dmis.org, john.ogness@...utronix.de,
senozhatsky@...omium.org
Cc: linux-kernel@...r.kernel.org, Li kunyu <kunyu@...china.com>
Subject: [PATCH] printk: printk: Remove unnecessary statements'len = 0;'
In the following two functions, len has already been assigned a value of
0 when defining the variable, so remove 'len=0;'.
Signed-off-by: Li kunyu <kunyu@...china.com>
---
kernel/printk/printk.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
index 7e0b4dd02398d..38031fd87f34b 100644
--- a/kernel/printk/printk.c
+++ b/kernel/printk/printk.c
@@ -1669,7 +1669,6 @@ static int syslog_print_all(char __user *buf, int size, bool clear)
prb_rec_init_rd(&r, &info, text, PRINTK_MESSAGE_MAX);
- len = 0;
prb_for_each_record(seq, prb, seq, &r) {
int textlen;
@@ -4188,7 +4187,6 @@ bool kmsg_dump_get_buffer(struct kmsg_dump_iter *iter, bool syslog,
prb_rec_init_rd(&r, &info, buf, size);
- len = 0;
prb_for_each_record(seq, prb, seq, &r) {
if (r.info->seq >= iter->next_seq)
break;
--
2.18.2
Powered by blists - more mailing lists