Skip to contentSkip to conversation

net: dsa: Use true instead of 1 in the set_promisc() call

PATCH New Bin Meng 1 participant 3 messages Nov 1, 2021

Subsystems (2)
lore
Share & tools
lore

Bin Meng

author
#0 lore raw

PATCH v2 1/3 net: dsa: Use true instead of 1 in the set_promisc() call

set_promisc() call accepts the parameter of a bool type. Make it clear by using true instead of 1.

---

Changes in v2:
- rebase on u-boot-net/next

 net/dsa-uclass.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/dsa-uclass.c +1 -1
index 7a465b1099..606b1539a7 100644
@@ -270,7 +270,7 @@ static void dsa_port_set_hwaddr(struct udevice *pdev, struct udevice *master)
 		struct eth_ops *eth_ops = eth_get_ops(master);
 
 		if (eth_ops->set_promisc)
-			eth_ops->set_promisc(master, 1);
+			eth_ops->set_promisc(master, true);
 
 		return;
 	}
Signature · 1 line
2.25.1
author
#1 lore raw

PATCH v2 2/3 net: fec_mxc: Declare 'promisc' as bool

priv->promisc is used as the parameter of the set_promisc() call which accepts a bool type instead of char.

---

(no changes since v1)

 drivers/net/fec_mxc.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/fec_mxc.h +1 -1
index 1c0d0e5b8f..48faa33d66 100644
@@ -272,7 +272,7 @@ struct fec_priv {
 	struct clk clk_ref;
 	struct clk clk_ptp;
 	u32 clk_rate;
-	char promisc;
+	bool promisc;
 };
 
 /**
Signature · 1 line
2.25.1
author
#2 lore raw

PATCH v2 3/3 net: tsec: Make redundant_init() static

In reply to Bin Meng

redundant_init() is only called in the tsec driver. Make it static.

---

(no changes since v1)

 drivers/net/tsec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/tsec.c +1 -1
index 4354753cab..3dd00a4a40 100644
@@ -443,7 +443,7 @@ static void tsec_halt(struct udevice *dev)
  * of the eTSEC port initialization sequence,
  * the eTSEC Rx logic may not be properly initialized.
  */
-void redundant_init(struct tsec_private *priv)
+static void redundant_init(struct tsec_private *priv)
 {
 	struct tsec __iomem *regs = priv->regs;
 	uint t, count = 0;
Signature · 1 line
2.25.1