Skip to content

Commit 6464d5b

Browse files
ColinIanKingmartinkpetersen
authored andcommitted
scsi: megaraid_sas: Remove redundant variable cmd_type
The variable cmd_type is assigned a value but it is never read. The variable and the assignment are redundant and can be removed. Cleans up clang scan build warning: drivers/scsi/megaraid/megaraid_sas_fusion.c:3228:10: warning: Although the value stored to 'cmd_type' is used in the enclosing expression, the value is never actually read from 'cmd_type' [deadcode.DeadStores] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Colin Ian King <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent 554b117 commit 6464d5b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/scsi/megaraid/megaraid_sas_fusion.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3199,7 +3199,6 @@ megasas_build_io_fusion(struct megasas_instance *instance,
31993199
struct megasas_cmd_fusion *cmd)
32003200
{
32013201
int sge_count;
3202-
u8 cmd_type;
32033202
u16 pd_index = 0;
32043203
u8 drive_type = 0;
32053204
struct MPI2_RAID_SCSI_IO_REQUEST *io_request = cmd->io_request;
@@ -3225,7 +3224,7 @@ megasas_build_io_fusion(struct megasas_instance *instance,
32253224
*/
32263225
io_request->IoFlags = cpu_to_le16(scp->cmd_len);
32273226

3228-
switch (cmd_type = megasas_cmd_type(scp)) {
3227+
switch (megasas_cmd_type(scp)) {
32293228
case READ_WRITE_LDIO:
32303229
megasas_build_ldio_fusion(instance, scp, cmd);
32313230
break;

0 commit comments

Comments
 (0)