From a28dc358e28fb0738dd23e401cd7646cb4b0f7f1 Mon Sep 17 00:00:00 2001 From: Alexey Dobriyan Date: Mon, 12 Aug 2024 21:12:10 +0300 Subject: [PATCH] block: constify ext_pi_ref_escape() This function doesn't mutate data. Signed-off-by: Alexey Dobriyan Reviewed-by: Martin K. Petersen Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/d24611b3-dddf-473a-903d-39290db03b11@p183 Signed-off-by: Jens Axboe --- block/t10-pi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/block/t10-pi.c b/block/t10-pi.c index 4a90d200ae7b..e7052a728966 100644 --- 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; }