Skip to content

Commit 4e26593

Browse files
Li Nanliu-song-6
authored andcommitted
md: changed the switch of RAID_VERSION to if
There is only one case of this 'switch'. Change it to 'if'. Signed-off-by: Li Nan <linan122@huawei.com> Signed-off-by: Song Liu <song@kernel.org> Link: https://lore.kernel.org/r/20240226031444.3606764-3-linan666@huaweicloud.com
1 parent 2fe4ffc commit 4e26593

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

drivers/md/md.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7613,12 +7613,8 @@ static int md_ioctl(struct block_device *bdev, blk_mode_t mode,
76137613
* Commands dealing with the RAID driver but not any
76147614
* particular array:
76157615
*/
7616-
switch (cmd) {
7617-
case RAID_VERSION:
7618-
err = get_version(argp);
7619-
goto out;
7620-
default:;
7621-
}
7616+
if (cmd == RAID_VERSION)
7617+
return get_version(argp);
76227618

76237619
/*
76247620
* Commands creating/starting a new array:

0 commit comments

Comments
 (0)