net: dsa: Use true instead of 1 in the set_promisc() call
Subsystems (2)
PATCH 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.
---
net/dsa-uclass.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/dsa-uclass.c +1 -1
@@ -282,7 +282,7 @@ static int dsa_port_probe(struct udevice *pdev)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 0 ; }
Signature · 1 line
2.25.1
PATCH 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.
---
drivers/net/fec_mxc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/fec_mxc.h +1 -1
@@ -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
Re: [PATCH 2/3] net: fec_mxc: Declare 'promisc' as bool
Quoted 25 lines · Bin Meng
priv->promiscis used as the parameter of theset_promisc()call which accepts a bool type instead of char.Signed-off-by Bin Meng <[email protected]>---
drivers/net/fec_mxc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/net/fec_mxc.h +1
-1@@ -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
Ramon Fried
Reviewed-byRe: [PATCH 2/3] net: fec_mxc: Declare 'promisc' as bool
Quoted 23 lines · Vladimir Oltean
Quoted 21 lines · Bin Meng
priv->promiscis used as the parameter of theset_promisc()call which accepts a bool type instead of char.Signed-off-by Bin Meng <[email protected]>---
drivers/net/fec_mxc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/net/fec_mxc.h +1
-1@@ -272,7 +272,7 @@ struct fec_priv {struct clk clk_ref;struct clk clk_ptp;u32 clk_rate; -char promisc; +bool promisc; };
Quoted 6 lines
Quoted 4 lines
drivers/net/fec_mxc.h +0
-1/** -- 2.25.1
Reviewed-by Vladimir Oltean <[email protected]>
PATCH 3/3 net: tsec: Make redundant_init() static
In reply to Bin Mengredundant_init() is only called in the tsec driver. Make it static.
---
drivers/net/tsec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/tsec.c +1 -1
@@ -432,7 +432,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
Re: [PATCH 3/3] net: tsec: Make redundant_init() static
Quoted 24 lines · Bin Meng
redundant_init()is only called in the tsec driver. Make it static.Signed-off-by Bin Meng <[email protected]>---
drivers/net/tsec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/net/tsec.c +1
-1@@ -432,7 +432,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
About this whole redundant_init thing... the Linux gianfar driver doesn't do it, and it was added by this commit:
commit aada81de703e0fb26ae1a8dc8fc8d6a7a37fa3c9
Author: chenhui zhao <[email protected]> Date: Mon Oct 3 08:38:50 2011 -0500
powerpc/mpc8548: Add workaround for erratum NMG_eTSEC129
Erratum NMG_eTSEC129 (eTSEC86 in MPC8548 document) applies to some early verion silicons. This workaround detects if the eTSEC Rx logic is properly initialized, and reinitialize the eTSEC Rx logic.
Internally I could find a single reference to the eTSEC 86 erratum ("eTSEC receivers may not be properly initialized"), dated 08/2007, and it says it was fixed in MPC8548 silicon version 2.1.
On the other hand it consumes 90 lines of code (10%) of the tsec driver. It would be nice if we could just remove it, I am not sure if anyone would even notice.
Priyanka?
Re: [PATCH 3/3] net: tsec: Make redundant_init() static
In reply to Bin MengQuoted 23 lines · Bin Meng
redundant_init()is only called in the tsec driver. Make it static.Signed-off-by Bin Meng <[email protected]>---
drivers/net/tsec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/net/tsec.c +1
-2@@ -432,7 +432,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 ; --
Quoted 2 lines
2.25.1
Quoted 25 lines · Bin Meng
set_promisc()call accepts the parameter of a bool type. Make it clear by using true instead of 1.Signed-off-by Bin Meng <[email protected]>---
net/dsa-uclass.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)net/dsa-uclass.c +1
-1@@ -282,7 +282,7 @@ static int dsa_port_probe(struct udevice *pdev)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 0 ; }Signature · 1 line
2.25.1
Ramon Fried
Reviewed-byQuoted 22 lines · Vladimir Oltean
Quoted 20 lines · Bin Meng
set_promisc()call accepts the parameter of a bool type. Make it clear by using true instead of 1.Signed-off-by Bin Meng <[email protected]>---
net/dsa-uclass.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)net/dsa-uclass.c +1
-1@@ -282,7 +282,7 @@ static int dsa_port_probe(struct udevice *pdev)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);
Quoted 7 lines
Quoted 5 lines
net/dsa-uclass.c +0
-1return 0 ; } --2.25.1
Reviewed-by Vladimir Oltean <[email protected]>
Quoted 24 lines · Ramon Fried
Quoted 22 lines · Vladimir Oltean
Quoted 20 lines · Bin Meng
set_promisc()call accepts the parameter of a bool type. Make it clear by using true instead of 1.Signed-off-by Bin Meng <[email protected]>---
net/dsa-uclass.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)net/dsa-uclass.c +1
-1@@ -282,7 +282,7 @@ static int dsa_port_probe(struct udevice *pdev)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);
Quoted 8 lines
Quoted 7 lines
Quoted 5 lines
net/dsa-uclass.c +0
-1return 0 ; } --2.25.1
Reviewed-by Vladimir Oltean <[email protected]>Reviewed-by Ramon Fried <[email protected]>
Ping for apply?
Quoted 33 lines · Bin Meng
Quoted 31 lines · Ramon Fried
Quoted 29 lines · Vladimir Oltean
Quoted 23 lines · Bin Meng
set_promisc()call accepts the parameter of a bool type. Make it clear by using true instead of 1.Signed-off-by Bin Meng <[email protected]>---
net/dsa-uclass.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)net/dsa-uclass.c +1
-2@@ -282,7 +282,7 @@ static int dsa_port_probe(struct udevice *pdev)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 0 ; } --Quoted 2 lines
2.25.1
Reviewed-by Vladimir Oltean <[email protected]>
Quoted 3 lines
Quoted 1 line
Reviewed-by Ramon Fried <[email protected]>Ping for apply?
I'll get to the patches today.
thanks for waking me up :)
Bin, patches don't apply cleanly. can you rebase ?
Quoted 40 lines · Ramon Fried
Quoted 33 lines · Bin Meng
Quoted 31 lines · Ramon Fried
Quoted 29 lines · Vladimir Oltean
Quoted 23 lines · Bin Meng
set_promisc()call accepts the parameter of a bool type. Make it clear by using true instead of 1.Signed-off-by Bin Meng <[email protected]>---
net/dsa-uclass.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)net/dsa-uclass.c +1
-2@@ -282,7 +282,7 @@ static int dsa_port_probe(struct udevice *pdev)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 0 ; } --Quoted 2 lines
2.25.1
Reviewed-by Vladimir Oltean <[email protected]>Quoted 3 lines
Quoted 1 line
Reviewed-by Ramon Fried <[email protected]>Ping for apply?
I'll get to the patches today.
thanks for waking me up :)
Quoted 43 lines · Ramon Fried
Bin, patches don't apply cleanly. can you rebase ?
Quoted 40 lines · Ramon Fried
Quoted 33 lines · Bin Meng
Quoted 31 lines · Ramon Fried
Quoted 29 lines · Vladimir Oltean
Quoted 23 lines · Bin Meng
set_promisc()call accepts the parameter of a bool type. Make it clear by using true instead of 1.Signed-off-by Bin Meng <[email protected]>---
net/dsa-uclass.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)net/dsa-uclass.c +1
-2@@ -282,7 +282,7 @@ static int dsa_port_probe(struct udevice *pdev)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 0 ; } --Quoted 2 lines
2.25.1
Reviewed-by Vladimir Oltean <[email protected]>Quoted 3 lines
Quoted 1 line
Reviewed-by Ramon Fried <[email protected]>Ping for apply?
I'll get to the patches today.
thanks for waking me up :)
Why don't you apply patches immediately after reviewing them?
Quoted 40 lines · Vladimir Oltean
Quoted 38 lines · Ramon Fried
Bin, patches don't apply cleanly. can you rebase ?
Quoted 35 lines · Ramon Fried
Quoted 33 lines · Bin Meng
Quoted 31 lines · Ramon Fried
Quoted 29 lines · Vladimir Oltean
Quoted 23 lines · Bin Meng
set_promisc()call accepts the parameter of a bool type. Make it clear by using true instead of 1.Signed-off-by Bin Meng <[email protected]>---
net/dsa-uclass.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)net/dsa-uclass.c +1
-2@@ -282,7 +282,7 @@ static int dsa_port_probe(struct udevice *pdev)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 0 ; } --Quoted 2 lines
2.25.1
Reviewed-by Vladimir Oltean <[email protected]>
Quoted 7 lines
Quoted 5 lines
Quoted 5 lines
Quoted 3 lines
Quoted 1 line
Reviewed-by Ramon Fried <[email protected]>Ping for apply?
I'll get to the patches today.
thanks for waking me up :)Why don't you apply patches immediately after reviewing them?
It wouldn't make a difference. you were all working on the same file in code, If I would have applied bin's patches before yours, then you would need to rebase.
simple as that. Also the time when I'm applying and when I'm reviewing is also meaningless because this problem would occur anyway.
Hi Ramon,
Quoted 49 lines · Ramon Fried
Quoted 46 lines · Vladimir Oltean
Quoted 43 lines · Ramon Fried
Bin, patches don't apply cleanly. can you rebase ?
Quoted 40 lines · Ramon Fried
Quoted 33 lines · Bin Meng
Quoted 31 lines · Ramon Fried
Quoted 29 lines · Vladimir Oltean
Quoted 23 lines · Bin Meng
set_promisc()call accepts the parameter of a bool type. Make it clear by using true instead of 1.Signed-off-by Bin Meng <[email protected]>---
net/dsa-uclass.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)net/dsa-uclass.c +1
-2@@ -282,7 +282,7 @@ static int dsa_port_probe(struct udevice *pdev)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 0 ; } --Quoted 2 lines
2.25.1
Reviewed-by Vladimir Oltean <[email protected]>Quoted 3 lines
Quoted 1 line
Reviewed-by Ramon Fried <[email protected]>Ping for apply?
I'll get to the patches today.
thanks for waking me up :)
Quoted 6 lines
Quoted 1 line
Why don't you apply patches immediately after reviewing them?
It wouldn't make a difference. you were all working on the same file in code, If I would have applied bin's patches before yours, then you would need to rebase.
simple as that. Also the time when I'm applying and when I'm reviewing is also meaningless because this problem would occur anyway.
Please let me know which branch I should rebase on, so that I can send v2.
Regards,
Bin
Quoted 60 lines · Bin Meng
Hi Ramon,
Quoted 49 lines · Ramon Fried
Quoted 46 lines · Vladimir Oltean
Quoted 43 lines · Ramon Fried
Bin, patches don't apply cleanly. can you rebase ?
Quoted 40 lines · Ramon Fried
Quoted 33 lines · Bin Meng
Quoted 31 lines · Ramon Fried
Quoted 29 lines · Vladimir Oltean
Quoted 23 lines · Bin Meng
set_promisc()call accepts the parameter of a bool type. Make it clear by using true instead of 1.Signed-off-by Bin Meng <[email protected]>---
net/dsa-uclass.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)net/dsa-uclass.c +1
-2@@ -282,7 +282,7 @@ static int dsa_port_probe(struct udevice *pdev)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 0 ; } --Quoted 2 lines
2.25.1
Reviewed-by Vladimir Oltean <[email protected]>Quoted 3 lines
Quoted 1 line
Reviewed-by Ramon Fried <[email protected]>Ping for apply?
I'll get to the patches today.
thanks for waking me up :)Quoted 6 lines
Quoted 1 line
Why don't you apply patches immediately after reviewing them?
It wouldn't make a difference. you were all working on the same file in code, If I would have applied bin's patches before yours, then you would need to rebase.
simple as that. Also the time when I'm applying and when I'm reviewing is also meaningless because this problem would occur anyway.
Quoted 4 lines
Please let me know which branch I should rebase on, so that I can send v2.
Regards,
Bin
u-boot-net/next
Quoted 10 lines · Ramon Fried
Quoted 5 lines
Quoted 3 lines
Quoted 3 lines
Quoted 1 line
Ping for apply?
I'll get to the patches today.
thanks for waking me up :)Why don't you apply patches immediately after reviewing them?
It wouldn't make a difference. you were all working on the same file in code, If I would have applied bin's patches before yours, then you would need to rebase.
simple as that. Also the time when I'm applying and when I'm reviewing is also meaningless because this problem would occur anyway.
I know, I was reacting to the 'thanks for waking me up' part. Honestly I don't see the point of going through some patches, marking them as reviewed, then waiting for 2 more weeks to apply them (or even more in other cases). It slows down the process for a reason that I can't see.
Maybe the thinking is along the lines of "I won't apply patches that haven't marinated for long enough". But my patches (the ones conflicting with Bin's) still had build warnings even after marinating for close to one month (fixes for which I've sent just now). During that time, I had also piled up a few non-critical fixes to those patches, but I wasn't going to modify the patch set already in flight anyway, for fear of waiting again for who knows how long. Incremental fixups are fine and surely are a valid way of doing development too, so that argument kinda falls off the table. What's left?
Quoted 19 lines · Vladimir Oltean
Quoted 10 lines · Ramon Fried
Quoted 5 lines
Quoted 3 lines
Quoted 3 lines
Quoted 1 line
Ping for apply?
I'll get to the patches today.
thanks for waking me up :)Why don't you apply patches immediately after reviewing them?
It wouldn't make a difference. you were all working on the same file in code, If I would have applied bin's patches before yours, then you would need to rebase.
simple as that. Also the time when I'm applying and when I'm reviewing is also meaningless because this problem would occur anyway.I know, I was reacting to the 'thanks for waking me up' part. Honestly I don't see the point of going through some patches, marking them as reviewed, then waiting for 2 more weeks to apply them (or even more in other cases). It slows down the process for a reason that I can't see.
Quoted 9 lines
Maybe the thinking is along the lines of "I won't apply patches that haven't marinated for long enough". But my patches (the ones conflicting with Bin's) still had build warnings even after marinating for close to one month (fixes for which I've sent just now). During that time, I had also piled up a few non-critical fixes to those patches, but I wasn't going to modify the patch set already in flight anyway, for fear of waiting again for who knows how long. Incremental fixups are fine and surely are a valid way of doing development too, so that argument kinda falls off the table. What's left?
I do let patches marinate for a while, to give other people the opportunity to review, test and comment.
After a few weeks, when the merge window is open, I pick-up all the patches and apply them in turn.
That's my process, and I don't think there's anything wrong with it.
If you have a fix to a patch you already got reviewed-by, send the patch again, and add reviewed-by.
That's the way it should work.