[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.
Signed-off-by: Bin Meng bmeng.cn@gmail.com Reviewed-by: Vladimir Oltean vladimir.oltean@nxp.com Reviewed-by: Ramon Fried rfried.dev@gmail.com
---
Changes in v2: - rebase on u-boot-net/next
net/dsa-uclass.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/dsa-uclass.c b/net/dsa-uclass.c index 7a465b1099..606b1539a7 100644 --- a/net/dsa-uclass.c +++ b/net/dsa-uclass.c @@ -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; }

priv->promisc is used as the parameter of the set_promisc() call which accepts a bool type instead of char.
Signed-off-by: Bin Meng bmeng.cn@gmail.com Reviewed-by: Vladimir Oltean vladimir.oltean@nxp.com Reviewed-by: Ramon Fried rfried.dev@gmail.com ---
(no changes since v1)
drivers/net/fec_mxc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/fec_mxc.h b/drivers/net/fec_mxc.h index 1c0d0e5b8f..48faa33d66 100644 --- a/drivers/net/fec_mxc.h +++ b/drivers/net/fec_mxc.h @@ -272,7 +272,7 @@ struct fec_priv { struct clk clk_ref; struct clk clk_ptp; u32 clk_rate; - char promisc; + bool promisc; };
/**

redundant_init() is only called in the tsec driver. Make it static.
Signed-off-by: Bin Meng bmeng.cn@gmail.com Reviewed-by: Vladimir Oltean vladimir.oltean@nxp.com Reviewed-by: Ramon Fried rfried.dev@gmail.com
---
(no changes since v1)
drivers/net/tsec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/tsec.c b/drivers/net/tsec.c index 4354753cab..3dd00a4a40 100644 --- a/drivers/net/tsec.c +++ b/drivers/net/tsec.c @@ -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;
participants (1)
-
Bin Meng