linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [linux-rt-devel:linux-5.13.y-rt-rebase 11/222] kernel/printk/printk.c:2189:5-8: Unneeded variable: "ret". Return "- ENOMEM" on line 2294
@ 2021-07-08 15:16 kernel test robot
  2021-07-08 15:17 ` [PATCH] printk: fix returnvar.cocci warnings kernel test robot
  0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2021-07-08 15:16 UTC (permalink / raw)
  To: John Ogness
  Cc: kbuild-all, linux-kernel, Thomas Gleixner, Sebastian Andrzej Siewior

[-- Attachment #1: Type: text/plain, Size: 767 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git linux-5.13.y-rt-rebase
head:   7e175e6b59975c8901ad370f7818937f68de45c1
commit: c4049cfc8a0327c22d56855882d8e2cffd6d20fa [11/222] printk: move console printing to kthreads
config: arm-randconfig-c003-20210707 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


cocci warnings: (new ones prefixed by >>)
>> kernel/printk/printk.c:2189:5-8: Unneeded variable: "ret". Return "- ENOMEM" on line 2294

Please review and possibly fold the followup patch.

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 22776 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH] printk: fix returnvar.cocci warnings
  2021-07-08 15:16 [linux-rt-devel:linux-5.13.y-rt-rebase 11/222] kernel/printk/printk.c:2189:5-8: Unneeded variable: "ret". Return "- ENOMEM" on line 2294 kernel test robot
@ 2021-07-08 15:17 ` kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-07-08 15:17 UTC (permalink / raw)
  To: John Ogness
  Cc: kbuild-all, linux-kernel, Thomas Gleixner, Sebastian Andrzej Siewior

From: kernel test robot <lkp@intel.com>

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


 Remove unneeded variable used to store return value.

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

Fixes: c4049cfc8a03 ("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.13.y-rt-rebase
head:   7e175e6b59975c8901ad370f7818937f68de45c1
commit: c4049cfc8a0327c22d56855882d8e2cffd6d20fa [11/222] printk: move console printing to kthreads
:::::: branch date: 19 hours ago
:::::: commit date: 19 hours ago

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

--- a/kernel/printk/printk.c
+++ b/kernel/printk/printk.c
@@ -2186,7 +2186,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;
 	size_t len;
@@ -2291,7 +2290,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-07-08 15:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-08 15:16 [linux-rt-devel:linux-5.13.y-rt-rebase 11/222] kernel/printk/printk.c:2189:5-8: Unneeded variable: "ret". Return "- ENOMEM" on line 2294 kernel test robot
2021-07-08 15:17 ` [PATCH] printk: fix returnvar.cocci warnings kernel test robot

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).