From: kernel test robot <lkp@intel.com>
To: John Ogness <john.ogness@linutronix.de>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
Thomas Gleixner <tglx@linutronix.de>,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Subject: [PATCH] printk: fix returnvar.cocci warnings
Date: Thu, 8 Jul 2021 23:17:01 +0800 [thread overview]
Message-ID: <20210708151700.GA73351@683a21ea9637> (raw)
In-Reply-To: <202107082323.GGYf01w7-lkp@intel.com>
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(). */
prev parent reply other threads:[~2021-07-08 15:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210708151700.GA73351@683a21ea9637 \
--to=lkp@intel.com \
--cc=bigeasy@linutronix.de \
--cc=john.ogness@linutronix.de \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox