* [PATCH 0/3] scsi: bnx2fc: remove some set but not used variables
@ 2019-08-23 13:22 zhengbin
2019-08-23 13:22 ` [PATCH 1/3] scsi: bnx2fc: remove set but not used variable 'fh' zhengbin
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: zhengbin @ 2019-08-23 13:22 UTC (permalink / raw)
To: QLogic-Storage-Upstream, jejb, martin.petersen, linux-scsi
Cc: yi.zhang, zhengbin13
zhengbin (3):
scsi: bnx2fc: remove set but not used variable 'fh'
scsi: bnx2fc: remove set but not used variables 'lport','host'
scsi: bnx2fc: remove set but not used variables
'task','port','orig_task'
drivers/scsi/bnx2fc/bnx2fc_fcoe.c | 2 --
drivers/scsi/bnx2fc/bnx2fc_hwi.c | 16 ----------------
drivers/scsi/bnx2fc/bnx2fc_io.c | 7 -------
3 files changed, 25 deletions(-)
--
2.7.4
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/3] scsi: bnx2fc: remove set but not used variable 'fh'
2019-08-23 13:22 [PATCH 0/3] scsi: bnx2fc: remove some set but not used variables zhengbin
@ 2019-08-23 13:22 ` zhengbin
2019-08-26 6:03 ` Saurav Kashyap
2019-08-23 13:22 ` [PATCH 2/3] scsi: bnx2fc: remove set but not used variables 'lport','host' zhengbin
` (2 subsequent siblings)
3 siblings, 1 reply; 8+ messages in thread
From: zhengbin @ 2019-08-23 13:22 UTC (permalink / raw)
To: QLogic-Storage-Upstream, jejb, martin.petersen, linux-scsi
Cc: yi.zhang, zhengbin13
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/scsi/bnx2fc/bnx2fc_fcoe.c: In function bnx2fc_rcv:
drivers/scsi/bnx2fc/bnx2fc_fcoe.c:431:26: warning: variable fh set but not used [-Wunused-but-set-variable]
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: zhengbin <zhengbin13@huawei.com>
---
drivers/scsi/bnx2fc/bnx2fc_fcoe.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
index 7796799..ab721ab 100644
--- a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
+++ b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
@@ -428,7 +428,6 @@ static int bnx2fc_rcv(struct sk_buff *skb, struct net_device *dev,
struct fc_lport *lport;
struct bnx2fc_interface *interface;
struct fcoe_ctlr *ctlr;
- struct fc_frame_header *fh;
struct fcoe_rcv_info *fr;
struct fcoe_percpu_s *bg;
struct sk_buff *tmp_skb;
@@ -463,7 +462,6 @@ static int bnx2fc_rcv(struct sk_buff *skb, struct net_device *dev,
goto err;
skb_set_transport_header(skb, sizeof(struct fcoe_hdr));
- fh = (struct fc_frame_header *) skb_transport_header(skb);
fr = fcoe_dev_from_skb(skb);
fr->fr_dev = lport;
--
2.7.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/3] scsi: bnx2fc: remove set but not used variables 'lport','host'
2019-08-23 13:22 [PATCH 0/3] scsi: bnx2fc: remove some set but not used variables zhengbin
2019-08-23 13:22 ` [PATCH 1/3] scsi: bnx2fc: remove set but not used variable 'fh' zhengbin
@ 2019-08-23 13:22 ` zhengbin
2019-08-26 6:03 ` Saurav Kashyap
2019-08-23 13:22 ` [PATCH 3/3] scsi: bnx2fc: remove set but not used variables 'task','port','orig_task' zhengbin
2019-08-29 22:55 ` [PATCH 0/3] scsi: bnx2fc: remove some set but not used variables Martin K. Petersen
3 siblings, 1 reply; 8+ messages in thread
From: zhengbin @ 2019-08-23 13:22 UTC (permalink / raw)
To: QLogic-Storage-Upstream, jejb, martin.petersen, linux-scsi
Cc: yi.zhang, zhengbin13
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/scsi/bnx2fc/bnx2fc_io.c: In function bnx2fc_initiate_seq_cleanup:
drivers/scsi/bnx2fc/bnx2fc_io.c:932:19: warning: variable lport set but not used [-Wunused-but-set-variable]
drivers/scsi/bnx2fc/bnx2fc_io.c: In function bnx2fc_initiate_cleanup:
drivers/scsi/bnx2fc/bnx2fc_io.c:1001:19: warning: variable lport set but not used [-Wunused-but-set-variable]
drivers/scsi/bnx2fc/bnx2fc_io.c: In function bnx2fc_process_scsi_cmd_compl:
drivers/scsi/bnx2fc/bnx2fc_io.c:1882:20: warning: variable host set but not used [-Wunused-but-set-variable]
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: zhengbin <zhengbin13@huawei.com>
---
drivers/scsi/bnx2fc/bnx2fc_io.c | 7 -------
1 file changed, 7 deletions(-)
diff --git a/drivers/scsi/bnx2fc/bnx2fc_io.c b/drivers/scsi/bnx2fc/bnx2fc_io.c
index 9e50e5b..da00ca5 100644
--- a/drivers/scsi/bnx2fc/bnx2fc_io.c
+++ b/drivers/scsi/bnx2fc/bnx2fc_io.c
@@ -930,7 +930,6 @@ int bnx2fc_initiate_abts(struct bnx2fc_cmd *io_req)
int bnx2fc_initiate_seq_cleanup(struct bnx2fc_cmd *orig_io_req, u32 offset,
enum fc_rctl r_ctl)
{
- struct fc_lport *lport;
struct bnx2fc_rport *tgt = orig_io_req->tgt;
struct bnx2fc_interface *interface;
struct fcoe_port *port;
@@ -948,7 +947,6 @@ int bnx2fc_initiate_seq_cleanup(struct bnx2fc_cmd *orig_io_req, u32 offset,
port = orig_io_req->port;
interface = port->priv;
- lport = port->lport;
cb_arg = kzalloc(sizeof(struct bnx2fc_els_cb_arg), GFP_ATOMIC);
if (!cb_arg) {
@@ -999,7 +997,6 @@ int bnx2fc_initiate_seq_cleanup(struct bnx2fc_cmd *orig_io_req, u32 offset,
int bnx2fc_initiate_cleanup(struct bnx2fc_cmd *io_req)
{
- struct fc_lport *lport;
struct bnx2fc_rport *tgt = io_req->tgt;
struct bnx2fc_interface *interface;
struct fcoe_port *port;
@@ -1015,7 +1012,6 @@ int bnx2fc_initiate_cleanup(struct bnx2fc_cmd *io_req)
port = io_req->port;
interface = port->priv;
- lport = port->lport;
cleanup_io_req = bnx2fc_elstm_alloc(tgt, BNX2FC_CLEANUP);
if (!cleanup_io_req) {
@@ -1927,8 +1923,6 @@ void bnx2fc_process_scsi_cmd_compl(struct bnx2fc_cmd *io_req,
struct fcoe_fcp_rsp_payload *fcp_rsp;
struct bnx2fc_rport *tgt = io_req->tgt;
struct scsi_cmnd *sc_cmd;
- struct Scsi_Host *host;
-
/* scsi_cmd_cmpl is called with tgt lock held */
@@ -1957,7 +1951,6 @@ void bnx2fc_process_scsi_cmd_compl(struct bnx2fc_cmd *io_req,
/* parse fcp_rsp and obtain sense data from RQ if available */
bnx2fc_parse_fcp_rsp(io_req, fcp_rsp, num_rq);
- host = sc_cmd->device->host;
if (!sc_cmd->SCp.ptr) {
printk(KERN_ERR PFX "SCp.ptr is NULL\n");
return;
--
2.7.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 3/3] scsi: bnx2fc: remove set but not used variables 'task','port','orig_task'
2019-08-23 13:22 [PATCH 0/3] scsi: bnx2fc: remove some set but not used variables zhengbin
2019-08-23 13:22 ` [PATCH 1/3] scsi: bnx2fc: remove set but not used variable 'fh' zhengbin
2019-08-23 13:22 ` [PATCH 2/3] scsi: bnx2fc: remove set but not used variables 'lport','host' zhengbin
@ 2019-08-23 13:22 ` zhengbin
2019-08-26 6:03 ` Saurav Kashyap
2019-08-29 22:55 ` [PATCH 0/3] scsi: bnx2fc: remove some set but not used variables Martin K. Petersen
3 siblings, 1 reply; 8+ messages in thread
From: zhengbin @ 2019-08-23 13:22 UTC (permalink / raw)
To: QLogic-Storage-Upstream, jejb, martin.petersen, linux-scsi
Cc: yi.zhang, zhengbin13
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>
---
drivers/scsi/bnx2fc/bnx2fc_hwi.c | 16 ----------------
1 file changed, 16 deletions(-)
diff --git a/drivers/scsi/bnx2fc/bnx2fc_hwi.c b/drivers/scsi/bnx2fc/bnx2fc_hwi.c
index 747f019..f069e09 100644
--- a/drivers/scsi/bnx2fc/bnx2fc_hwi.c
+++ b/drivers/scsi/bnx2fc/bnx2fc_hwi.c
@@ -633,7 +633,6 @@ static void bnx2fc_process_unsol_compl(struct bnx2fc_rport *tgt, u16 wqe)
u16 xid;
u32 frame_len, len;
struct bnx2fc_cmd *io_req = NULL;
- struct fcoe_task_ctx_entry *task, *task_page;
struct bnx2fc_interface *interface = tgt->port->priv;
struct bnx2fc_hba *hba = interface->hba;
int task_idx, index;
@@ -711,9 +710,6 @@ static void bnx2fc_process_unsol_compl(struct bnx2fc_rport *tgt, u16 wqe)
task_idx = xid / BNX2FC_TASKS_PER_PAGE;
index = xid % BNX2FC_TASKS_PER_PAGE;
- task_page = (struct fcoe_task_ctx_entry *)
- hba->task_ctx[task_idx];
- task = &(task_page[index]);
io_req = (struct bnx2fc_cmd *)hba->cmd_mgr->cmds[xid];
if (!io_req)
@@ -839,9 +835,6 @@ static void bnx2fc_process_unsol_compl(struct bnx2fc_rport *tgt, u16 wqe)
task_idx = xid / BNX2FC_TASKS_PER_PAGE;
index = xid % BNX2FC_TASKS_PER_PAGE;
- task_page = (struct fcoe_task_ctx_entry *)
- interface->hba->task_ctx[task_idx];
- task = &(task_page[index]);
io_req = (struct bnx2fc_cmd *)hba->cmd_mgr->cmds[xid];
if (!io_req)
goto ret_warn_rqe;
@@ -1122,7 +1115,6 @@ static void bnx2fc_process_ofld_cmpl(struct bnx2fc_hba *hba,
struct fcoe_kcqe *ofld_kcqe)
{
struct bnx2fc_rport *tgt;
- struct fcoe_port *port;
struct bnx2fc_interface *interface;
u32 conn_id;
u32 context_id;
@@ -1136,7 +1128,6 @@ static void bnx2fc_process_ofld_cmpl(struct bnx2fc_hba *hba,
}
BNX2FC_TGT_DBG(tgt, "Entered ofld compl - context_id = 0x%x\n",
ofld_kcqe->fcoe_conn_context_id);
- port = tgt->port;
interface = tgt->port->priv;
if (hba != interface->hba) {
printk(KERN_ERR PFX "ERROR:ofld_cmpl: HBA mis-match\n");
@@ -1463,10 +1454,7 @@ void bnx2fc_init_seq_cleanup_task(struct bnx2fc_cmd *seq_clnp_req,
{
struct scsi_cmnd *sc_cmd = orig_io_req->sc_cmd;
struct bnx2fc_rport *tgt = seq_clnp_req->tgt;
- struct bnx2fc_interface *interface = tgt->port->priv;
struct fcoe_bd_ctx *bd = orig_io_req->bd_tbl->bd_tbl;
- struct fcoe_task_ctx_entry *orig_task;
- struct fcoe_task_ctx_entry *task_page;
struct fcoe_ext_mul_sges_ctx *sgl;
u8 task_type = FCOE_TASK_TYPE_SEQUENCE_CLEANUP;
u8 orig_task_type;
@@ -1528,10 +1516,6 @@ void bnx2fc_init_seq_cleanup_task(struct bnx2fc_cmd *seq_clnp_req,
orig_task_idx = orig_xid / BNX2FC_TASKS_PER_PAGE;
index = orig_xid % BNX2FC_TASKS_PER_PAGE;
- task_page = (struct fcoe_task_ctx_entry *)
- interface->hba->task_ctx[orig_task_idx];
- orig_task = &(task_page[index]);
-
/* Multiple SGEs were used for this IO */
sgl = &task->rxwr_only.union_ctx.read_info.sgl_ctx.sgl;
sgl->mul_sgl.cur_sge_addr.lo = (u32)phys_addr;
--
2.7.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 1/3] scsi: bnx2fc: remove set but not used variable 'fh'
2019-08-23 13:22 ` [PATCH 1/3] scsi: bnx2fc: remove set but not used variable 'fh' zhengbin
@ 2019-08-26 6:03 ` Saurav Kashyap
0 siblings, 0 replies; 8+ messages in thread
From: Saurav Kashyap @ 2019-08-26 6:03 UTC (permalink / raw)
To: zhengbin, QLogic-Storage-Upstream, jejb, martin.petersen, linux-scsi
Cc: yi.zhang
On 23/08/19, 6:46 PM, "linux-scsi-owner@vger.kernel.org on behalf of zhengbin" <linux-scsi-owner@vger.kernel.org on behalf of zhengbin13@huawei.com> wrote:
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/scsi/bnx2fc/bnx2fc_fcoe.c: In function bnx2fc_rcv:
drivers/scsi/bnx2fc/bnx2fc_fcoe.c:431:26: warning: variable fh set but not used [-Wunused-but-set-variable]
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: zhengbin <zhengbin13@huawei.com>
---
drivers/scsi/bnx2fc/bnx2fc_fcoe.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
index 7796799..ab721ab 100644
--- a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
+++ b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
@@ -428,7 +428,6 @@ static int bnx2fc_rcv(struct sk_buff *skb, struct net_device *dev,
struct fc_lport *lport;
struct bnx2fc_interface *interface;
struct fcoe_ctlr *ctlr;
- struct fc_frame_header *fh;
struct fcoe_rcv_info *fr;
struct fcoe_percpu_s *bg;
struct sk_buff *tmp_skb;
@@ -463,7 +462,6 @@ static int bnx2fc_rcv(struct sk_buff *skb, struct net_device *dev,
goto err;
skb_set_transport_header(skb, sizeof(struct fcoe_hdr));
- fh = (struct fc_frame_header *) skb_transport_header(skb);
fr = fcoe_dev_from_skb(skb);
fr->fr_dev = lport;
--
2.7.4
Hi,
Thanks for patch.
Acked-by: Saurav Kashyap <skashyap@marvell.com>
Thanks,
~Saurav
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 3/3] scsi: bnx2fc: remove set but not used variables 'task','port','orig_task'
2019-08-23 13:22 ` [PATCH 3/3] scsi: bnx2fc: remove set but not used variables 'task','port','orig_task' zhengbin
@ 2019-08-26 6:03 ` Saurav Kashyap
0 siblings, 0 replies; 8+ messages in thread
From: Saurav Kashyap @ 2019-08-26 6:03 UTC (permalink / raw)
To: zhengbin, QLogic-Storage-Upstream, jejb, martin.petersen, linux-scsi
Cc: yi.zhang
On 23/08/19, 6:46 PM, "linux-scsi-owner@vger.kernel.org on behalf of zhengbin" <linux-scsi-owner@vger.kernel.org on behalf of zhengbin13@huawei.com> wrote:
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>
---
drivers/scsi/bnx2fc/bnx2fc_hwi.c | 16 ----------------
1 file changed, 16 deletions(-)
diff --git a/drivers/scsi/bnx2fc/bnx2fc_hwi.c b/drivers/scsi/bnx2fc/bnx2fc_hwi.c
index 747f019..f069e09 100644
--- a/drivers/scsi/bnx2fc/bnx2fc_hwi.c
+++ b/drivers/scsi/bnx2fc/bnx2fc_hwi.c
@@ -633,7 +633,6 @@ static void bnx2fc_process_unsol_compl(struct bnx2fc_rport *tgt, u16 wqe)
u16 xid;
u32 frame_len, len;
struct bnx2fc_cmd *io_req = NULL;
- struct fcoe_task_ctx_entry *task, *task_page;
struct bnx2fc_interface *interface = tgt->port->priv;
struct bnx2fc_hba *hba = interface->hba;
int task_idx, index;
@@ -711,9 +710,6 @@ static void bnx2fc_process_unsol_compl(struct bnx2fc_rport *tgt, u16 wqe)
task_idx = xid / BNX2FC_TASKS_PER_PAGE;
index = xid % BNX2FC_TASKS_PER_PAGE;
- task_page = (struct fcoe_task_ctx_entry *)
- hba->task_ctx[task_idx];
- task = &(task_page[index]);
io_req = (struct bnx2fc_cmd *)hba->cmd_mgr->cmds[xid];
if (!io_req)
@@ -839,9 +835,6 @@ static void bnx2fc_process_unsol_compl(struct bnx2fc_rport *tgt, u16 wqe)
task_idx = xid / BNX2FC_TASKS_PER_PAGE;
index = xid % BNX2FC_TASKS_PER_PAGE;
- task_page = (struct fcoe_task_ctx_entry *)
- interface->hba->task_ctx[task_idx];
- task = &(task_page[index]);
io_req = (struct bnx2fc_cmd *)hba->cmd_mgr->cmds[xid];
if (!io_req)
goto ret_warn_rqe;
@@ -1122,7 +1115,6 @@ static void bnx2fc_process_ofld_cmpl(struct bnx2fc_hba *hba,
struct fcoe_kcqe *ofld_kcqe)
{
struct bnx2fc_rport *tgt;
- struct fcoe_port *port;
struct bnx2fc_interface *interface;
u32 conn_id;
u32 context_id;
@@ -1136,7 +1128,6 @@ static void bnx2fc_process_ofld_cmpl(struct bnx2fc_hba *hba,
}
BNX2FC_TGT_DBG(tgt, "Entered ofld compl - context_id = 0x%x\n",
ofld_kcqe->fcoe_conn_context_id);
- port = tgt->port;
interface = tgt->port->priv;
if (hba != interface->hba) {
printk(KERN_ERR PFX "ERROR:ofld_cmpl: HBA mis-match\n");
@@ -1463,10 +1454,7 @@ void bnx2fc_init_seq_cleanup_task(struct bnx2fc_cmd *seq_clnp_req,
{
struct scsi_cmnd *sc_cmd = orig_io_req->sc_cmd;
struct bnx2fc_rport *tgt = seq_clnp_req->tgt;
- struct bnx2fc_interface *interface = tgt->port->priv;
struct fcoe_bd_ctx *bd = orig_io_req->bd_tbl->bd_tbl;
- struct fcoe_task_ctx_entry *orig_task;
- struct fcoe_task_ctx_entry *task_page;
struct fcoe_ext_mul_sges_ctx *sgl;
u8 task_type = FCOE_TASK_TYPE_SEQUENCE_CLEANUP;
u8 orig_task_type;
@@ -1528,10 +1516,6 @@ void bnx2fc_init_seq_cleanup_task(struct bnx2fc_cmd *seq_clnp_req,
orig_task_idx = orig_xid / BNX2FC_TASKS_PER_PAGE;
index = orig_xid % BNX2FC_TASKS_PER_PAGE;
- task_page = (struct fcoe_task_ctx_entry *)
- interface->hba->task_ctx[orig_task_idx];
- orig_task = &(task_page[index]);
-
/* Multiple SGEs were used for this IO */
sgl = &task->rxwr_only.union_ctx.read_info.sgl_ctx.sgl;
sgl->mul_sgl.cur_sge_addr.lo = (u32)phys_addr;
--
2.7.4
Hi,
Thanks for patch.
Acked-by: Saurav Kashyap <skashyap@marvell.com>
Thanks,
~Saurav
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/3] scsi: bnx2fc: remove set but not used variables 'lport','host'
2019-08-23 13:22 ` [PATCH 2/3] scsi: bnx2fc: remove set but not used variables 'lport','host' zhengbin
@ 2019-08-26 6:03 ` Saurav Kashyap
0 siblings, 0 replies; 8+ messages in thread
From: Saurav Kashyap @ 2019-08-26 6:03 UTC (permalink / raw)
To: zhengbin, QLogic-Storage-Upstream, jejb, martin.petersen, linux-scsi
Cc: yi.zhang
On 23/08/19, 6:47 PM, "linux-scsi-owner@vger.kernel.org on behalf of zhengbin" <linux-scsi-owner@vger.kernel.org on behalf of zhengbin13@huawei.com> wrote:
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/scsi/bnx2fc/bnx2fc_io.c: In function bnx2fc_initiate_seq_cleanup:
drivers/scsi/bnx2fc/bnx2fc_io.c:932:19: warning: variable lport set but not used [-Wunused-but-set-variable]
drivers/scsi/bnx2fc/bnx2fc_io.c: In function bnx2fc_initiate_cleanup:
drivers/scsi/bnx2fc/bnx2fc_io.c:1001:19: warning: variable lport set but not used [-Wunused-but-set-variable]
drivers/scsi/bnx2fc/bnx2fc_io.c: In function bnx2fc_process_scsi_cmd_compl:
drivers/scsi/bnx2fc/bnx2fc_io.c:1882:20: warning: variable host set but not used [-Wunused-but-set-variable]
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: zhengbin <zhengbin13@huawei.com>
---
drivers/scsi/bnx2fc/bnx2fc_io.c | 7 -------
1 file changed, 7 deletions(-)
diff --git a/drivers/scsi/bnx2fc/bnx2fc_io.c b/drivers/scsi/bnx2fc/bnx2fc_io.c
index 9e50e5b..da00ca5 100644
--- a/drivers/scsi/bnx2fc/bnx2fc_io.c
+++ b/drivers/scsi/bnx2fc/bnx2fc_io.c
@@ -930,7 +930,6 @@ int bnx2fc_initiate_abts(struct bnx2fc_cmd *io_req)
int bnx2fc_initiate_seq_cleanup(struct bnx2fc_cmd *orig_io_req, u32 offset,
enum fc_rctl r_ctl)
{
- struct fc_lport *lport;
struct bnx2fc_rport *tgt = orig_io_req->tgt;
struct bnx2fc_interface *interface;
struct fcoe_port *port;
@@ -948,7 +947,6 @@ int bnx2fc_initiate_seq_cleanup(struct bnx2fc_cmd *orig_io_req, u32 offset,
port = orig_io_req->port;
interface = port->priv;
- lport = port->lport;
cb_arg = kzalloc(sizeof(struct bnx2fc_els_cb_arg), GFP_ATOMIC);
if (!cb_arg) {
@@ -999,7 +997,6 @@ int bnx2fc_initiate_seq_cleanup(struct bnx2fc_cmd *orig_io_req, u32 offset,
int bnx2fc_initiate_cleanup(struct bnx2fc_cmd *io_req)
{
- struct fc_lport *lport;
struct bnx2fc_rport *tgt = io_req->tgt;
struct bnx2fc_interface *interface;
struct fcoe_port *port;
@@ -1015,7 +1012,6 @@ int bnx2fc_initiate_cleanup(struct bnx2fc_cmd *io_req)
port = io_req->port;
interface = port->priv;
- lport = port->lport;
cleanup_io_req = bnx2fc_elstm_alloc(tgt, BNX2FC_CLEANUP);
if (!cleanup_io_req) {
@@ -1927,8 +1923,6 @@ void bnx2fc_process_scsi_cmd_compl(struct bnx2fc_cmd *io_req,
struct fcoe_fcp_rsp_payload *fcp_rsp;
struct bnx2fc_rport *tgt = io_req->tgt;
struct scsi_cmnd *sc_cmd;
- struct Scsi_Host *host;
-
/* scsi_cmd_cmpl is called with tgt lock held */
@@ -1957,7 +1951,6 @@ void bnx2fc_process_scsi_cmd_compl(struct bnx2fc_cmd *io_req,
/* parse fcp_rsp and obtain sense data from RQ if available */
bnx2fc_parse_fcp_rsp(io_req, fcp_rsp, num_rq);
- host = sc_cmd->device->host;
if (!sc_cmd->SCp.ptr) {
printk(KERN_ERR PFX "SCp.ptr is NULL\n");
return;
--
2.7.4
Hi,
Thanks for patch.
Acked-by: Saurav Kashyap <skashyap@marvell.com>
Thanks,
~Saurav
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 0/3] scsi: bnx2fc: remove some set but not used variables
2019-08-23 13:22 [PATCH 0/3] scsi: bnx2fc: remove some set but not used variables zhengbin
` (2 preceding siblings ...)
2019-08-23 13:22 ` [PATCH 3/3] scsi: bnx2fc: remove set but not used variables 'task','port','orig_task' zhengbin
@ 2019-08-29 22:55 ` Martin K. Petersen
3 siblings, 0 replies; 8+ messages in thread
From: Martin K. Petersen @ 2019-08-29 22:55 UTC (permalink / raw)
To: zhengbin
Cc: QLogic-Storage-Upstream, jejb, martin.petersen, linux-scsi, yi.zhang
zhengbin,
> zhengbin (3):
> scsi: bnx2fc: remove set but not used variable 'fh'
> scsi: bnx2fc: remove set but not used variables 'lport','host'
> scsi: bnx2fc: remove set but not used variables
> 'task','port','orig_task'
Applied to 5.4/scsi-queue, thanks.
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2019-08-29 22:57 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-23 13:22 [PATCH 0/3] scsi: bnx2fc: remove some set but not used variables zhengbin
2019-08-23 13:22 ` [PATCH 1/3] scsi: bnx2fc: remove set but not used variable 'fh' zhengbin
2019-08-26 6:03 ` Saurav Kashyap
2019-08-23 13:22 ` [PATCH 2/3] scsi: bnx2fc: remove set but not used variables 'lport','host' zhengbin
2019-08-26 6:03 ` Saurav Kashyap
2019-08-23 13:22 ` [PATCH 3/3] scsi: bnx2fc: remove set but not used variables 'task','port','orig_task' zhengbin
2019-08-26 6:03 ` Saurav Kashyap
2019-08-29 22:55 ` [PATCH 0/3] scsi: bnx2fc: remove some set but not used variables Martin K. Petersen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).