From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: [PATCH] dm mpath: fix returnvar.cocci warnings
Date: Thu, 15 Oct 2020 07:17:42 +0800 [thread overview]
Message-ID: <20201014231742.GA24884@b115acc165cd> (raw)
In-Reply-To: <202010150736.D3drD3UG-lkp@intel.com>
[-- Attachment #1: Type: text/plain, Size: 1754 bytes --]
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Khazhismel Kumykov <khazhy@google.com>
CC: Mike Snitzer <snitzer@redhat.com>
CC: Gabriel Krisman Bertazi <krisman@collabora.com>
CC: Alasdair Kergon <agk@redhat.com>
CC: dm-devel(a)redhat.com
CC: linux-kernel(a)vger.kernel.org
From: kernel test robot <lkp@intel.com>
drivers/md/dm-historical-service-time.c:240:14-16: Unneeded variable: "sz". Return "0" on line 261
Remove unneeded variable used to store return value.
Generated by: scripts/coccinelle/misc/returnvar.cocci
Fixes: 2613eab11996 ("dm mpath: add Historical Service Time Path Selector")
CC: Khazhismel Kumykov <khazhy@google.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 37187df45af7d28d27b5c130c23f407ca9dbefa2
commit: 2613eab11996c8d1439c2a44fbca52807be7faa6 dm mpath: add Historical Service Time Path Selector
:::::: branch date: 4 hours ago
:::::: commit date: 5 months ago
Please take the patch only if it's a positive warning. Thanks!
dm-historical-service-time.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--- a/drivers/md/dm-historical-service-time.c
+++ b/drivers/md/dm-historical-service-time.c
@@ -237,7 +237,6 @@ static void hst_destroy(struct path_sele
static int hst_status(struct path_selector *ps, struct dm_path *path,
status_type_t type, char *result, unsigned int maxlen)
{
- unsigned int sz = 0;
struct path_info *pi;
if (!path) {
@@ -258,7 +257,7 @@ static int hst_status(struct path_select
}
}
- return sz;
+ return 0;
}
static int hst_add_path(struct path_selector *ps, struct dm_path *path,
next prev parent reply other threads:[~2020-10-14 23:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-14 23:17 drivers/md/dm-historical-service-time.c:240:14-16: Unneeded variable: "sz". Return "0" on line 261 kernel test robot
2020-10-14 23:17 ` kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2020-09-06 14:16 kernel test robot
2020-09-06 14:16 ` [PATCH] dm mpath: fix returnvar.cocci warnings kernel test robot
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=20201014231742.GA24884@b115acc165cd \
--to=lkp@intel.com \
--cc=kbuild@lists.01.org \
/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 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.