CC: [email protected]
TO: John Ogness <[email protected]>
CC: Sebastian Andrzej Siewior <[email protected]>
CC: Petr Mladek <[email protected]>
CC: Sergey Senozhatsky <[email protected]>
CC: Steven Rostedt <[email protected]>
CC: [email protected]

From: kernel test robot <[email protected]>

kernel/printk/printk.c:2127:5-8: Unneeded variable: "ret". Return "- ENOMEM" on 
line 2226


 Remove unneeded variable used to store return value.

Generated by: scripts/coccinelle/misc/returnvar.cocci

Fixes: 42afcbce7b62 ("printk: move console printing to kthreads")
CC: John Ogness <[email protected]>
Reported-by: kernel test robot <[email protected]>
Signed-off-by: kernel test robot <[email protected]>
---

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git 
linux-5.11.y-rt-rebase
head:   4a7805e223e04660df86d5ca0d16f1acdd3c91eb
commit: 42afcbce7b62cd3e1bb00468ff150281d68dd8ee [34/184] printk: move console 
printing to kthreads
:::::: branch date: 20 hours ago
:::::: commit date: 20 hours ago

Please take the patch only if it's a positive warning. Thanks!

 printk.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- a/kernel/printk/printk.c
+++ b/kernel/printk/printk.c
@@ -2124,7 +2124,6 @@ static int printk_kthread_func(void *dat
        struct printk_record r;
        char *ext_text = NULL;
        size_t dropped_len;
-       int ret = -ENOMEM;
        char *text = NULL;
        char *write_text;
        u64 printk_seq;
@@ -2223,7 +2222,7 @@ out:
        pr_info("%sconsole [%s%d]: printing thread stopped\n",
                (con->flags & CON_BOOT) ? "boot" : "",
                con->name, con->index);
-       return ret;
+       return -ENOMEM;
 }
 
 /* Must be called within console_lock(). */
_______________________________________________
kbuild mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to