diff options
author | Jens Axboe | 2015-11-11 09:37:34 -0700 |
---|---|---|
committer | Jens Axboe | 2015-11-11 09:37:34 -0700 |
commit | e3a7a3bf362e2a8acc301e5eaec2631e740a8a95 (patch) | |
tree | 1625af0236875970b08c89d069af3fc4d4e770ff /include/linux | |
parent | cadfbb6ec2e55171479191046142c927a8b12d87 (diff) |
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/linux')
-rw-r--r-- | include/linux/blk_types.h | 2 |
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 */ |