summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorLi kunyu <kunyu@nfschina.com>2023-10-23 14:23:59 +0800
committerPetr Mladek <pmladek@suse.com>2023-10-24 10:19:48 +0200
commit3f6074cf467f6c2beb7db0b0d685fb53f25ae9aa (patch)
tree045a0e0d2d33db481c60150450d630d5856ebc6d /kernel
parent3c31041e37324e143bee98604bb31481e905b4b3 (diff)
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@nfschina.com> Reviewed-by: Petr Mladek <pmladek@suse.com> Signed-off-by: Petr Mladek <pmladek@suse.com> Link: https://lore.kernel.org/r/20231023062359.130633-1-kunyu@nfschina.com
Diffstat (limited to 'kernel')
-rw-r--r--kernel/printk/printk.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
index 96fc38cb2e84..1c6ed598b480 100644
--- a/kernel/printk/printk.c
+++ b/kernel/printk/printk.c
@@ -1671,7 +1671,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;
@@ -4190,7 +4189,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;