summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJens Axboe <axboe@fb.com>2015-11-11 19:37:34 +0300
committerJens Axboe <axboe@fb.com>2015-11-11 19:37:34 +0300
commite3a7a3bf362e2a8acc301e5eaec2631e740a8a95 (patch)
tree1625af0236875970b08c89d069af3fc4d4e770ff /include
parentcadfbb6ec2e55171479191046142c927a8b12d87 (diff)
downloadlinux-e3a7a3bf362e2a8acc301e5eaec2631e740a8a95.tar.xz
block: don't hardcode blk_qc_t -> tag mask
Use the shift/mask we use elsewhere. Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/blk_types.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/blk_types.h b/include/linux/blk_types.h
index 641e5a3ed58c..0fb65843ec1e 100644
--- a/include/linux/blk_types.h
+++ b/include/linux/blk_types.h
@@ -265,7 +265,7 @@ static inline unsigned int blk_qc_t_to_queue_num(blk_qc_t cookie)
static inline unsigned int blk_qc_t_to_tag(blk_qc_t cookie)
{
- return cookie & 0xffff;
+ return cookie & ((1u << BLK_QC_T_SHIFT) - 1);
}
#endif /* __LINUX_BLK_TYPES_H */