Skip to content

Commit ca7e3ed

Browse files
YueHaibingdavem330
authored andcommitted
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: YueHaibing <yuehaibing@huawei.com> Signed-off-by: Karsten Graul <kgraul@linux.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 636ef28 commit ca7e3ed

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

‎net/smc/smc_llc.c‎

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -750,7 +750,6 @@ static int smc_llc_cli_conf_link(struct smc_link *link,
750750
enum smc_lgr_type lgr_new_t)
751751
{
752752
struct smc_link_group *lgr = link->lgr;
753-
struct smc_llc_msg_del_link *del_llc;
754753
struct smc_llc_qentry *qentry = NULL;
755754
int rc = 0;
756755

@@ -764,7 +763,6 @@ static int smc_llc_cli_conf_link(struct smc_link *link,
764763
}
765764
if (qentry->msg.raw.hdr.common.type != SMC_LLC_CONFIRM_LINK) {
766765
/* received DELETE_LINK instead */
767-
del_llc = &qentry->msg.delete_link;
768766
qentry->msg.raw.hdr.flags |= SMC_LLC_FLAG_RESP;
769767
smc_llc_send_message(link, &qentry->msg);
770768
smc_llc_flow_qentry_del(&lgr->llc_flow_lcl);
@@ -1308,16 +1306,12 @@ static void smc_llc_process_srv_delete_link(struct smc_link_group *lgr)
13081306
* enqueued DELETE_LINK request (forward it)
13091307
*/
13101308
if (!smc_llc_send_message(lnk, &qentry->msg)) {
1311-
struct smc_llc_msg_del_link *del_llc_resp;
13121309
struct smc_llc_qentry *qentry2;
13131310

13141311
qentry2 = smc_llc_wait(lgr, lnk, SMC_LLC_WAIT_TIME,
13151312
SMC_LLC_DELETE_LINK);
1316-
if (!qentry2) {
1317-
} else {
1318-
del_llc_resp = &qentry2->msg.delete_link;
1313+
if (qentry2)
13191314
smc_llc_flow_qentry_del(&lgr->llc_flow_lcl);
1320-
}
13211315
}
13221316
}
13231317
smcr_link_clear(lnk_del, true);

0 commit comments

Comments
 (0)