Commit ca7e3edc authored by YueHaibing's avatar YueHaibing Committed by David S. Miller

net/smc: remove set but not used variables 'del_llc, del_llc_resp'

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

net/smc/smc_llc.c: In function 'smc_llc_cli_conf_link':
net/smc/smc_llc.c:753:31: warning:
 variable 'del_llc' set but not used [-Wunused-but-set-variable]
  struct smc_llc_msg_del_link *del_llc;
                               ^
net/smc/smc_llc.c: In function 'smc_llc_process_srv_delete_link':
net/smc/smc_llc.c:1311:33: warning:
 variable 'del_llc_resp' set but not used [-Wunused-but-set-variable]
    struct smc_llc_msg_del_link *del_llc_resp;
                                 ^
Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
Signed-off-by: default avatarKarsten Graul <kgraul@linux.ibm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 636ef28d
...@@ -750,7 +750,6 @@ static int smc_llc_cli_conf_link(struct smc_link *link, ...@@ -750,7 +750,6 @@ static int smc_llc_cli_conf_link(struct smc_link *link,
enum smc_lgr_type lgr_new_t) enum smc_lgr_type lgr_new_t)
{ {
struct smc_link_group *lgr = link->lgr; struct smc_link_group *lgr = link->lgr;
struct smc_llc_msg_del_link *del_llc;
struct smc_llc_qentry *qentry = NULL; struct smc_llc_qentry *qentry = NULL;
int rc = 0; int rc = 0;
...@@ -764,7 +763,6 @@ static int smc_llc_cli_conf_link(struct smc_link *link, ...@@ -764,7 +763,6 @@ static int smc_llc_cli_conf_link(struct smc_link *link,
} }
if (qentry->msg.raw.hdr.common.type != SMC_LLC_CONFIRM_LINK) { if (qentry->msg.raw.hdr.common.type != SMC_LLC_CONFIRM_LINK) {
/* received DELETE_LINK instead */ /* received DELETE_LINK instead */
del_llc = &qentry->msg.delete_link;
qentry->msg.raw.hdr.flags |= SMC_LLC_FLAG_RESP; qentry->msg.raw.hdr.flags |= SMC_LLC_FLAG_RESP;
smc_llc_send_message(link, &qentry->msg); smc_llc_send_message(link, &qentry->msg);
smc_llc_flow_qentry_del(&lgr->llc_flow_lcl); smc_llc_flow_qentry_del(&lgr->llc_flow_lcl);
...@@ -1308,18 +1306,14 @@ static void smc_llc_process_srv_delete_link(struct smc_link_group *lgr) ...@@ -1308,18 +1306,14 @@ static void smc_llc_process_srv_delete_link(struct smc_link_group *lgr)
* enqueued DELETE_LINK request (forward it) * enqueued DELETE_LINK request (forward it)
*/ */
if (!smc_llc_send_message(lnk, &qentry->msg)) { if (!smc_llc_send_message(lnk, &qentry->msg)) {
struct smc_llc_msg_del_link *del_llc_resp;
struct smc_llc_qentry *qentry2; struct smc_llc_qentry *qentry2;
qentry2 = smc_llc_wait(lgr, lnk, SMC_LLC_WAIT_TIME, qentry2 = smc_llc_wait(lgr, lnk, SMC_LLC_WAIT_TIME,
SMC_LLC_DELETE_LINK); SMC_LLC_DELETE_LINK);
if (!qentry2) { if (qentry2)
} else {
del_llc_resp = &qentry2->msg.delete_link;
smc_llc_flow_qentry_del(&lgr->llc_flow_lcl); smc_llc_flow_qentry_del(&lgr->llc_flow_lcl);
} }
} }
}
smcr_link_clear(lnk_del, true); smcr_link_clear(lnk_del, true);
active_links = smc_llc_active_link_count(lgr); active_links = smc_llc_active_link_count(lgr);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment