* [linux-rt-devel:linux-5.11.y-rt-rebase 36/199] kernel/printk/printk.c:2145:5-8: Unneeded variable: "ret". Return "- ENOMEM" on line 2244
@ 2021-02-19 19:08 kernel test robot
2021-02-19 19:08 ` [PATCH] printk: fix returnvar.cocci warnings kernel test robot
0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2021-02-19 19:08 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 1042 bytes --]
CC: kbuild-all(a)lists.01.org
TO: John Ogness <john.ogness@linutronix.de>
CC: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git linux-5.11.y-rt-rebase
head: 87401fa51512cc03c8a42bdc6e5940be76051ec5
commit: 2af6fa6260871a5adb4faf062241651587f62e30 [36/199] printk: move console printing to kthreads
:::::: branch date: 25 hours ago
:::::: commit date: 25 hours ago
config: i386-randconfig-c001-20210219 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Julia Lawall <julia.lawall@lip6.fr>
"coccinelle warnings: (new ones prefixed by >>)"
>> kernel/printk/printk.c:2145:5-8: Unneeded variable: "ret". Return "- ENOMEM" on line 2244
Please review and possibly fold the followup patch.
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 35716 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH] printk: fix returnvar.cocci warnings
2021-02-19 19:08 [linux-rt-devel:linux-5.11.y-rt-rebase 36/199] kernel/printk/printk.c:2145:5-8: Unneeded variable: "ret". Return "- ENOMEM" on line 2244 kernel test robot
@ 2021-02-19 19:08 ` kernel test robot
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-02-19 19:08 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 1759 bytes --]
CC: kbuild-all(a)lists.01.org
TO: John Ogness <john.ogness@linutronix.de>
CC: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
CC: Petr Mladek <pmladek@suse.com>
CC: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
CC: Steven Rostedt <rostedt@goodmis.org>
CC: linux-kernel(a)vger.kernel.org
From: kernel test robot <lkp@intel.com>
kernel/printk/printk.c:2145:5-8: Unneeded variable: "ret". Return "- ENOMEM" on line 2244
Remove unneeded variable used to store return value.
Generated by: scripts/coccinelle/misc/returnvar.cocci
Fixes: 2af6fa626087 ("printk: move console printing to kthreads")
CC: John Ogness <john.ogness@linutronix.de>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---
tree: https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git linux-5.11.y-rt-rebase
head: 87401fa51512cc03c8a42bdc6e5940be76051ec5
commit: 2af6fa6260871a5adb4faf062241651587f62e30 [36/199] printk: move console printing to kthreads
:::::: branch date: 25 hours ago
:::::: commit date: 25 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
@@ -2142,7 +2142,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;
@@ -2241,7 +2240,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(). */
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-02-19 19:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-02-19 19:08 [linux-rt-devel:linux-5.11.y-rt-rebase 36/199] kernel/printk/printk.c:2145:5-8: Unneeded variable: "ret". Return "- ENOMEM" on line 2244 kernel test robot
2021-02-19 19:08 ` [PATCH] printk: fix returnvar.cocci warnings kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.