scsi: qedf: Cleanup the type of io_log->op
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 3 May 2017 21:23:57 +0000 (00:23 +0300)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 9 May 2017 01:51:39 +0000 (21:51 -0400)
We store sc_cmd->cmnd[0] which is an unsigned char in io_log->op so
this should also be unsigned char.  The other thing is that this is
displayed in the debugfs:

seq_printf(s, "0x%02x:", io_log->op);

Smatch complains that the formatting won't work for negative values so
changing it to unsigned silences that warning as well.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Chad Dupuis <chad.dupuis@cavium.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/qedf/qedf.h

index 40aeb6bb96a2afd11c3264b7ea0004110033e2d1..07ee88200e91cfc072eed5506c6eca0974dda67f 100644 (file)
@@ -259,7 +259,7 @@ struct qedf_io_log {
        uint16_t task_id;
        uint32_t port_id; /* Remote port fabric ID */
        int lun;
-       char op; /* SCSI CDB */
+       unsigned char op; /* SCSI CDB */
        uint8_t lba[4];
        unsigned int bufflen; /* SCSI buffer length */
        unsigned int sg_count; /* Number of SG elements */