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: NeilBrown <neilb@suse.de>
This commit is contained in:
NeilBrown
2012-12-11 13:39:21 +11:00
parent a7a3f08dc2
commit c02c0aeb6c

View File

@@ -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,
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,
" 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,
/* /*
* 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,
} }
} }
switch (cmd) switch (cmd) {
{
case ADD_NEW_DISK: case ADD_NEW_DISK:
{ {
mdu_disk_info_t info; mdu_disk_info_t info;