]> git.baikalelectronics.ru Git - kernel.git/commitdiff
scsi/device_handlers: Use the new blk_opf_t type
authorBart Van Assche <bvanassche@acm.org>
Thu, 14 Jul 2022 18:07:08 +0000 (11:07 -0700)
committerJens Axboe <axboe@kernel.dk>
Thu, 14 Jul 2022 18:14:32 +0000 (12:14 -0600)
Improve static type checking by using the new blk_opf_t type for variables
that represent request flags.

Cc: Hannes Reinecke <hare@suse.com>
Cc: Martin Wilck <mwilck@suse.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Link: https://lore.kernel.org/r/20220714180729.1065367-43-bvanassche@acm.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/scsi/device_handler/scsi_dh_alua.c
drivers/scsi/device_handler/scsi_dh_emc.c
drivers/scsi/device_handler/scsi_dh_hp_sw.c
drivers/scsi/device_handler/scsi_dh_rdac.c

index 1d9be771f3ee0508098d4e3445b345e527827b6e..610a51538f03475196571b7cf66ea71b6ed8cc7f 100644 (file)
@@ -127,7 +127,7 @@ static int submit_rtpg(struct scsi_device *sdev, unsigned char *buff,
                       int bufflen, struct scsi_sense_hdr *sshdr, int flags)
 {
        u8 cdb[MAX_COMMAND_SIZE];
-       int req_flags = REQ_FAILFAST_DEV | REQ_FAILFAST_TRANSPORT |
+       blk_opf_t req_flags = REQ_FAILFAST_DEV | REQ_FAILFAST_TRANSPORT |
                REQ_FAILFAST_DRIVER;
 
        /* Prepare the command. */
@@ -157,7 +157,7 @@ static int submit_stpg(struct scsi_device *sdev, int group_id,
        u8 cdb[MAX_COMMAND_SIZE];
        unsigned char stpg_data[8];
        int stpg_len = 8;
-       int req_flags = REQ_FAILFAST_DEV | REQ_FAILFAST_TRANSPORT |
+       blk_opf_t req_flags = REQ_FAILFAST_DEV | REQ_FAILFAST_TRANSPORT |
                REQ_FAILFAST_DRIVER;
 
        /* Prepare the data buffer */
index bd28ec6cfb72f0f4e1bc25f7225b6df291387bb6..2e21ab447873c1646253b1b42c54d067a85af2a3 100644 (file)
@@ -239,7 +239,7 @@ static int send_trespass_cmd(struct scsi_device *sdev,
        unsigned char cdb[MAX_COMMAND_SIZE];
        int err, res = SCSI_DH_OK, len;
        struct scsi_sense_hdr sshdr;
-       u64 req_flags = REQ_FAILFAST_DEV | REQ_FAILFAST_TRANSPORT |
+       blk_opf_t req_flags = REQ_FAILFAST_DEV | REQ_FAILFAST_TRANSPORT |
                REQ_FAILFAST_DRIVER;
 
        if (csdev->flags & CLARIION_SHORT_TRESPASS) {
index 4a3f7831a2d648dddeba35e5c55cb6359c9d425e..0d2cfa60aa063ab161a53ca70b4449d8fc5ad952 100644 (file)
@@ -83,7 +83,7 @@ static int hp_sw_tur(struct scsi_device *sdev, struct hp_sw_dh_data *h)
        unsigned char cmd[6] = { TEST_UNIT_READY };
        struct scsi_sense_hdr sshdr;
        int ret = SCSI_DH_OK, res;
-       u64 req_flags = REQ_FAILFAST_DEV | REQ_FAILFAST_TRANSPORT |
+       blk_opf_t req_flags = REQ_FAILFAST_DEV | REQ_FAILFAST_TRANSPORT |
                REQ_FAILFAST_DRIVER;
 
 retry:
@@ -121,7 +121,7 @@ static int hp_sw_start_stop(struct hp_sw_dh_data *h)
        struct scsi_device *sdev = h->sdev;
        int res, rc = SCSI_DH_OK;
        int retry_cnt = HP_SW_RETRIES;
-       u64 req_flags = REQ_FAILFAST_DEV | REQ_FAILFAST_TRANSPORT |
+       blk_opf_t req_flags = REQ_FAILFAST_DEV | REQ_FAILFAST_TRANSPORT |
                REQ_FAILFAST_DRIVER;
 
 retry:
index 66652ab409cc9a7ed3171fa6a39f76cfc869e243..bf8754741f85a4dcee6abe5f23e49eb8099ce899 100644 (file)
@@ -536,7 +536,7 @@ static void send_mode_select(struct work_struct *work)
        unsigned char cdb[MAX_COMMAND_SIZE];
        struct scsi_sense_hdr sshdr;
        unsigned int data_size;
-       u64 req_flags = REQ_FAILFAST_DEV | REQ_FAILFAST_TRANSPORT |
+       blk_opf_t req_flags = REQ_FAILFAST_DEV | REQ_FAILFAST_TRANSPORT |
                REQ_FAILFAST_DRIVER;
 
        spin_lock(&ctlr->ms_lock);