Skip to content

Commit

Permalink
block: always use 'e' when printing scheduler name
Browse files Browse the repository at this point in the history
Printing e->elevator_name in all cases improves the readability, and
'e' and 'cur' are identical in this branch.

Suggested-by: Christoph Hellwig <[email protected]>
Signed-off-by: Jinlong Chen <[email protected]>
Link: https://lore.kernel.org/r/4bae180ffbac608ea0cf46ffa9739ce0973b60aa.1669736350.git.nickyc975@zju.edu.cn
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
nickyc975 authored and axboe committed Nov 29, 2022
1 parent 5998249 commit 7a3b366
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion block/elevator.c
Original file line number Diff line number Diff line change
Expand Up @@ -777,7 +777,7 @@ 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)
len += sprintf(name+len, "[%s] ", cur->elevator_name);
len += sprintf(name+len, "[%s] ", e->elevator_name);
else if (elv_support_features(q, e))
len += sprintf(name+len, "%s ", e->elevator_name);
}
Expand Down

0 comments on commit 7a3b366

Please sign in to comment.