aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorVladimir Oltean2021-09-18 14:49:56 +0300
committerRamon Fried2021-09-28 18:50:56 +0300
commit5ecdf0a5a42ae3b2d04cdf0c2ad6314670839037 (patch)
tree11bd8ed95e97b804b79ba1ece0caa6e5f0e414c5 /net
parent5cc283b781398a02c8a7c919cf4d5dbb5fa8add2 (diff)
net: dsa: remove unused variables
"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> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Diffstat (limited to 'net')
-rw-r--r--net/dsa-uclass.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/net/dsa-uclass.c b/net/dsa-uclass.c
index d1c6c78acd6..8a2918816e3 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;