aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBart Van Assche <[email protected]>2016-09-14 10:44:12 +0200
committerJens Axboe <[email protected]>2016-09-14 08:48:26 -0600
commit637ca77bd1f7950538956c61dcd0c2e559905dbf (patch)
tree45c141b4940685563f86bdc5acfe80d9d0e12f98
parenta441b0d093b3690b7cc2cb30998358904d051db4 (diff)
block: Document that bio_op() uses the data type of bio.bi_opf
Make it clear that the sizeof(unsigned int) expression in BIO_OP_SHIFT refers to the bi_opf member of struct bio. Signed-off-by: Bart Van Assche <[email protected]> Cc: Mike Christie <[email protected]> Cc: Christoph Hellwig <[email protected]> Cc: Hannes Reinecke <[email protected]> Cc: Damien Le Moal <[email protected]> Reviewed-by: Johannes Thumshirn <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
-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 436f43f87da9..1e1ef210ae91 100644
--- a/include/linux/blk_types.h
+++ b/include/linux/blk_types.h
@@ -89,7 +89,7 @@ struct bio {
struct bio_vec bi_inline_vecs[0];
};
-#define BIO_OP_SHIFT (8 * sizeof(unsigned int) - REQ_OP_BITS)
+#define BIO_OP_SHIFT (8 * FIELD_SIZEOF(struct bio, bi_opf) - REQ_OP_BITS)
#define bio_op(bio) ((bio)->bi_opf >> BIO_OP_SHIFT)
#define bio_set_op_attrs(bio, op, op_flags) do { \