From: Christoph Hellwig Date: Wed, 26 Jun 2024 14:26:28 +0000 (+0200) Subject: block: remove the fallback case in queue_dma_alignment X-Git-Tag: v6.11-rc1~80^2~39 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=abfc9d810926dfbf5645c7755c8d5ab96273f27d;p=thirdparty%2Flinux.git block: remove the fallback case in queue_dma_alignment 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 Reviewed-by: John Garry Reviewed-by: Damien Le Moal Link: https://lore.kernel.org/r/20240626142637.300624-8-hch@lst.de Signed-off-by: Jens Axboe --- diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 6b88382012e95..94fcbc9123120 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -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