diff mbox series

[1/6] block: const blk_rq_nr_phys_segments request

Message ID 20250203154517.937623-2-kbusch@meta.com (mailing list archive)
State New
Headers show
Series [1/6] block: const blk_rq_nr_phys_segments request | expand

Commit Message

Keith Busch Feb. 3, 2025, 3:45 p.m. UTC
From: Keith Busch <kbusch@kernel.org>

The request is not modified. Mark it as const so that other const
functions may use this helper.

Signed-off-by: Keith Busch <kbusch@kernel.org>
---
 include/linux/blk-mq.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/include/linux/blk-mq.h b/include/linux/blk-mq.h
index a0a9007cc1e36..56ef03bc68884 100644
--- a/include/linux/blk-mq.h
+++ b/include/linux/blk-mq.h
@@ -1125,7 +1125,7 @@  void blk_abort_request(struct request *);
  * own special payload.  In that case we still return 1 here so that this
  * special payload will be mapped.
  */
-static inline unsigned short blk_rq_nr_phys_segments(struct request *rq)
+static inline unsigned short blk_rq_nr_phys_segments(const struct request *rq)
 {
 	if (rq->rq_flags & RQF_SPECIAL_PAYLOAD)
 		return 1;