* [PATCH] printk: printk: Remove unnecessary statements'len = 0;'
@ 2023-10-23 6:23 Li kunyu
2023-10-24 9:07 ` Petr Mladek
0 siblings, 1 reply; 2+ messages in thread
From: Li kunyu @ 2023-10-23 6:23 UTC (permalink / raw)
To: pmladek, rostedt, john.ogness, senozhatsky; +Cc: linux-kernel, Li kunyu
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>
---
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] printk: printk: Remove unnecessary statements'len = 0;'
2023-10-23 6:23 [PATCH] printk: printk: Remove unnecessary statements'len = 0;' Li kunyu
@ 2023-10-24 9:07 ` Petr Mladek
0 siblings, 0 replies; 2+ messages in thread
From: Petr Mladek @ 2023-10-24 9:07 UTC (permalink / raw)
To: Li kunyu; +Cc: rostedt, john.ogness, senozhatsky, linux-kernel
On Mon 2023-10-23 14:23:59, Li kunyu wrote:
> 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>
The patch has been committed into printk/linux.git, branch for-6.7.
Best Regards,
Petr
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-10-24 9:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-23 6:23 [PATCH] printk: printk: Remove unnecessary statements'len = 0;' Li kunyu
2023-10-24 9:07 ` Petr Mladek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).