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. Cc: Song Liu <song@xxxxxxxxxx> Signed-off-by: Bart Van Assche <bvanassche@xxxxxxx> --- drivers/md/md.c | 3 ++- drivers/md/md.h | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/md/md.c b/drivers/md/md.c index c7ecb0bffda0..d354faa95be7 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -993,7 +993,8 @@ int md_super_wait(struct mddev *mddev) } int sync_page_io(struct md_rdev *rdev, sector_t sector, int size, - struct page *page, int op, int op_flags, bool metadata_op) + struct page *page, enum req_op op, blk_opf_t op_flags, + bool metadata_op) { struct bio bio; struct bio_vec bvec; diff --git a/drivers/md/md.h b/drivers/md/md.h index cf2cbb17acbd..f93bf7396d86 100644 --- a/drivers/md/md.h +++ b/drivers/md/md.h @@ -738,8 +738,8 @@ extern void md_super_write(struct mddev *mddev, struct md_rdev *rdev, sector_t sector, int size, struct page *page); extern int md_super_wait(struct mddev *mddev); extern int sync_page_io(struct md_rdev *rdev, sector_t sector, int size, - struct page *page, int op, int op_flags, - bool metadata_op); + struct page *page, enum req_op op, blk_opf_t op_flags, + bool metadata_op); extern void md_do_sync(struct md_thread *thread); extern void md_new_event(void); extern void md_allow_write(struct mddev *mddev);