From: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: Marcos Paulo de Souza <marcos.souza.org@gmail.com>,
Shaohua Li <shli@kernel.org>,
linux-raid@vger.kernel.org (open list:SOFTWARE RAID (Multiple
Disks) SUPPORT)
Subject: [PATCH 4/4] md: raid0: Make ret local in raid0_run
Date: Mon, 20 May 2019 18:44:27 -0300 [thread overview]
Message-ID: <20190520214427.18729-5-marcos.souza.org@gmail.com> (raw)
In-Reply-To: <20190520214427.18729-1-marcos.souza.org@gmail.com>
ret variable is only used in a specific situation, so make it local
instead of global.
Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
---
drivers/md/raid0.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/md/raid0.c b/drivers/md/raid0.c
index e72255464c09..b28dbb797f76 100644
--- a/drivers/md/raid0.c
+++ b/drivers/md/raid0.c
@@ -364,7 +364,6 @@ static void raid0_free(struct mddev *mddev, void *priv);
static int raid0_run(struct mddev *mddev)
{
struct r0conf *conf;
- int ret;
if (mddev->chunk_sectors == 0) {
pr_warn("md/raid0:%s: chunk size must be set.\n", mdname(mddev));
@@ -375,7 +374,7 @@ static int raid0_run(struct mddev *mddev)
/* if private is not null, we are here after takeover */
if (mddev->private == NULL) {
- ret = create_strip_zones(mddev, &conf);
+ int ret = create_strip_zones(mddev, &conf);
if (ret < 0)
return ret;
mddev->private = conf;
--
2.21.0
prev parent reply other threads:[~2019-05-20 21:44 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-20 21:44 [PATCH 0/5] raid1-10 and raid0 cleanups Marcos Paulo de Souza
2019-05-20 21:44 ` [PATCH 1/4] md: raid1-10: Unify r{1,10}bio_pool_free Marcos Paulo de Souza
2019-05-20 21:44 ` [PATCH 2/4] md: raid0: Remove return statement from void function Marcos Paulo de Souza
2019-05-21 5:53 ` Song Liu
2019-05-20 21:44 ` [PATCH 3/4] md: raid0: Return md_integrity_register result directly Marcos Paulo de Souza
2019-05-20 21:44 ` Marcos Paulo de Souza [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=20190520214427.18729-5-marcos.souza.org@gmail.com \
--to=marcos.souza.org@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-raid@vger.kernel.org \
--cc=shli@kernel.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 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®