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-prev] [day] [month] [year] [list]
Date:   Wed, 19 Jan 2022 08:26:43 +0000
From:   Martin Habets <habetsm.xilinx@...il.com>
To:     cgel.zte@...il.com
Cc:     ecree.xilinx@...il.com, davem@...emloft.net, kuba@...nel.org,
        netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
        Minghao Chi <chi.minghao@....com.cn>,
        Zeal Robot <zealci@....com.cn>
Subject: Re: [PATCH] sfc/ef10: remove unneeded rc variable

On Tue, Jan 18, 2022 at 07:56:16AM +0000, cgel.zte@...il.com wrote:
> From: Minghao Chi <chi.minghao@....com.cn>
> 
> Return value from efx_mcdi_rpc() directly instead
> of taking this in another redundant variable.
> 
> Reported-by: Zeal Robot <zealci@....com.cn>
> Signed-off-by: Minghao Chi <chi.minghao@....com.cn>
> Signed-off-by: CGEL ZTE <cgel.zte@...il.com>
> ---
>  drivers/net/ethernet/sfc/ef10.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/drivers/net/ethernet/sfc/ef10.c b/drivers/net/ethernet/sfc/ef10.c
> index cf366ed2557c..991758292b7c 100644
> --- a/drivers/net/ethernet/sfc/ef10.c
> +++ b/drivers/net/ethernet/sfc/ef10.c
> @@ -3627,7 +3627,6 @@ static int efx_ef10_rx_disable_timestamping(struct efx_channel *channel,
>  					    bool temp)
>  {
>  	MCDI_DECLARE_BUF(inbuf, MC_CMD_PTP_IN_TIME_EVENT_UNSUBSCRIBE_LEN);
> -	int rc;
>  
>  	if (channel->sync_events_state == SYNC_EVENTS_DISABLED ||
>  	    (temp && channel->sync_events_state == SYNC_EVENTS_QUIESCENT))
> @@ -3646,10 +3645,8 @@ static int efx_ef10_rx_disable_timestamping(struct efx_channel *channel,
>  	MCDI_SET_DWORD(inbuf, PTP_IN_TIME_EVENT_UNSUBSCRIBE_QUEUE,
>  		       channel->channel);
>  
> -	rc = efx_mcdi_rpc(channel->efx, MC_CMD_PTP,
> +	return efx_mcdi_rpc(channel->efx, MC_CMD_PTP,
>  			  inbuf, sizeof(inbuf), NULL, 0, NULL);

Looks good, but indent the continuation line to align with the ( above
it.

This sort of cleanup is for net-next, which is closed at the moment.
See https://www.kernel.org/doc/Documentation/networking/netdev-FAQ.txt

Martin

> -
> -	return rc;
>  }
>  
>  static int efx_ef10_ptp_set_ts_sync_events(struct efx_nic *efx, bool en,
> -- 
> 2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ