summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/3w-9xxx.c
diff options
context:
space:
mode:
authorNathan Chancellor <natechancellor@gmail.com>2018-10-18 17:55:41 -0400
committerMartin K. Petersen <martin.petersen@oracle.com>2018-10-23 21:27:53 -0400
commit09968e5049b4b9a47413327c56f254aa2812bbc2 (patch)
tree83027539e2551628115c7567dbe15b3719736d7f /drivers/scsi/3w-9xxx.c
parent1b171b1a29d68bcad1e44b0135a5155570efa3ea (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.c12
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
143static int twa_post_command_packet(TW_Device_Extension *tw_dev, int request_id, char internal); 143static int twa_post_command_packet(TW_Device_Extension *tw_dev, int request_id, char internal);
144static int twa_reset_device_extension(TW_Device_Extension *tw_dev); 144static int twa_reset_device_extension(TW_Device_Extension *tw_dev);
145static int twa_reset_sequence(TW_Device_Extension *tw_dev, int soft_reset); 145static int twa_reset_sequence(TW_Device_Extension *tw_dev, int soft_reset);
146static int twa_scsiop_execute_scsi(TW_Device_Extension *tw_dev, int request_id, char *cdb, int use_sg, TW_SG_Entry *sglistarg); 146static 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);
147static void twa_scsiop_execute_scsi_complete(TW_Device_Extension *tw_dev, int request_id); 149static void twa_scsiop_execute_scsi_complete(TW_Device_Extension *tw_dev, int request_id);
148static char *twa_string_lookup(twa_message_type *table, unsigned int aen_code); 150static char *twa_string_lookup(twa_message_type *table, unsigned int aen_code);
149 151
@@ -278,7 +280,7 @@ out:
278static int twa_aen_drain_queue(TW_Device_Extension *tw_dev, int no_check_reset) 280static 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 */
424static int twa_aen_read_queue(TW_Device_Extension *tw_dev, int request_id) 426static 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:
1798static DEF_SCSI_QCMD(twa_scsi_queue) 1800static 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 */
1801static int twa_scsiop_execute_scsi(TW_Device_Extension *tw_dev, int request_id, char *cdb, int use_sg, TW_SG_Entry *sglistarg) 1803static 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;