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

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>

authored by

YueHaibing and committed by
David S. Miller
ca7e3edc 636ef28d

+1 -7
+1 -7
net/smc/smc_llc.c
··· 750 750 enum smc_lgr_type lgr_new_t) 751 751 { 752 752 struct smc_link_group *lgr = link->lgr; 753 - struct smc_llc_msg_del_link *del_llc; 754 753 struct smc_llc_qentry *qentry = NULL; 755 754 int rc = 0; 756 755 ··· 763 764 } 764 765 if (qentry->msg.raw.hdr.common.type != SMC_LLC_CONFIRM_LINK) { 765 766 /* received DELETE_LINK instead */ 766 - del_llc = &qentry->msg.delete_link; 767 767 qentry->msg.raw.hdr.flags |= SMC_LLC_FLAG_RESP; 768 768 smc_llc_send_message(link, &qentry->msg); 769 769 smc_llc_flow_qentry_del(&lgr->llc_flow_lcl); ··· 1306 1308 * enqueued DELETE_LINK request (forward it) 1307 1309 */ 1308 1310 if (!smc_llc_send_message(lnk, &qentry->msg)) { 1309 - struct smc_llc_msg_del_link *del_llc_resp; 1310 1311 struct smc_llc_qentry *qentry2; 1311 1312 1312 1313 qentry2 = smc_llc_wait(lgr, lnk, SMC_LLC_WAIT_TIME, 1313 1314 SMC_LLC_DELETE_LINK); 1314 - if (!qentry2) { 1315 - } else { 1316 - del_llc_resp = &qentry2->msg.delete_link; 1315 + if (qentry2) 1317 1316 smc_llc_flow_qentry_del(&lgr->llc_flow_lcl); 1318 - } 1319 1317 } 1320 1318 } 1321 1319 smcr_link_clear(lnk_del, true);