netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] net: dsa: mt7530: Use NULL instead of plain integer
@ 2018-04-02 23:24 Florian Fainelli
       [not found] ` <20180402232414.19671-1-f.fainelli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  2018-04-04 15:16 ` David Miller
  0 siblings, 2 replies; 5+ messages in thread
From: Florian Fainelli @ 2018-04-02 23:24 UTC (permalink / raw)
  To: netdev
  Cc: Florian Fainelli, Sean Wang, Andrew Lunn, Vivien Didelot, open list

We would be passing 0 instead of NULL as the rsp argument to
mt7530_fdb_cmd(), fix that.

Fixes: b8f126a8d543 ("net-next: dsa: add dsa support for Mediatek MT7530 switch")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
 drivers/net/dsa/mt7530.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c
index 4e53c5ce23ff..a7f6c0a62fc7 100644
--- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c
@@ -917,7 +917,7 @@ mt7530_port_fdb_add(struct dsa_switch *ds, int port,
 
 	mutex_lock(&priv->reg_mutex);
 	mt7530_fdb_write(priv, vid, port_mask, addr, -1, STATIC_ENT);
-	ret = mt7530_fdb_cmd(priv, MT7530_FDB_WRITE, 0);
+	ret = mt7530_fdb_cmd(priv, MT7530_FDB_WRITE, NULL);
 	mutex_unlock(&priv->reg_mutex);
 
 	return ret;
@@ -933,7 +933,7 @@ mt7530_port_fdb_del(struct dsa_switch *ds, int port,
 
 	mutex_lock(&priv->reg_mutex);
 	mt7530_fdb_write(priv, vid, port_mask, addr, -1, STATIC_EMP);
-	ret = mt7530_fdb_cmd(priv, MT7530_FDB_WRITE, 0);
+	ret = mt7530_fdb_cmd(priv, MT7530_FDB_WRITE, NULL);
 	mutex_unlock(&priv->reg_mutex);
 
 	return ret;
@@ -1293,7 +1293,7 @@ mt7530_setup(struct dsa_switch *ds)
 	}
 
 	/* Flush the FDB table */
-	ret = mt7530_fdb_cmd(priv, MT7530_FDB_FLUSH, 0);
+	ret = mt7530_fdb_cmd(priv, MT7530_FDB_FLUSH, NULL);
 	if (ret < 0)
 		return ret;
 
-- 
2.14.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH net] net: dsa: mt7530: Use NULL instead of plain integer
       [not found] ` <20180402232414.19671-1-f.fainelli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2018-04-03  2:18   ` Sean Wang
  2018-04-03 17:02     ` Florian Fainelli
  0 siblings, 1 reply; 5+ messages in thread
From: Sean Wang @ 2018-04-03  2:18 UTC (permalink / raw)
  To: Florian Fainelli
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA, Vivien Didelot,
	linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, open list,
	Andrew Lunn

On Mon, 2018-04-02 at 16:24 -0700, Florian Fainelli wrote:
> We would be passing 0 instead of NULL as the rsp argument to
> mt7530_fdb_cmd(), fix that.
> 

Acked-by: Sean Wang <sean.wang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>

BTW, does the part of the commit message should be updated with "passing
NULL instead of 0"?


> Fixes: b8f126a8d543 ("net-next: dsa: add dsa support for Mediatek MT7530 switch")
> Signed-off-by: Florian Fainelli <f.fainelli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> ---
>  drivers/net/dsa/mt7530.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c
> index 4e53c5ce23ff..a7f6c0a62fc7 100644
> --- a/drivers/net/dsa/mt7530.c
> +++ b/drivers/net/dsa/mt7530.c
> @@ -917,7 +917,7 @@ mt7530_port_fdb_add(struct dsa_switch *ds, int port,
>  
>  	mutex_lock(&priv->reg_mutex);
>  	mt7530_fdb_write(priv, vid, port_mask, addr, -1, STATIC_ENT);
> -	ret = mt7530_fdb_cmd(priv, MT7530_FDB_WRITE, 0);
> +	ret = mt7530_fdb_cmd(priv, MT7530_FDB_WRITE, NULL);
>  	mutex_unlock(&priv->reg_mutex);
>  
>  	return ret;
> @@ -933,7 +933,7 @@ mt7530_port_fdb_del(struct dsa_switch *ds, int port,
>  
>  	mutex_lock(&priv->reg_mutex);
>  	mt7530_fdb_write(priv, vid, port_mask, addr, -1, STATIC_EMP);
> -	ret = mt7530_fdb_cmd(priv, MT7530_FDB_WRITE, 0);
> +	ret = mt7530_fdb_cmd(priv, MT7530_FDB_WRITE, NULL);
>  	mutex_unlock(&priv->reg_mutex);
>  
>  	return ret;
> @@ -1293,7 +1293,7 @@ mt7530_setup(struct dsa_switch *ds)
>  	}
>  
>  	/* Flush the FDB table */
> -	ret = mt7530_fdb_cmd(priv, MT7530_FDB_FLUSH, 0);
> +	ret = mt7530_fdb_cmd(priv, MT7530_FDB_FLUSH, NULL);
>  	if (ret < 0)
>  		return ret;
>  

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH net] net: dsa: mt7530: Use NULL instead of plain integer
  2018-04-03  2:18   ` Sean Wang
@ 2018-04-03 17:02     ` Florian Fainelli
       [not found]       ` <f5aa0467-8124-b097-2b89-dcf1698a5ba5-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Florian Fainelli @ 2018-04-03 17:02 UTC (permalink / raw)
  To: Sean Wang; +Cc: netdev, Andrew Lunn, Vivien Didelot, open list, linux-mediatek

On 04/02/2018 07:18 PM, Sean Wang wrote:
> On Mon, 2018-04-02 at 16:24 -0700, Florian Fainelli wrote:
>> We would be passing 0 instead of NULL as the rsp argument to
>> mt7530_fdb_cmd(), fix that.
>>
> 
> Acked-by: Sean Wang <sean.wang@mediatek.com>
> 
> BTW, does the part of the commit message should be updated with "passing
> NULL instead of 0"?

I don't follow you, the commit message indicates what we were doing
which implies it was wrong and fixes it. Would you want me to reword
that part?
-- 
Florian

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH net] net: dsa: mt7530: Use NULL instead of plain integer
       [not found]       ` <f5aa0467-8124-b097-2b89-dcf1698a5ba5-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2018-04-03 17:31         ` Sean Wang
  0 siblings, 0 replies; 5+ messages in thread
From: Sean Wang @ 2018-04-03 17:31 UTC (permalink / raw)
  To: Florian Fainelli
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA, Vivien Didelot,
	linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, open list,
	Andrew Lunn

On Tue, 2018-04-03 at 10:02 -0700, Florian Fainelli wrote:
> On 04/02/2018 07:18 PM, Sean Wang wrote:
> > On Mon, 2018-04-02 at 16:24 -0700, Florian Fainelli wrote:
> >> We would be passing 0 instead of NULL as the rsp argument to
> >> mt7530_fdb_cmd(), fix that.
> >>
> > 
> > Acked-by: Sean Wang <sean.wang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
> > 
> > BTW, does the part of the commit message should be updated with "passing
> > NULL instead of 0"?
> 
> I don't follow you, the commit message indicates what we were doing
> which implies it was wrong and fixes it. Would you want me to reword
> that part?

thanks for the explanation.

the commit message is clear and okay for me now

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH net] net: dsa: mt7530: Use NULL instead of plain integer
  2018-04-02 23:24 [PATCH net] net: dsa: mt7530: Use NULL instead of plain integer Florian Fainelli
       [not found] ` <20180402232414.19671-1-f.fainelli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2018-04-04 15:16 ` David Miller
  1 sibling, 0 replies; 5+ messages in thread
From: David Miller @ 2018-04-04 15:16 UTC (permalink / raw)
  To: f.fainelli; +Cc: netdev, sean.wang, andrew, vivien.didelot, linux-kernel

From: Florian Fainelli <f.fainelli@gmail.com>
Date: Mon,  2 Apr 2018 16:24:14 -0700

> We would be passing 0 instead of NULL as the rsp argument to
> mt7530_fdb_cmd(), fix that.
> 
> Fixes: b8f126a8d543 ("net-next: dsa: add dsa support for Mediatek MT7530 switch")
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>

Applied.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-04-04 15:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-02 23:24 [PATCH net] net: dsa: mt7530: Use NULL instead of plain integer Florian Fainelli
     [not found] ` <20180402232414.19671-1-f.fainelli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-04-03  2:18   ` Sean Wang
2018-04-03 17:02     ` Florian Fainelli
     [not found]       ` <f5aa0467-8124-b097-2b89-dcf1698a5ba5-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-04-03 17:31         ` Sean Wang
2018-04-04 15:16 ` David Miller

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).