projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3c31041
)
printk: printk: Remove unnecessary statements'len = 0;'
author
Li kunyu
<kunyu@nfschina.com>
Mon, 23 Oct 2023 06:23:59 +0000
(14:23 +0800)
committer
Petr Mladek
<pmladek@suse.com>
Tue, 24 Oct 2023 08:19:48 +0000
(10:19 +0200)
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
kernel/printk/printk.c
patch
|
blob
|
history
diff --git
a/kernel/printk/printk.c
b/kernel/printk/printk.c
index 96fc38cb2e8415f6d1572384833ea8a55b3b90b7..1c6ed598b480387c1b64c2accbdce3dffa1902e7 100644
(file)
--- 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;