Skip to content

Commit a28dc35

Browse files
Alexey Dobriyanaxboe
authored andcommitted
block: constify ext_pi_ref_escape()
This function doesn't mutate data. Signed-off-by: Alexey Dobriyan <[email protected]> Reviewed-by: Martin K. Petersen <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Link: https://lore.kernel.org/r/d24611b3-dddf-473a-903d-39290db03b11@p183 Signed-off-by: Jens Axboe <[email protected]>
1 parent 49923a0 commit a28dc35

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

block/t10-pi.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,9 +239,9 @@ static void ext_pi_crc64_generate(struct blk_integrity_iter *iter,
239239
}
240240
}
241241

242-
static bool ext_pi_ref_escape(u8 *ref_tag)
242+
static bool ext_pi_ref_escape(const u8 ref_tag[6])
243243
{
244-
static u8 ref_escape[6] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
244+
static const u8 ref_escape[6] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
245245

246246
return memcmp(ref_tag, ref_escape, sizeof(ref_escape)) == 0;
247247
}

0 commit comments

Comments
 (0)