lkml.org 
[lkml]   [2019]   [May]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 4/4] md: raid0: Make ret local in raid0_run
Date
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
\
 
 \ /
  Last update: 2019-05-20 23:46    [W:0.063 / U:0.336 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site