projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7919d67
)
block: replace continue with else-if in elv_iosched_show
author
Jinlong Chen
<nickyc975@zju.edu.cn>
Tue, 29 Nov 2022 15:46:35 +0000
(23:46 +0800)
committer
Jens Axboe
<axboe@kernel.dk>
Tue, 29 Nov 2022 17:53:06 +0000
(10:53 -0700)
else-if is more readable than continue here.
Signed-off-by: Jinlong Chen <nickyc975@zju.edu.cn>
Link:
https://lore.kernel.org/r/77ac19ba556efd2c8639a6396eb4203c59bc13d6.1669736350.git.nickyc975@zju.edu.cn
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/elevator.c
patch
|
blob
|
history
diff --git
a/block/elevator.c
b/block/elevator.c
index 308bee253564ab257790e8ce6e5284b326d52019..ffa750976d25df828b6b401d371de874eae23220 100644
(file)
--- a/
block/elevator.c
+++ b/
block/elevator.c
@@
-776,11
+776,9
@@
ssize_t elv_iosched_show(struct request_queue *q, char *name)
spin_lock(&elv_list_lock);
list_for_each_entry(e, &elv_list, list) {
- if (e == cur)
{
+ if (e == cur)
len += sprintf(name+len, "[%s] ", cur->elevator_name);
- continue;
- }
- if (elv_support_features(q, e))
+ else if (elv_support_features(q, e))
len += sprintf(name+len, "%s ", e->elevator_name);
}
spin_unlock(&elv_list_lock);