summaryrefslogtreecommitdiffstats
path: root/block/t10-pi.c
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2017-03-24 18:03:48 -0700
committerJens Axboe <axboe@fb.com>2017-03-24 20:34:39 -0600
commit869ab90f0ae0002ce6e9d3a5c75156ae8de48ffc (patch)
tree22ff97e02c266e84658d535d63107f84e67fc059 /block/t10-pi.c
parent1be7d2073e83e2b5c632a65bfcd59a73ce92bf6d (diff)
downloadlinux-stable-869ab90f0ae0002ce6e9d3a5c75156ae8de48ffc.tar.gz
linux-stable-869ab90f0ae0002ce6e9d3a5c75156ae8de48ffc.tar.bz2
linux-stable-869ab90f0ae0002ce6e9d3a5c75156ae8de48ffc.zip
block: constify struct blk_integrity_profile
blk_integrity_profile's are never modified, so mark them 'const' so that they are placed in .rodata and benefit from memory protection. Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'block/t10-pi.c')
-rw-r--r--block/t10-pi.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/block/t10-pi.c b/block/t10-pi.c
index 2c97912335a9..680c6d636298 100644
--- a/block/t10-pi.c
+++ b/block/t10-pi.c
@@ -160,28 +160,28 @@ static int t10_pi_type3_verify_ip(struct blk_integrity_iter *iter)
return t10_pi_verify(iter, t10_pi_ip_fn, 3);
}
-struct blk_integrity_profile t10_pi_type1_crc = {
+const struct blk_integrity_profile t10_pi_type1_crc = {
.name = "T10-DIF-TYPE1-CRC",
.generate_fn = t10_pi_type1_generate_crc,
.verify_fn = t10_pi_type1_verify_crc,
};
EXPORT_SYMBOL(t10_pi_type1_crc);
-struct blk_integrity_profile t10_pi_type1_ip = {
+const struct blk_integrity_profile t10_pi_type1_ip = {
.name = "T10-DIF-TYPE1-IP",
.generate_fn = t10_pi_type1_generate_ip,
.verify_fn = t10_pi_type1_verify_ip,
};
EXPORT_SYMBOL(t10_pi_type1_ip);
-struct blk_integrity_profile t10_pi_type3_crc = {
+const struct blk_integrity_profile t10_pi_type3_crc = {
.name = "T10-DIF-TYPE3-CRC",
.generate_fn = t10_pi_type3_generate_crc,
.verify_fn = t10_pi_type3_verify_crc,
};
EXPORT_SYMBOL(t10_pi_type3_crc);
-struct blk_integrity_profile t10_pi_type3_ip = {
+const struct blk_integrity_profile t10_pi_type3_ip = {
.name = "T10-DIF-TYPE3-IP",
.generate_fn = t10_pi_type3_generate_ip,
.verify_fn = t10_pi_type3_verify_ip,