Skip to content

Commit

Permalink
block: constify ext_pi_ref_escape()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alexey Dobriyan authored and Jens Axboe committed Aug 13, 2024
1 parent 49923a0 commit a28dc35
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions block/t10-pi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit a28dc35

Please sign in to comment.