diff mbox series

[3/7] dm vdo: fix various blk_opf_t sparse warnings

Message ID 4ebc72afc1322fb76e635d73cc9c9b36eaa98aed.1707184413.git.msakai@redhat.com (mailing list archive)
State Accepted, archived
Delegated to: Mike Snitzer
Headers show
Series dm vdo: fix sparse warnings | expand

Commit Message

Matthew Sakai Feb. 6, 2024, 2:04 a.m. UTC
From: Mike Snitzer <snitzer@kernel.org>

Use proper blk_opf_t type rather than unsigned int.

Signed-off-by: Mike Snitzer <snitzer@kernel.org>
Signed-off-by: Susan LeGendre-McGhee <slegendr@redhat.com>
Signed-off-by: Matthew Sakai <msakai@redhat.com>
---
 drivers/md/dm-vdo/block-map.c    | 2 +-
 drivers/md/dm-vdo/data-vio.c     | 4 ++--
 drivers/md/dm-vdo/io-submitter.c | 2 +-
 drivers/md/dm-vdo/io-submitter.h | 4 ++--
 drivers/md/dm-vdo/vio.c          | 4 ++--
 drivers/md/dm-vdo/vio.h          | 4 ++--
 6 files changed, 10 insertions(+), 10 deletions(-)
diff mbox series

Patch

diff --git a/drivers/md/dm-vdo/block-map.c b/drivers/md/dm-vdo/block-map.c
index 1278a5791160..cc87e1ac72b6 100644
--- a/drivers/md/dm-vdo/block-map.c
+++ b/drivers/md/dm-vdo/block-map.c
@@ -1620,7 +1620,7 @@  static void write_initialized_page(struct vdo_completion *completion)
 	struct block_map_zone *zone = pooled->context;
 	struct tree_page *tree_page = completion->parent;
 	struct block_map_page *page = (struct block_map_page *) vio->data;
-	unsigned int operation = REQ_OP_WRITE | REQ_PRIO;
+	blk_opf_t operation = REQ_OP_WRITE | REQ_PRIO;
 
 	/*
 	 * Now that we know the page has been written at least once, mark the copy we are writing
diff --git a/drivers/md/dm-vdo/data-vio.c b/drivers/md/dm-vdo/data-vio.c
index 328b645dee16..e0f1574ae112 100644
--- a/drivers/md/dm-vdo/data-vio.c
+++ b/drivers/md/dm-vdo/data-vio.c
@@ -69,7 +69,7 @@ 
  *   ASAP to service heavy load, which is the only place where REQ_BACKGROUND might aid in load
  *   prioritization.
  */
-static unsigned int PASSTHROUGH_FLAGS = (REQ_PRIO | REQ_META | REQ_SYNC | REQ_RAHEAD);
+static blk_opf_t PASSTHROUGH_FLAGS = (REQ_PRIO | REQ_META | REQ_SYNC | REQ_RAHEAD);
 
 /**
  * DOC:
@@ -1570,7 +1570,7 @@  static void read_block(struct vdo_completion *completion)
 		result = vio_reset_bio(vio, (char *) data_vio->compression.block,
 				       read_endio, REQ_OP_READ, data_vio->mapped.pbn);
 	} else {
-		int opf = ((data_vio->user_bio->bi_opf & PASSTHROUGH_FLAGS) | REQ_OP_READ);
+		blk_opf_t opf = ((data_vio->user_bio->bi_opf & PASSTHROUGH_FLAGS) | REQ_OP_READ);
 
 		if (data_vio->is_partial) {
 			result = vio_reset_bio(vio, vio->data, read_endio, opf,
diff --git a/drivers/md/dm-vdo/io-submitter.c b/drivers/md/dm-vdo/io-submitter.c
index 74f33a3ddce5..6c050f2b3b44 100644
--- a/drivers/md/dm-vdo/io-submitter.c
+++ b/drivers/md/dm-vdo/io-submitter.c
@@ -338,7 +338,7 @@  void vdo_submit_data_vio(struct data_vio *data_vio)
  */
 void __submit_metadata_vio(struct vio *vio, physical_block_number_t physical,
 			   bio_end_io_t callback, vdo_action_fn error_handler,
-			   unsigned int operation, char *data)
+			   blk_opf_t operation, char *data)
 {
 	int result;
 	struct vdo_completion *completion = &vio->completion;
diff --git a/drivers/md/dm-vdo/io-submitter.h b/drivers/md/dm-vdo/io-submitter.h
index ddd5f4b391b6..80748699496f 100644
--- a/drivers/md/dm-vdo/io-submitter.h
+++ b/drivers/md/dm-vdo/io-submitter.h
@@ -26,11 +26,11 @@  void vdo_submit_data_vio(struct data_vio *data_vio);
 
 void __submit_metadata_vio(struct vio *vio, physical_block_number_t physical,
 			   bio_end_io_t callback, vdo_action_fn error_handler,
-			   unsigned int operation, char *data);
+			   blk_opf_t operation, char *data);
 
 static inline void vdo_submit_metadata_vio(struct vio *vio, physical_block_number_t physical,
 					   bio_end_io_t callback, vdo_action_fn error_handler,
-					   unsigned int operation)
+					   blk_opf_t operation)
 {
 	__submit_metadata_vio(vio, physical, callback, error_handler,
 			      operation, vio->data);
diff --git a/drivers/md/dm-vdo/vio.c b/drivers/md/dm-vdo/vio.c
index 6acaba149c75..f9c54ec56176 100644
--- a/drivers/md/dm-vdo/vio.c
+++ b/drivers/md/dm-vdo/vio.c
@@ -172,7 +172,7 @@  void free_vio(struct vio *vio)
 
 /* Set bio properties for a VDO read or write. */
 void vdo_set_bio_properties(struct bio *bio, struct vio *vio, bio_end_io_t callback,
-			    unsigned int bi_opf, physical_block_number_t pbn)
+			    blk_opf_t bi_opf, physical_block_number_t pbn)
 {
 	struct vdo *vdo = vio->completion.vdo;
 	struct device_config *config = vdo->device_config;
@@ -193,7 +193,7 @@  void vdo_set_bio_properties(struct bio *bio, struct vio *vio, bio_end_io_t callb
  * vio associated with the bio.
  */
 int vio_reset_bio(struct vio *vio, char *data, bio_end_io_t callback,
-		  unsigned int bi_opf, physical_block_number_t pbn)
+		  blk_opf_t bi_opf, physical_block_number_t pbn)
 {
 	int bvec_count, offset, len, i;
 	struct bio *bio = vio->bio;
diff --git a/drivers/md/dm-vdo/vio.h b/drivers/md/dm-vdo/vio.h
index 71585424f85b..fbfee5e3415d 100644
--- a/drivers/md/dm-vdo/vio.h
+++ b/drivers/md/dm-vdo/vio.h
@@ -119,10 +119,10 @@  static inline void initialize_vio(struct vio *vio, struct bio *bio,
 }
 
 void vdo_set_bio_properties(struct bio *bio, struct vio *vio, bio_end_io_t callback,
-			    unsigned int bi_opf, physical_block_number_t pbn);
+			    blk_opf_t bi_opf, physical_block_number_t pbn);
 
 int vio_reset_bio(struct vio *vio, char *data, bio_end_io_t callback,
-		  unsigned int bi_opf, physical_block_number_t pbn);
+		  blk_opf_t bi_opf, physical_block_number_t pbn);
 
 void update_vio_error_stats(struct vio *vio, const char *format, ...)
 	__printf(2, 3);