From: Martin Habets <habetsm.xilinx@gmail•com>
To: cgel.zte@gmail•com
Cc: ecree.xilinx@gmail•com, davem@davemloft•net, kuba@kernel•org,
netdev@vger•kernel.org, linux-kernel@vger•kernel.org,
Minghao Chi <chi.minghao@zte•com.cn>,
Zeal Robot <zealci@zte•com.cn>
Subject: Re: [PATCH] sfc/ef10: remove unneeded rc variable
Date: Wed, 19 Jan 2022 08:26:43 +0000 [thread overview]
Message-ID: <20220119082643.mod7g7ikoviks22r@gmail.com> (raw)
In-Reply-To: <20220118075616.925855-1-chi.minghao@zte.com.cn>
On Tue, Jan 18, 2022 at 07:56:16AM +0000, cgel.zte@gmail•com wrote:
> From: Minghao Chi <chi.minghao@zte•com.cn>
>
> Return value from efx_mcdi_rpc() directly instead
> of taking this in another redundant variable.
>
> Reported-by: Zeal Robot <zealci@zte•com.cn>
> Signed-off-by: Minghao Chi <chi.minghao@zte•com.cn>
> Signed-off-by: CGEL ZTE <cgel.zte@gmail•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
prev parent reply other threads:[~2022-01-19 8:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-18 7:56 [PATCH] sfc/ef10: remove unneeded rc variable cgel.zte
2022-01-19 8:26 ` Martin Habets [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220119082643.mod7g7ikoviks22r@gmail.com \
--to=habetsm.xilinx@gmail$(echo .)com \
--cc=cgel.zte@gmail$(echo .)com \
--cc=chi.minghao@zte$(echo .)com.cn \
--cc=davem@davemloft$(echo .)net \
--cc=ecree.xilinx@gmail$(echo .)com \
--cc=kuba@kernel$(echo .)org \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=netdev@vger$(echo .)kernel.org \
--cc=zealci@zte$(echo .)com.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox