There is no need to have the 'T *v' variable static
since new value always be assigned before use it.
Signed-off-by: Mao Wenan <[email protected]>
---
drivers/net/dsa/qca/ar9331.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/dsa/qca/ar9331.c b/drivers/net/dsa/qca/ar9331.c
index 0d1a7cd85fe8..da3bece75e21 100644
--- a/drivers/net/dsa/qca/ar9331.c
+++ b/drivers/net/dsa/qca/ar9331.c
@@ -266,7 +266,7 @@ static int ar9331_sw_mbus_read(struct mii_bus *mbus, int port, int regnum)
static int ar9331_sw_mbus_init(struct ar9331_sw_priv *priv)
{
struct device *dev = priv->dev;
- static struct mii_bus *mbus;
+ struct mii_bus *mbus;
struct device_node *np, *mnp;
int ret;
--
2.20.1
Hi Mao,
the commit title should be something of the form
net: dsa: qca: ar9331: drop pointless static qualifier
or
net: dsa: ar9331: drop pointless static qualifier
If it begins only with
net: dsa:
then it makes people think you are changing stuff in main dsa code.
Marek
On Tue, 24 Dec 2019 10:40:59 +0800
Mao Wenan <[email protected]> wrote:
> There is no need to have the 'T *v' variable static
> since new value always be assigned before use it.
>
> Signed-off-by: Mao Wenan <[email protected]>
> ---
> drivers/net/dsa/qca/ar9331.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/dsa/qca/ar9331.c b/drivers/net/dsa/qca/ar9331.c
> index 0d1a7cd85fe8..da3bece75e21 100644
> --- a/drivers/net/dsa/qca/ar9331.c
> +++ b/drivers/net/dsa/qca/ar9331.c
> @@ -266,7 +266,7 @@ static int ar9331_sw_mbus_read(struct mii_bus *mbus, int port, int regnum)
> static int ar9331_sw_mbus_init(struct ar9331_sw_priv *priv)
> {
> struct device *dev = priv->dev;
> - static struct mii_bus *mbus;
> + struct mii_bus *mbus;
> struct device_node *np, *mnp;
> int ret;
>
On Tue, Dec 24, 2019 at 10:40:59AM +0800, Mao Wenan wrote:
> There is no need to have the 'T *v' variable static
What does 'T *v' mean?
The patch itself looks O.K, but the description should be better, and
the subject line.
Andrew
There is no need to set variable 'mbus' static
since new value always be assigned before use it.
Signed-off-by: Mao Wenan <[email protected]>
---
v2: change subject and description.
drivers/net/dsa/qca/ar9331.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/dsa/qca/ar9331.c b/drivers/net/dsa/qca/ar9331.c
index 0d1a7cd85fe8..da3bece75e21 100644
--- a/drivers/net/dsa/qca/ar9331.c
+++ b/drivers/net/dsa/qca/ar9331.c
@@ -266,7 +266,7 @@ static int ar9331_sw_mbus_read(struct mii_bus *mbus, int port, int regnum)
static int ar9331_sw_mbus_init(struct ar9331_sw_priv *priv)
{
struct device *dev = priv->dev;
- static struct mii_bus *mbus;
+ struct mii_bus *mbus;
struct device_node *np, *mnp;
int ret;
--
2.20.1
Hi,
On Tue, Dec 24, 2019 at 07:58:12PM +0800, Mao Wenan wrote:
> There is no need to set variable 'mbus' static
> since new value always be assigned before use it.
>
> Signed-off-by: Mao Wenan <[email protected]>
Reviewed-by: Oleksij Rempel <[email protected]>
Thank you!
> ---
> v2: change subject and description.
> drivers/net/dsa/qca/ar9331.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/dsa/qca/ar9331.c b/drivers/net/dsa/qca/ar9331.c
> index 0d1a7cd85fe8..da3bece75e21 100644
> --- a/drivers/net/dsa/qca/ar9331.c
> +++ b/drivers/net/dsa/qca/ar9331.c
> @@ -266,7 +266,7 @@ static int ar9331_sw_mbus_read(struct mii_bus *mbus, int port, int regnum)
> static int ar9331_sw_mbus_init(struct ar9331_sw_priv *priv)
> {
> struct device *dev = priv->dev;
> - static struct mii_bus *mbus;
> + struct mii_bus *mbus;
> struct device_node *np, *mnp;
> int ret;
>
> --
> 2.20.1
>
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
On Tue, Dec 24, 2019 at 07:58:12PM +0800, Mao Wenan wrote:
> There is no need to set variable 'mbus' static
> since new value always be assigned before use it.
>
> Signed-off-by: Mao Wenan <[email protected]>
Reviewed-by: Andrew Lunn <[email protected]>
Andrew
From: Mao Wenan <[email protected]>
Date: Tue, 24 Dec 2019 19:58:12 +0800
> There is no need to set variable 'mbus' static
> since new value always be assigned before use it.
>
> Signed-off-by: Mao Wenan <[email protected]>
Applied, thank you.