lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210323020509.1499-1-zuoqilin1@163.com>
Date:   Tue, 23 Mar 2021 10:05:09 +0800
From:   zuoqilin1@....com
To:     davem@...emloft.net, kuba@...nel.org
Cc:     linux-s390@...r.kernel.org, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org, zuoqilin <zuoqilin@...ong.com>
Subject: [PATCH] net/smc: Simplify the return expression

From: zuoqilin <zuoqilin@...ong.com>

Simplify the return expression of smc_ism_signal_shutdown().

Signed-off-by: zuoqilin <zuoqilin@...ong.com>
---
 net/smc/smc_ism.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/net/smc/smc_ism.c b/net/smc/smc_ism.c
index 9c6e958..c3558cc 100644
--- a/net/smc/smc_ism.c
+++ b/net/smc/smc_ism.c
@@ -344,7 +344,6 @@ static void smcd_handle_sw_event(struct smc_ism_event_work *wrk)
 
 int smc_ism_signal_shutdown(struct smc_link_group *lgr)
 {
-	int rc;
 	union smcd_sw_event_info ev_info;
 
 	if (lgr->peer_shutdown)
@@ -353,11 +352,10 @@ int smc_ism_signal_shutdown(struct smc_link_group *lgr)
 	memcpy(ev_info.uid, lgr->id, SMC_LGR_ID_SIZE);
 	ev_info.vlan_id = lgr->vlan_id;
 	ev_info.code = ISM_EVENT_REQUEST;
-	rc = lgr->smcd->ops->signal_event(lgr->smcd, lgr->peer_gid,
+	return lgr->smcd->ops->signal_event(lgr->smcd, lgr->peer_gid,
 					  ISM_EVENT_REQUEST_IR,
 					  ISM_EVENT_CODE_SHUTDOWN,
 					  ev_info.info);
-	return rc;
 }
 
 /* worker for SMC-D events */
-- 
1.9.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ