diff options
author | Dmitry Monakhov <dmonakhov@openvz.org> | 2017-06-29 11:31:12 -0700 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2017-07-03 16:56:25 -0600 |
commit | 128b6f9fdd9ace9e56cb3a263b4bc269658f9c40 (patch) | |
tree | 7424d26a92a1a7354293e5117e344b26b84499c0 /block | |
parent | e23947bd76f00701f9407af23e671f4da96f5f25 (diff) | |
download | linux-stable-128b6f9fdd9ace9e56cb3a263b4bc269658f9c40.tar.gz linux-stable-128b6f9fdd9ace9e56cb3a263b4bc269658f9c40.tar.bz2 linux-stable-128b6f9fdd9ace9e56cb3a263b4bc269658f9c40.zip |
t10-pi: Move opencoded contants to common header
Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block')
-rw-r--r-- | block/t10-pi.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/block/t10-pi.c b/block/t10-pi.c index 3416dadf7b15..a98db384048f 100644 --- a/block/t10-pi.c +++ b/block/t10-pi.c @@ -28,9 +28,6 @@ typedef __be16 (csum_fn) (void *, unsigned int); -static const __be16 APP_ESCAPE = (__force __be16) 0xffff; -static const __be32 REF_ESCAPE = (__force __be32) 0xffffffff; - static __be16 t10_pi_crc_fn(void *data, unsigned int len) { return cpu_to_be16(crc_t10dif(data, len)); @@ -82,7 +79,7 @@ static blk_status_t t10_pi_verify(struct blk_integrity_iter *iter, switch (type) { case 1: case 2: - if (pi->app_tag == APP_ESCAPE) + if (pi->app_tag == T10_PI_APP_ESCAPE) goto next; if (be32_to_cpu(pi->ref_tag) != @@ -95,8 +92,8 @@ static blk_status_t t10_pi_verify(struct blk_integrity_iter *iter, } break; case 3: - if (pi->app_tag == APP_ESCAPE && - pi->ref_tag == REF_ESCAPE) + if (pi->app_tag == T10_PI_APP_ESCAPE && + pi->ref_tag == T10_PI_REF_ESCAPE) goto next; break; } |