target/user: Fix a data type in tcmu_queue_cmd()
authorBart Van Assche <bart.vanassche@sandisk.com>
Fri, 18 Nov 2016 23:32:59 +0000 (15:32 -0800)
committerBart Van Assche <bart.vanassche@sandisk.com>
Fri, 9 Dec 2016 18:20:07 +0000 (10:20 -0800)
This patch avoids that sparse reports the following error messages:

drivers/target/target_core_user.c:547:13: warning: incorrect type in assignment (different base types)
drivers/target/target_core_user.c:547:13:    expected int [signed] ret
drivers/target/target_core_user.c:547:13:    got restricted sense_reason_t
drivers/target/target_core_user.c:548:20: warning: restricted sense_reason_t degrades to integer
drivers/target/target_core_user.c:557:16: warning: incorrect type in return expression (different base types)
drivers/target/target_core_user.c:557:16:    expected restricted sense_reason_t
drivers/target/target_core_user.c:557:16:    got int [signed] ret

Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
drivers/target/target_core_user.c

index 47562509b4892b07b85cb304a3190804c658d6e9..b9eb0b605b0b012a5055f7dff83fd6c57f4f790b 100644 (file)
@@ -537,7 +537,7 @@ tcmu_queue_cmd(struct se_cmd *se_cmd)
        struct se_device *se_dev = se_cmd->se_dev;
        struct tcmu_dev *udev = TCMU_DEV(se_dev);
        struct tcmu_cmd *tcmu_cmd;
-       int ret;
+       sense_reason_t ret;
 
        tcmu_cmd = tcmu_alloc_cmd(se_cmd);
        if (!tcmu_cmd)