diff options
author | Nathan Chancellor <natechancellor@gmail.com> | 2018-10-18 17:55:41 -0400 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2018-10-23 21:27:53 -0400 |
commit | 09968e5049b4b9a47413327c56f254aa2812bbc2 (patch) | |
tree | 83027539e2551628115c7567dbe15b3719736d7f /drivers/scsi/3w-9xxx.c | |
parent | 1b171b1a29d68bcad1e44b0135a5155570efa3ea (diff) |
scsi: 3w-sas: 3w-9xxx: Use unsigned char for cdb
Clang warns a few times:
drivers/scsi/3w-sas.c:386:11: warning: implicit conversion from 'int' to
'char' changes value from 128 to -128 [-Wconstant-conversion]
cdb[4] = TW_ALLOCATION_LENGTH; /* allocation length */
~ ^~~~~~~~~~~~~~~~~~~~
Update cdb's type to unsigned char, which matches the type of the cdb
member in struct TW_Command_Apache.
Link: https://github.com/ClangBuiltLinux/linux/issues/158
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Acked-by: Adam Radford <aradford@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/3w-9xxx.c')
-rw-r--r-- | drivers/scsi/3w-9xxx.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/scsi/3w-9xxx.c b/drivers/scsi/3w-9xxx.c index 05293babb031..2d655a97b959 100644 --- a/drivers/scsi/3w-9xxx.c +++ b/drivers/scsi/3w-9xxx.c | |||
@@ -143,7 +143,9 @@ static int twa_poll_status_gone(TW_Device_Extension *tw_dev, u32 flag, int secon | |||
143 | static int twa_post_command_packet(TW_Device_Extension *tw_dev, int request_id, char internal); | 143 | static int twa_post_command_packet(TW_Device_Extension *tw_dev, int request_id, char internal); |
144 | static int twa_reset_device_extension(TW_Device_Extension *tw_dev); | 144 | static int twa_reset_device_extension(TW_Device_Extension *tw_dev); |
145 | static int twa_reset_sequence(TW_Device_Extension *tw_dev, int soft_reset); | 145 | static int twa_reset_sequence(TW_Device_Extension *tw_dev, int soft_reset); |
146 | static int twa_scsiop_execute_scsi(TW_Device_Extension *tw_dev, int request_id, char *cdb, int use_sg, TW_SG_Entry *sglistarg); | 146 | static int twa_scsiop_execute_scsi(TW_Device_Extension *tw_dev, int request_id, |
147 | unsigned char *cdb, int use_sg, | ||
148 | TW_SG_Entry *sglistarg); | ||
147 | static void twa_scsiop_execute_scsi_complete(TW_Device_Extension *tw_dev, int request_id); | 149 | static void twa_scsiop_execute_scsi_complete(TW_Device_Extension *tw_dev, int request_id); |
148 | static char *twa_string_lookup(twa_message_type *table, unsigned int aen_code); | 150 | static char *twa_string_lookup(twa_message_type *table, unsigned int aen_code); |
149 | 151 | ||
@@ -278,7 +280,7 @@ out: | |||
278 | static int twa_aen_drain_queue(TW_Device_Extension *tw_dev, int no_check_reset) | 280 | static int twa_aen_drain_queue(TW_Device_Extension *tw_dev, int no_check_reset) |
279 | { | 281 | { |
280 | int request_id = 0; | 282 | int request_id = 0; |
281 | char cdb[TW_MAX_CDB_LEN]; | 283 | unsigned char cdb[TW_MAX_CDB_LEN]; |
282 | TW_SG_Entry sglist[1]; | 284 | TW_SG_Entry sglist[1]; |
283 | int finished = 0, count = 0; | 285 | int finished = 0, count = 0; |
284 | TW_Command_Full *full_command_packet; | 286 | TW_Command_Full *full_command_packet; |
@@ -423,7 +425,7 @@ static void twa_aen_queue_event(TW_Device_Extension *tw_dev, TW_Command_Apache_H | |||
423 | /* This function will read the aen queue from the isr */ | 425 | /* This function will read the aen queue from the isr */ |
424 | static int twa_aen_read_queue(TW_Device_Extension *tw_dev, int request_id) | 426 | static int twa_aen_read_queue(TW_Device_Extension *tw_dev, int request_id) |
425 | { | 427 | { |
426 | char cdb[TW_MAX_CDB_LEN]; | 428 | unsigned char cdb[TW_MAX_CDB_LEN]; |
427 | TW_SG_Entry sglist[1]; | 429 | TW_SG_Entry sglist[1]; |
428 | TW_Command_Full *full_command_packet; | 430 | TW_Command_Full *full_command_packet; |
429 | int retval = 1; | 431 | int retval = 1; |
@@ -1798,7 +1800,9 @@ out: | |||
1798 | static DEF_SCSI_QCMD(twa_scsi_queue) | 1800 | static DEF_SCSI_QCMD(twa_scsi_queue) |
1799 | 1801 | ||
1800 | /* This function hands scsi cdb's to the firmware */ | 1802 | /* This function hands scsi cdb's to the firmware */ |
1801 | static int twa_scsiop_execute_scsi(TW_Device_Extension *tw_dev, int request_id, char *cdb, int use_sg, TW_SG_Entry *sglistarg) | 1803 | static int twa_scsiop_execute_scsi(TW_Device_Extension *tw_dev, int request_id, |
1804 | unsigned char *cdb, int use_sg, | ||
1805 | TW_SG_Entry *sglistarg) | ||
1802 | { | 1806 | { |
1803 | TW_Command_Full *full_command_packet; | 1807 | TW_Command_Full *full_command_packet; |
1804 | TW_Command_Apache *command_packet; | 1808 | TW_Command_Apache *command_packet; |