summaryrefslogtreecommitdiff
path: root/block/elevator.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2024-10-08 07:08:41 +0200
committerJens Axboe <axboe@kernel.dk>2024-10-22 08:16:22 -0600
commitd51c9cdfc214dde98afe45d95f7fb3b4ad11aa9e (patch)
tree775fc242bda2078bfa9a1a0b7ce414c1fe682d85 /block/elevator.c
parent758737d86f8a2d74c0fa9f8b2523fa7fd1e0d0aa (diff)
downloadlwn-d51c9cdfc214dde98afe45d95f7fb3b4ad11aa9e.tar.gz
lwn-d51c9cdfc214dde98afe45d95f7fb3b4ad11aa9e.zip
block: return void from the queue_sysfs_entry load_module method
Requesting a module either succeeds or does nothing, return an error from this method does not make sense. Also move the load_module after the store method in the struct declaration to keep the important show and store methods together. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Damien Le Moal <dlemoal@kernel.org> Reviewed-by: Andreas Hindborg <a.hindborg@kernel.org> Link: https://lore.kernel.org/r/20241008050841.104602-1-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/elevator.c')
-rw-r--r--block/elevator.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/block/elevator.c b/block/elevator.c
index 9430cde13d1a..f169f4bae917 100644
--- a/block/elevator.c
+++ b/block/elevator.c
@@ -704,15 +704,15 @@ static int elevator_change(struct request_queue *q, const char *elevator_name)
return ret;
}
-int elv_iosched_load_module(struct gendisk *disk, const char *buf,
- size_t count)
+void elv_iosched_load_module(struct gendisk *disk, const char *buf,
+ size_t count)
{
char elevator_name[ELV_NAME_MAX];
struct elevator_type *found;
const char *name;
if (!elv_support_iosched(disk->queue))
- return -EOPNOTSUPP;
+ return;
strscpy(elevator_name, buf, sizeof(elevator_name));
name = strstrip(elevator_name);
@@ -723,8 +723,6 @@ int elv_iosched_load_module(struct gendisk *disk, const char *buf,
if (!found)
request_module("%s-iosched", name);
-
- return 0;
}
ssize_t elv_iosched_store(struct gendisk *disk, const char *buf,