diff options
author | Alexey Dobriyan <adobriyan@gmail.com> | 2024-08-12 21:12:10 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2024-08-13 06:20:02 -0600 |
commit | a28dc358e28fb0738dd23e401cd7646cb4b0f7f1 (patch) | |
tree | 1b5c5449eaffd178fcc637a3925707101e3138af /block/t10-pi.c | |
parent | 49923a0dff59fa6b34aa6cc16dc9eefdbbcd3846 (diff) |
block: constify ext_pi_ref_escape()
This function doesn't mutate data.
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/d24611b3-dddf-473a-903d-39290db03b11@p183
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/t10-pi.c')
-rw-r--r-- | block/t10-pi.c | 4 |
1 files 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; } |