]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
block: remove the fallback case in queue_dma_alignment
authorChristoph Hellwig <hch@lst.de>
Wed, 26 Jun 2024 14:26:28 +0000 (16:26 +0200)
committerJens Axboe <axboe@kernel.dk>
Wed, 26 Jun 2024 15:37:35 +0000 (09:37 -0600)
Now that all updates go through blk_validate_limits the default of 511
is set at initialization time.  Also remove the unused NULL check as
calling this helper on a NULL queue can't happen (and doesn't make
much sense to start with).

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: John Garry <john.g.garry@oracle.com>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Link: https://lore.kernel.org/r/20240626142637.300624-8-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
include/linux/blkdev.h

index 6b88382012e9584b0a25ce77d0939240b22a788f..94fcbc91231208647a72389dec471b2d20b55ce0 100644 (file)
@@ -1394,7 +1394,7 @@ static inline bool bdev_is_zone_start(struct block_device *bdev,
 
 static inline int queue_dma_alignment(const struct request_queue *q)
 {
-       return q ? q->limits.dma_alignment : 511;
+       return q->limits.dma_alignment;
 }
 
 static inline unsigned int