projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2fe4ffc
)
md: changed the switch of RAID_VERSION to if
author
Li Nan
<linan122@huawei.com>
Mon, 26 Feb 2024 03:14:37 +0000
(11:14 +0800)
committer
Song Liu
<song@kernel.org>
Mon, 26 Feb 2024 18:22:22 +0000
(10:22 -0800)
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
drivers/md/md.c
patch
|
blob
|
history
diff --git
a/drivers/md/md.c
b/drivers/md/md.c
index
eedb9e3
..
3c8a078
100644
(file)
--- a/
drivers/md/md.c
+++ b/
drivers/md/md.c
@@
-7613,12
+7613,8
@@
static int md_ioctl(struct block_device *bdev, blk_mode_t mode,
* Commands dealing with the RAID driver but not any
* particular array:
*/
- switch (cmd) {
- case RAID_VERSION:
- err = get_version(argp);
- goto out;
- default:;
- }
+ if (cmd == RAID_VERSION)
+ return get_version(argp);
/*
* Commands creating/starting a new array: