mirror of
https://github.com/torvalds/linux.git
synced 2024-11-25 05:32:00 +00:00
um: Use enum req_op where appropriate
Improve static type checking by using type enum req_op instead of int where appropriate. Cc: Richard Weinberger <richard@nod.at> Cc: Anton Ivanov <anton.ivanov@cambridgegreys.com> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Link: https://lore.kernel.org/r/20220714180729.1065367-21-bvanassche@acm.org Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
ba229aa8f2
commit
7ee1de6e27
@ -1262,7 +1262,7 @@ static void ubd_map_req(struct ubd *dev, struct io_thread_req *io_req,
|
||||
struct req_iterator iter;
|
||||
int i = 0;
|
||||
unsigned long byte_offset = io_req->offset;
|
||||
int op = req_op(req);
|
||||
enum req_op op = req_op(req);
|
||||
|
||||
if (op == REQ_OP_WRITE_ZEROES || op == REQ_OP_DISCARD) {
|
||||
io_req->io_desc[0].buffer = NULL;
|
||||
@ -1325,7 +1325,7 @@ static int ubd_submit_request(struct ubd *dev, struct request *req)
|
||||
int segs = 0;
|
||||
struct io_thread_req *io_req;
|
||||
int ret;
|
||||
int op = req_op(req);
|
||||
enum req_op op = req_op(req);
|
||||
|
||||
if (op == REQ_OP_FLUSH)
|
||||
segs = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user