Skip to content

Commit 3f6074c

Browse files
likunyurpmladek
authored andcommitted
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
1 parent 3c31041 commit 3f6074c

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

kernel/printk/printk.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1671,7 +1671,6 @@ static int syslog_print_all(char __user *buf, int size, bool clear)
16711671

16721672
prb_rec_init_rd(&r, &info, text, PRINTK_MESSAGE_MAX);
16731673

1674-
len = 0;
16751674
prb_for_each_record(seq, prb, seq, &r) {
16761675
int textlen;
16771676

@@ -4190,7 +4189,6 @@ bool kmsg_dump_get_buffer(struct kmsg_dump_iter *iter, bool syslog,
41904189

41914190
prb_rec_init_rd(&r, &info, buf, size);
41924191

4193-
len = 0;
41944192
prb_for_each_record(seq, prb, seq, &r) {
41954193
if (r.info->seq >= iter->next_seq)
41964194
break;

0 commit comments

Comments
 (0)