From: Bart Van Assche Date: Wed, 14 Sep 2016 08:44:12 +0000 (+0200) Subject: block: Document that bio_op() uses the data type of bio.bi_opf X-Git-Tag: v4.14-rc1~2316^2~17 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=637ca77bd1f7950538956c61dcd0c2e559905dbf;p=platform%2Fkernel%2Flinux-rpi.git 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 Cc: Mike Christie Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Damien Le Moal Reviewed-by: Johannes Thumshirn Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe --- diff --git a/include/linux/blk_types.h b/include/linux/blk_types.h index 436f43f..1e1ef21 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 { \