Commit c6451ede authored by Jinlong Chen's avatar Jinlong Chen Committed by Jens Axboe

block: replace "len+name" with "name+len" in elv_iosched_show

The "pointer + offset" pattern is more resonable.
Signed-off-by: default avatarJinlong Chen <nickyc975@zju.edu.cn>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/d9beaee71b14f7b2a39ab0db6458dc0f7d961ceb.1669736350.git.nickyc975@zju.edu.cnSigned-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 7a3b3660
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment