summaryrefslogtreecommitdiffstats
path: root/block/elevator.c
diff options
context:
space:
mode:
authorJinlong Chen <nickyc975@zju.edu.cn>2022-11-29 16:46:37 +0100
committerJens Axboe <axboe@kernel.dk>2022-11-29 18:53:10 +0100
commitc6451ede406b9f57fcd61d48433a6b8b2be862e3 (patch)
treea414c5aca9c69437f7d0054521b8a2d510fa2388 /block/elevator.c
parentblock: always use 'e' when printing scheduler name (diff)
downloadlinux-c6451ede406b9f57fcd61d48433a6b8b2be862e3.tar.xz
linux-c6451ede406b9f57fcd61d48433a6b8b2be862e3.zip
block: replace "len+name" with "name+len" in elv_iosched_show
The "pointer + offset" pattern is more resonable. Signed-off-by: Jinlong Chen <nickyc975@zju.edu.cn> Reviewed-by: Christoph Hellwig <hch@lst.de> Link: https://lore.kernel.org/r/d9beaee71b14f7b2a39ab0db6458dc0f7d961ceb.1669736350.git.nickyc975@zju.edu.cn Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to '')
-rw-r--r--block/elevator.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/elevator.c b/block/elevator.c
index b2f2252f29e7..8a5c171306f1 100644
--- a/block/elevator.c
+++ b/block/elevator.c
@@ -783,7 +783,7 @@ ssize_t elv_iosched_show(struct request_queue *q, char *name)
}
spin_unlock(&elv_list_lock);
- len += sprintf(len+name, "\n");
+ len += sprintf(name+len, "\n");
return len;
}