Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

scsi: bnx2fc: remove set but not used variables 'task','port','orig_task'

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/scsi/bnx2fc/bnx2fc_hwi.c: In function bnx2fc_process_unsol_compl:
drivers/scsi/bnx2fc/bnx2fc_hwi.c:636:30: warning: variable task set but not used [-Wunused-but-set-variable]
drivers/scsi/bnx2fc/bnx2fc_hwi.c: In function bnx2fc_process_ofld_cmpl:
drivers/scsi/bnx2fc/bnx2fc_hwi.c:1125:21: warning: variable port set but not used [-Wunused-but-set-variable]
drivers/scsi/bnx2fc/bnx2fc_hwi.c: In function bnx2fc_init_seq_cleanup_task:
drivers/scsi/bnx2fc/bnx2fc_hwi.c:1468:30: warning: variable orig_task set but not used [-Wunused-but-set-variable]

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: zhengbin <zhengbin13@huawei.com>
Acked-by: Saurav Kashyap <skashyap@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

zhengbin and committed by
Martin K. Petersen
84769706 2f8eeaa2

-16
-16
drivers/scsi/bnx2fc/bnx2fc_hwi.c
··· 633 633 u16 xid; 634 634 u32 frame_len, len; 635 635 struct bnx2fc_cmd *io_req = NULL; 636 - struct fcoe_task_ctx_entry *task, *task_page; 637 636 struct bnx2fc_interface *interface = tgt->port->priv; 638 637 struct bnx2fc_hba *hba = interface->hba; 639 638 int task_idx, index; ··· 710 711 711 712 task_idx = xid / BNX2FC_TASKS_PER_PAGE; 712 713 index = xid % BNX2FC_TASKS_PER_PAGE; 713 - task_page = (struct fcoe_task_ctx_entry *) 714 - hba->task_ctx[task_idx]; 715 - task = &(task_page[index]); 716 714 717 715 io_req = (struct bnx2fc_cmd *)hba->cmd_mgr->cmds[xid]; 718 716 if (!io_req) ··· 835 839 836 840 task_idx = xid / BNX2FC_TASKS_PER_PAGE; 837 841 index = xid % BNX2FC_TASKS_PER_PAGE; 838 - task_page = (struct fcoe_task_ctx_entry *) 839 - interface->hba->task_ctx[task_idx]; 840 - task = &(task_page[index]); 841 842 io_req = (struct bnx2fc_cmd *)hba->cmd_mgr->cmds[xid]; 842 843 if (!io_req) 843 844 goto ret_warn_rqe; ··· 1115 1122 struct fcoe_kcqe *ofld_kcqe) 1116 1123 { 1117 1124 struct bnx2fc_rport *tgt; 1118 - struct fcoe_port *port; 1119 1125 struct bnx2fc_interface *interface; 1120 1126 u32 conn_id; 1121 1127 u32 context_id; ··· 1128 1136 } 1129 1137 BNX2FC_TGT_DBG(tgt, "Entered ofld compl - context_id = 0x%x\n", 1130 1138 ofld_kcqe->fcoe_conn_context_id); 1131 - port = tgt->port; 1132 1139 interface = tgt->port->priv; 1133 1140 if (hba != interface->hba) { 1134 1141 printk(KERN_ERR PFX "ERROR:ofld_cmpl: HBA mis-match\n"); ··· 1454 1463 { 1455 1464 struct scsi_cmnd *sc_cmd = orig_io_req->sc_cmd; 1456 1465 struct bnx2fc_rport *tgt = seq_clnp_req->tgt; 1457 - struct bnx2fc_interface *interface = tgt->port->priv; 1458 1466 struct fcoe_bd_ctx *bd = orig_io_req->bd_tbl->bd_tbl; 1459 - struct fcoe_task_ctx_entry *orig_task; 1460 - struct fcoe_task_ctx_entry *task_page; 1461 1467 struct fcoe_ext_mul_sges_ctx *sgl; 1462 1468 u8 task_type = FCOE_TASK_TYPE_SEQUENCE_CLEANUP; 1463 1469 u8 orig_task_type; ··· 1515 1527 } else { 1516 1528 orig_task_idx = orig_xid / BNX2FC_TASKS_PER_PAGE; 1517 1529 index = orig_xid % BNX2FC_TASKS_PER_PAGE; 1518 - 1519 - task_page = (struct fcoe_task_ctx_entry *) 1520 - interface->hba->task_ctx[orig_task_idx]; 1521 - orig_task = &(task_page[index]); 1522 1530 1523 1531 /* Multiple SGEs were used for this IO */ 1524 1532 sgl = &task->rxwr_only.union_ctx.read_info.sgl_ctx.sgl;