diff options
author | Bart Van Assche <bvanassche@acm.org> | 2022-07-14 11:06:42 -0700 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2022-07-14 12:14:31 -0600 |
commit | 03df83ac9eb77f749bfd84c7d448cb2b90c1196c (patch) | |
tree | 3541fbdfb1c71869b5a746f1f41ff6a687b9116b /drivers | |
parent | 23f8ae7148cc32287364741e32b20f37730114aa (diff) | |
download | linux-stable-03df83ac9eb77f749bfd84c7d448cb2b90c1196c.tar.gz linux-stable-03df83ac9eb77f749bfd84c7d448cb2b90c1196c.tar.bz2 linux-stable-03df83ac9eb77f749bfd84c7d448cb2b90c1196c.zip |
block/rnbd: Use blk_opf_t where appropriate
Improve static type checking by using the new blk_opf_t type to represent
the combination of a request and request flags.
Acked-by: Jack Wang <jinpu.wang@ionos.com>
Cc: Md. Haris Iqbal <haris.iqbal@ionos.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Link: https://lore.kernel.org/r/20220714180729.1065367-17-bvanassche@acm.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/block/rnbd/rnbd-proto.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/block/rnbd/rnbd-proto.h b/drivers/block/rnbd/rnbd-proto.h index bfb08dd434d1..ea7ac8bca63c 100644 --- a/drivers/block/rnbd/rnbd-proto.h +++ b/drivers/block/rnbd/rnbd-proto.h @@ -229,9 +229,9 @@ static inline bool rnbd_flags_supported(u32 flags) return true; } -static inline u32 rnbd_to_bio_flags(u32 rnbd_opf) +static inline blk_opf_t rnbd_to_bio_flags(u32 rnbd_opf) { - u32 bio_opf; + blk_opf_t bio_opf; switch (rnbd_op(rnbd_opf)) { case RNBD_OP_READ: @@ -286,7 +286,8 @@ static inline u32 rq_to_rnbd_flags(struct request *rq) break; default: WARN(1, "Unknown request type %d (flags %llu)\n", - req_op(rq), (unsigned long long)rq->cmd_flags); + (__force u32)req_op(rq), + (__force unsigned long long)rq->cmd_flags); rnbd_opf = 0; } |