diff mbox series

[7/8] block: remove the fallback case in queue_dma_alignment

Message ID 20240625145955.115252-8-hch@lst.de (mailing list archive)
State New
Headers show
Series [1/8] md: set md-specific flags for all queue limits | expand

Checks

Context Check Description
mdraidci/vmtest-md-6_11-PR fail merge-conflict

Commit Message

Christoph Hellwig June 25, 2024, 2:59 p.m. UTC
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>
---
 include/linux/blkdev.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

John Garry June 25, 2024, 3:07 p.m. UTC | #1
On 25/06/2024 15:59, Christoph Hellwig wrote:
> 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>
Damien Le Moal June 25, 2024, 9:29 p.m. UTC | #2
On 6/25/24 23:59, Christoph Hellwig wrote:
> 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: Damien Le Moal <dlemoal@kernel.org>
diff mbox series

Patch

diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 6b88382012e958..94fcbc91231208 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