[PATCH] block: constify ext_pi_ref_escape()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This function doesn't mutate data.

Signed-off-by: Alexey Dobriyan <adobriyan@xxxxxxxxx>
---

 block/t10-pi.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- 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;
 }




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux