Message ID | d24611b3-dddf-473a-903d-39290db03b11@p183 (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | block: constify ext_pi_ref_escape() | expand |
Alexey, > This function doesn't mutate data. Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
If that helps with anything..
Looks fine either way:
Reviewed-by: Christoph Hellwig <hch@lst.de>
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,
--- 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; }
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(-)