diff mbox series

null_blk: fix type mismatch null_handle_cmd()

Message ID 20190628232904.31211-1-chaitanya.kulkarni@wdc.com (mailing list archive)
State New, archived
Headers show
Series null_blk: fix type mismatch null_handle_cmd() | expand

Commit Message

Chaitanya Kulkarni June 28, 2019, 11:29 p.m. UTC
In null_handle_cmd() when device is configured as zoned, variable op is
decalred as an int, where it is used to hold values of type
REQ_OP_XXX which is of type enum req_opf. Change the type from
int to enum req_opf.

Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
---
 drivers/block/null_blk_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jens Axboe June 29, 2019, 3:36 p.m. UTC | #1
On 6/28/19 5:29 PM, Chaitanya Kulkarni wrote:
> In null_handle_cmd() when device is configured as zoned, variable op is
> decalred as an int, where it is used to hold values of type
> REQ_OP_XXX which is of type enum req_opf. Change the type from
> int to enum req_opf.

Applied, thanks.
diff mbox series

Patch

diff --git a/drivers/block/null_blk_main.c b/drivers/block/null_blk_main.c
index 22303e59a274..99328ded60d1 100644
--- a/drivers/block/null_blk_main.c
+++ b/drivers/block/null_blk_main.c
@@ -1198,7 +1198,7 @@  static blk_status_t null_handle_cmd(struct nullb_cmd *cmd)
 	if (!cmd->error && dev->zoned) {
 		sector_t sector;
 		unsigned int nr_sectors;
-		int op;
+		enum req_opf op;
 
 		if (dev->queue_mode == NULL_Q_BIO) {
 			op = bio_op(cmd->bio);