summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBart Van Assche <bvanassche@acm.org>2022-07-14 21:07:02 +0300
committerJens Axboe <axboe@kernel.dk>2022-07-14 21:14:32 +0300
commita9010741ce7c9533fa825cc49f0739d4d8ebda48 (patch)
tree21d691afee37f64f6831874a0421a602d2a70f64
parentcb1802ff82e1ebbbafd860e5a73c26607d72dcd9 (diff)
downloadlinux-a9010741ce7c9533fa825cc49f0739d4d8ebda48.tar.xz
md/raid5: Use the enum req_op and blk_opf_t types
Improve static type checking by using the enum req_op type for variables that represent a request operation and the new blk_opf_t type for variables that represent request flags. Acked-by: Song Liu <song@kernel.org> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Link: https://lore.kernel.org/r/20220714180729.1065367-37-bvanassche@acm.org Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r--drivers/md/raid5.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index 5d09256d7f81..cae1612580fc 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -1082,7 +1082,8 @@ static void ops_run_io(struct stripe_head *sh, struct stripe_head_state *s)
should_defer = conf->batch_bio_dispatch && conf->group_cnt;
for (i = disks; i--; ) {
- int op, op_flags = 0;
+ enum req_op op;
+ blk_opf_t op_flags = 0;
int replace_only = 0;
struct bio *bi, *rbi;
struct md_rdev *rdev, *rrdev = NULL;