linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Shai Malin <smalin@marvell.com>
To: Jason Wang <wangborong@cdjrlc.com>
Cc: Ariel Elior <aelior@marvell.com>,
	GR-everest-linux-l2 <GR-everest-linux-l2@marvell.com>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"kuba@kernel.org" <kuba@kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH] net: qed: remove unneeded return variables
Date: Mon, 26 Jul 2021 12:21:09 +0000	[thread overview]
Message-ID: <SJ0PR18MB38825F95FA58CF72393D0951CCE89@SJ0PR18MB3882.namprd18.prod.outlook.com> (raw)

On Sunday, July 25, 2021 6:14 PM, Jason Wang <wangborong@cdjrlc.com> wrote:
> Some return variables are never changed until function returned.
> These variables are unneeded for their functions. Therefore, the unneeded
> return variables can be removed safely by returning their initial values.
> 
> Signed-off-by: Jason Wang <wangborong@cdjrlc.com>
> ---
>  drivers/net/ethernet/qlogic/qed/qed_dcbx.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/net/ethernet/qlogic/qed/qed_dcbx.c
> b/drivers/net/ethernet/qlogic/qed/qed_dcbx.c
> index e81dd34a3cac..dc93ddea8906 100644
> --- a/drivers/net/ethernet/qlogic/qed/qed_dcbx.c
> +++ b/drivers/net/ethernet/qlogic/qed/qed_dcbx.c
> @@ -741,7 +741,6 @@ static int
>  qed_dcbx_read_local_lldp_mib(struct qed_hwfn *p_hwfn, struct qed_ptt
> *p_ptt)  {
>  	struct qed_dcbx_mib_meta_data data;
> -	int rc = 0;
> 
>  	memset(&data, 0, sizeof(data));
>  	data.addr = p_hwfn->mcp_info->port_addr + offsetof(struct
> public_port, @@ -750,7 +749,7 @@ qed_dcbx_read_local_lldp_mib(struct
> qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
>  	data.size = sizeof(struct lldp_config_params_s);
>  	qed_memcpy_from(p_hwfn, p_ptt, data.lldp_local, data.addr,
> data.size);
> 
> -	return rc;
> +	return 0;
>  }
> 
>  static int
> @@ -810,7 +809,6 @@ static int
>  qed_dcbx_read_local_mib(struct qed_hwfn *p_hwfn, struct qed_ptt
> *p_ptt)  {
>  	struct qed_dcbx_mib_meta_data data;
> -	int rc = 0;
> 
>  	memset(&data, 0, sizeof(data));
>  	data.addr = p_hwfn->mcp_info->port_addr + @@ -819,7 +817,7 @@
> qed_dcbx_read_local_mib(struct qed_hwfn *p_hwfn, struct qed_ptt
> *p_ptt)
>  	data.size = sizeof(struct dcbx_local_params);
>  	qed_memcpy_from(p_hwfn, p_ptt, data.local_admin, data.addr,
> data.size);
> 
> -	return rc;
> +	return 0;
>  }
> 
>  static int qed_dcbx_read_mib(struct qed_hwfn *p_hwfn,
> --
> 2.32.0

Thanks!

Acked-by: Shai Malin <smalin@marvell.com>


             reply	other threads:[~2021-07-26 12:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-26 12:21 Shai Malin [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-07-25 15:13 [PATCH] net: qed: remove unneeded return variables Jason Wang
2021-07-27 11:00 ` patchwork-bot+netdevbpf

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=SJ0PR18MB38825F95FA58CF72393D0951CCE89@SJ0PR18MB3882.namprd18.prod.outlook.com \
    --to=smalin@marvell.com \
    --cc=GR-everest-linux-l2@marvell.com \
    --cc=aelior@marvell.com \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=wangborong@cdjrlc.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).