diff options
author | Christoph Hellwig <hch@lst.de> | 2024-02-15 10:10:50 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2024-02-20 02:58:24 +0300 |
commit | cc7f05c7ec0b26e1eda8ec7a99452032d08d305e (patch) | |
tree | 89f7377f1ac3dc385da268b984426d0dd95d20c2 /drivers/block | |
parent | b5baaba4ce5c8a0e36b5232b16c0731e3eb0d939 (diff) | |
download | linux-cc7f05c7ec0b26e1eda8ec7a99452032d08d305e.tar.xz |
n64cart: pass queue_limits to blk_mq_alloc_disk
Pass the queue limits directly to blk_alloc_disk instead of setting them
one at a time.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Reviewed-by: Dan Williams <dan.j.williams@intel.com>
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Link: https://lore.kernel.org/r/20240215071055.2201424-5-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/n64cart.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/block/n64cart.c b/drivers/block/n64cart.c index c64d7ee7a44d..27b2187e7a6d 100644 --- a/drivers/block/n64cart.c +++ b/drivers/block/n64cart.c @@ -114,6 +114,10 @@ static const struct block_device_operations n64cart_fops = { */ static int __init n64cart_probe(struct platform_device *pdev) { + struct queue_limits lim = { + .physical_block_size = 4096, + .logical_block_size = 4096, + }; struct gendisk *disk; int err = -ENOMEM; @@ -131,7 +135,7 @@ static int __init n64cart_probe(struct platform_device *pdev) if (IS_ERR(reg_base)) return PTR_ERR(reg_base); - disk = blk_alloc_disk(NULL, NUMA_NO_NODE); + disk = blk_alloc_disk(&lim, NUMA_NO_NODE); if (IS_ERR(disk)) { err = PTR_ERR(disk); goto out; @@ -147,8 +151,6 @@ static int __init n64cart_probe(struct platform_device *pdev) set_disk_ro(disk, 1); blk_queue_flag_set(QUEUE_FLAG_NONROT, disk->queue); - blk_queue_physical_block_size(disk->queue, 4096); - blk_queue_logical_block_size(disk->queue, 4096); err = add_disk(disk); if (err) |