diff mbox series

net/smc: Simplify the return expression

Message ID 20210323020509.1499-1-zuoqilin1@163.com (mailing list archive)
State Changes Requested
Delegated to: Netdev Maintainers
Headers show
Series net/smc: Simplify the return expression | expand

Checks

Context Check Description
netdev/cover_letter success Link
netdev/fixes_present success Link
netdev/patch_count success Link
netdev/tree_selection success Guessed tree name to be net-next
netdev/subject_prefix warning Target tree name not specified in the subject
netdev/cc_maintainers warning 1 maintainers not CCed: kgraul@linux.ibm.com
netdev/source_inline success Was 0 now: 0
netdev/verify_signedoff success Link
netdev/module_param success Was 0 now: 0
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/verify_fixes success Link
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 19 lines checked
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/header_inline success Link

Commit Message

zuoqilin1@163.com March 23, 2021, 2:05 a.m. UTC
From: zuoqilin <zuoqilin@yulong.com>

Simplify the return expression of smc_ism_signal_shutdown().

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

Comments

Karsten Graul March 23, 2021, 4:42 p.m. UTC | #1
On 23/03/2021 03:05, zuoqilin1@163.com wrote:
> From: zuoqilin <zuoqilin@yulong.com>
> 
> Simplify the return expression of smc_ism_signal_shutdown().
> 
> Signed-off-by: zuoqilin <zuoqilin@yulong.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);

I agree with the code change but after I applied your patch the 3 lines above
are no longer correctly indented, please correct that and resend the patch.
Thanks.

> -	return rc;
>  }
>  
>  /* worker for SMC-D events */
>
diff mbox series

Patch

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 */