diff mbox series

block: constify ext_pi_ref_escape()

Message ID d24611b3-dddf-473a-903d-39290db03b11@p183 (mailing list archive)
State New, archived
Headers show
Series block: constify ext_pi_ref_escape() | expand

Commit Message

Alexey Dobriyan Aug. 12, 2024, 6:12 p.m. UTC
This function doesn't mutate data.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
---

 block/t10-pi.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Martin K. Petersen Aug. 12, 2024, 7:17 p.m. UTC | #1
Alexey,

> This function doesn't mutate data.

Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Christoph Hellwig Aug. 13, 2024, 6:50 a.m. UTC | #2
If that helps with anything..

Looks fine either way:

Reviewed-by: Christoph Hellwig <hch@lst.de>
Jens Axboe Aug. 13, 2024, 12:20 p.m. UTC | #3
On Mon, 12 Aug 2024 21:12:10 +0300, Alexey Dobriyan wrote:
> This function doesn't mutate data.
> 
> 

Applied, thanks!

[1/1] block: constify ext_pi_ref_escape()
      commit: a28dc358e28fb0738dd23e401cd7646cb4b0f7f1

Best regards,
diff mbox series

Patch

--- a/block/t10-pi.c
+++ b/block/t10-pi.c
@@ -239,9 +239,9 @@  static void ext_pi_crc64_generate(struct blk_integrity_iter *iter,
 	}
 }
 
-static bool ext_pi_ref_escape(u8 *ref_tag)
+static bool ext_pi_ref_escape(const u8 ref_tag[6])
 {
-	static u8 ref_escape[6] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
+	static const u8 ref_escape[6] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
 
 	return memcmp(ref_tag, ref_escape, sizeof(ref_escape)) == 0;
 }