mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: cgel.zte@gmail.com
To: agk@redhat.com
Cc: snitzer@redhat.com, dm-devel@redhat.com,
	linux-kernel@vger.kernel.org,
	ran jianping <ran.jianping@zte.com.cn>,
	Zeal Robot <zealci@zte.com.cn>
Subject: [PATCH] dm: remove unneeded variable
Date: Thu, 11 Nov 2021 07:53:31 +0000	[thread overview]
Message-ID: <20211111075331.158061-1-ran.jianping@zte.com.cn> (raw)

From: ran jianping <ran.jianping@zte.com.cn>

Fix the following coccicheck review:
./drivers/md/dm-ps-round-robin.c:91:5-7:Unneeded variable

Remove unneeded variable used to store return value.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: ran jianping <ran.jianping@zte.com.cn>
---
 drivers/md/dm-ps-round-robin.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/md/dm-ps-round-robin.c b/drivers/md/dm-ps-round-robin.c
index 27f44c5fa04e..455fc02af1cf 100644
--- a/drivers/md/dm-ps-round-robin.c
+++ b/drivers/md/dm-ps-round-robin.c
@@ -88,7 +88,6 @@ static int rr_status(struct path_selector *ps, struct dm_path *path,
 		     status_type_t type, char *result, unsigned int maxlen)
 {
 	struct path_info *pi;
-	int sz = 0;
 
 	if (!path)
 		DMEMIT("0 ");
@@ -107,7 +106,7 @@ static int rr_status(struct path_selector *ps, struct dm_path *path,
 		}
 	}
 
-	return sz;
+	return 0;
 }
 
 /*
-- 
2.25.1


             reply	other threads:[~2021-11-11  7:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-11  7:53 cgel.zte [this message]
2021-11-11 16:50 ` kernel test robot
2021-11-12 15:09 ` Mike Snitzer
2023-06-14  2:10 [PATCH] " baomingtong001
2023-06-14  2:42 ` Alasdair G Kergon
     [not found]   ` <a78b787e3c45de04df95c80dfc2aa511@208suo.com>
2023-06-14 18:48     ` Alasdair G Kergon

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=20211111075331.158061-1-ran.jianping@zte.com.cn \
    --to=cgel.zte@gmail.com \
    --cc=agk@redhat.com \
    --cc=dm-devel@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ran.jianping@zte.com.cn \
    --cc=snitzer@redhat.com \
    --cc=zealci@zte.com.cn \
    /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

all inboxes | Powered by JetHome®