From: Ramon Fried <rfried.dev@gmail.com>
To: Vladimir Oltean <vladimir.oltean@nxp.com>
Cc: U-Boot Mailing List <u-boot@lists.denx.de>,
Joe Hershberger <joe.hershberger@ni.com>,
Tim Harvey <tharvey@gateworks.com>,
Michael Walle <michael@walle.cc>
Subject: Re: [PATCH 2/2] net: dsa: remove unused variables
Date: Tue, 28 Sep 2021 16:28:02 +0300 [thread overview]
Message-ID: <CAGi-RU+QaiKtjUzvpzB3FnLWJCMXELtt=jsc8OKFCnTzymr-sg@mail.gmail.com> (raw)
In-Reply-To: <20210918114956.1064294-3-vladimir.oltean@nxp.com>
On Sat, Sep 18, 2021 at 2:50 PM Vladimir Oltean <vladimir.oltean@nxp.com> wrote:
>
> "dev" and "dsa_pdata" are unused inside dsa_port_of_to_pdata.
>
> "dsa_priv" is unused inside dsa_port_probe.
>
> Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
> ---
> net/dsa-uclass.c | 14 +-------------
> 1 file changed, 1 insertion(+), 13 deletions(-)
>
> diff --git a/net/dsa-uclass.c b/net/dsa-uclass.c
> index d1c6c78acd6c..8a2918816e30 100644
> --- a/net/dsa-uclass.c
> +++ b/net/dsa-uclass.c
> @@ -199,9 +199,7 @@ static int dsa_port_free_pkt(struct udevice *pdev, uchar *packet, int length)
> static int dsa_port_of_to_pdata(struct udevice *pdev)
> {
> struct dsa_port_pdata *port_pdata;
> - struct dsa_pdata *dsa_pdata;
> struct eth_pdata *eth_pdata;
> - struct udevice *dev;
> const char *label;
> u32 index;
> int err;
> @@ -213,9 +211,6 @@ static int dsa_port_of_to_pdata(struct udevice *pdev)
> if (err)
> return err;
>
> - dev = dev_get_parent(pdev);
> - dsa_pdata = dev_get_uclass_plat(dev);
> -
> port_pdata = dev_get_parent_plat(pdev);
> port_pdata->index = index;
>
> @@ -272,12 +267,10 @@ static int dsa_port_probe(struct udevice *pdev)
> struct udevice *dev = dev_get_parent(pdev);
> struct dsa_ops *ops = dsa_get_ops(dev);
> struct dsa_port_pdata *port_pdata;
> - struct dsa_priv *dsa_priv;
> struct udevice *master;
> int err;
>
> port_pdata = dev_get_parent_plat(pdev);
> - dsa_priv = dev_get_uclass_priv(dev);
>
> port_pdata->phy = dm_eth_phy_connect(pdev);
> if (!port_pdata->phy)
> @@ -312,12 +305,7 @@ static int dsa_port_probe(struct udevice *pdev)
>
> static int dsa_port_remove(struct udevice *pdev)
> {
> - struct udevice *dev = dev_get_parent(pdev);
> - struct dsa_port_pdata *port_pdata;
> - struct dsa_priv *dsa_priv;
> -
> - port_pdata = dev_get_parent_plat(pdev);
> - dsa_priv = dev_get_uclass_priv(dev);
> + struct dsa_port_pdata *port_pdata = dev_get_parent_plat(pdev);
>
> port_pdata->phy = NULL;
>
> --
> 2.25.1
>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
prev parent reply other threads:[~2021-09-28 13:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-18 11:49 [PATCH 0/2] DSA cleanups Vladimir Oltean
2021-09-18 11:49 ` [PATCH 1/2] net: dsa: pass CPU port fixed PHY to .port_disable Vladimir Oltean
2021-09-28 13:27 ` Ramon Fried
2021-09-28 15:10 ` Tim Harvey
2021-09-18 11:49 ` [PATCH 2/2] net: dsa: remove unused variables Vladimir Oltean
2021-09-28 13:28 ` Ramon Fried [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='CAGi-RU+QaiKtjUzvpzB3FnLWJCMXELtt=jsc8OKFCnTzymr-sg@mail.gmail.com' \
--to=rfried.dev@gmail.com \
--cc=joe.hershberger@ni.com \
--cc=michael@walle.cc \
--cc=tharvey@gateworks.com \
--cc=u-boot@lists.denx.de \
--cc=vladimir.oltean@nxp.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).