提交 c02c0aeb 编写于 作者: N NeilBrown

md.c: re-indent various 'switch' statements.

Intent was unnecessarily deep.

Also change one 'switch' which has a single case element, into an
'if'.
Signed-off-by: NNeilBrown <neilb@suse.de>
上级 a7a3f08d
...@@ -6347,8 +6347,7 @@ static int md_ioctl(struct block_device *bdev, fmode_t mode, ...@@ -6347,8 +6347,7 @@ static int md_ioctl(struct block_device *bdev, fmode_t mode,
* Commands dealing with the RAID driver but not any * Commands dealing with the RAID driver but not any
* particular array: * particular array:
*/ */
switch (cmd) switch (cmd) {
{
case RAID_VERSION: case RAID_VERSION:
err = get_version(argp); err = get_version(argp);
goto done; goto done;
...@@ -6411,10 +6410,7 @@ static int md_ioctl(struct block_device *bdev, fmode_t mode, ...@@ -6411,10 +6410,7 @@ static int md_ioctl(struct block_device *bdev, fmode_t mode,
goto abort; goto abort;
} }
switch (cmd) if (cmd == SET_ARRAY_INFO) {
{
case SET_ARRAY_INFO:
{
mdu_array_info_t info; mdu_array_info_t info;
if (!arg) if (!arg)
memset(&info, 0, sizeof(info)); memset(&info, 0, sizeof(info));
...@@ -6451,10 +6447,7 @@ static int md_ioctl(struct block_device *bdev, fmode_t mode, ...@@ -6451,10 +6447,7 @@ static int md_ioctl(struct block_device *bdev, fmode_t mode,
" array info. %d\n", err); " array info. %d\n", err);
goto abort_unlock; goto abort_unlock;
} }
}
goto done_unlock; goto done_unlock;
default:;
} }
/* /*
...@@ -6473,8 +6466,7 @@ static int md_ioctl(struct block_device *bdev, fmode_t mode, ...@@ -6473,8 +6466,7 @@ static int md_ioctl(struct block_device *bdev, fmode_t mode,
/* /*
* Commands even a read-only array can execute: * Commands even a read-only array can execute:
*/ */
switch (cmd) switch (cmd) {
{
case GET_BITMAP_FILE: case GET_BITMAP_FILE:
err = get_bitmap_file(mddev, argp); err = get_bitmap_file(mddev, argp);
goto done_unlock; goto done_unlock;
...@@ -6540,8 +6532,7 @@ static int md_ioctl(struct block_device *bdev, fmode_t mode, ...@@ -6540,8 +6532,7 @@ static int md_ioctl(struct block_device *bdev, fmode_t mode,
} }
} }
switch (cmd) switch (cmd) {
{
case ADD_NEW_DISK: case ADD_NEW_DISK:
{ {
mdu_disk_info_t info; mdu_disk_info_t info;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册