* [PATCH 0/2] emaclite: improve error handling and minor cleanup
@ 2022-04-28 16:27 ` Radhey Shyam Pandey
0 siblings, 0 replies; 16+ messages in thread
From: Radhey Shyam Pandey @ 2022-04-28 16:27 UTC (permalink / raw)
To: davem, kuba, pabeni, michal.simek
Cc: netdev, linux-arm-kernel, linux-kernel, git, Radhey Shyam Pandey
It patchset does error handling for of_address_to_resource() and also
removes "Don't advertise 1000BASE-T" and auto negotiation.
TREE: net-next
Shravya Kumbham (2):
net: emaclite: Don't advertise 1000BASE-T and do auto negotiation
net: emaclite: Add error handling for of_address_to_resource()
drivers/net/ethernet/xilinx/xilinx_emaclite.c | 30 ++++++++++---------------
1 files changed, 12 insertions(+), 18 deletions(-)
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH 0/2] emaclite: improve error handling and minor cleanup
@ 2022-04-28 16:27 ` Radhey Shyam Pandey
0 siblings, 0 replies; 16+ messages in thread
From: Radhey Shyam Pandey @ 2022-04-28 16:27 UTC (permalink / raw)
To: davem, kuba, pabeni, michal.simek
Cc: netdev, linux-arm-kernel, linux-kernel, git, Radhey Shyam Pandey
It patchset does error handling for of_address_to_resource() and also
removes "Don't advertise 1000BASE-T" and auto negotiation.
TREE: net-next
Shravya Kumbham (2):
net: emaclite: Don't advertise 1000BASE-T and do auto negotiation
net: emaclite: Add error handling for of_address_to_resource()
drivers/net/ethernet/xilinx/xilinx_emaclite.c | 30 ++++++++++---------------
1 files changed, 12 insertions(+), 18 deletions(-)
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH 1/2] net: emaclite: Don't advertise 1000BASE-T and do auto negotiation
2022-04-28 16:27 ` Radhey Shyam Pandey
@ 2022-04-28 16:27 ` Radhey Shyam Pandey
-1 siblings, 0 replies; 16+ messages in thread
From: Radhey Shyam Pandey @ 2022-04-28 16:27 UTC (permalink / raw)
To: davem, kuba, pabeni, michal.simek
Cc: netdev, linux-arm-kernel, linux-kernel, git, Shravya Kumbham,
Radhey Shyam Pandey
From: Shravya Kumbham <shravya.kumbham@xilinx.com>
In xemaclite_open() function we are setting the max speed of
emaclite to 100Mb using phy_set_max_speed() function so,
there is no need to write the advertising registers to stop
giga-bit speed and the phy_start() function starts the
auto-negotiation so, there is no need to handle it separately
using advertising registers. Remove the phy_read and phy_write
of advertising registers in xemaclite_open() function.
Signed-off-by: Shravya Kumbham <shravya.kumbham@xilinx.com>
Signed-off-by: Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
---
drivers/net/ethernet/xilinx/xilinx_emaclite.c | 15 ---------------
1 files changed, 0 insertions(+), 15 deletions(-)
diff --git a/drivers/net/ethernet/xilinx/xilinx_emaclite.c b/drivers/net/ethernet/xilinx/xilinx_emaclite.c
index 7a86ae8..f9cf86e 100644
--- a/drivers/net/ethernet/xilinx/xilinx_emaclite.c
+++ b/drivers/net/ethernet/xilinx/xilinx_emaclite.c
@@ -907,8 +907,6 @@ static int xemaclite_open(struct net_device *dev)
xemaclite_disable_interrupts(lp);
if (lp->phy_node) {
- u32 bmcr;
-
lp->phy_dev = of_phy_connect(lp->ndev, lp->phy_node,
xemaclite_adjust_link, 0,
PHY_INTERFACE_MODE_MII);
@@ -919,19 +917,6 @@ static int xemaclite_open(struct net_device *dev)
/* EmacLite doesn't support giga-bit speeds */
phy_set_max_speed(lp->phy_dev, SPEED_100);
-
- /* Don't advertise 1000BASE-T Full/Half duplex speeds */
- phy_write(lp->phy_dev, MII_CTRL1000, 0);
-
- /* Advertise only 10 and 100mbps full/half duplex speeds */
- phy_write(lp->phy_dev, MII_ADVERTISE, ADVERTISE_ALL |
- ADVERTISE_CSMA);
-
- /* Restart auto negotiation */
- bmcr = phy_read(lp->phy_dev, MII_BMCR);
- bmcr |= (BMCR_ANENABLE | BMCR_ANRESTART);
- phy_write(lp->phy_dev, MII_BMCR, bmcr);
-
phy_start(lp->phy_dev);
}
--
1.7.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 1/2] net: emaclite: Don't advertise 1000BASE-T and do auto negotiation
@ 2022-04-28 16:27 ` Radhey Shyam Pandey
0 siblings, 0 replies; 16+ messages in thread
From: Radhey Shyam Pandey @ 2022-04-28 16:27 UTC (permalink / raw)
To: davem, kuba, pabeni, michal.simek
Cc: netdev, linux-arm-kernel, linux-kernel, git, Shravya Kumbham,
Radhey Shyam Pandey
From: Shravya Kumbham <shravya.kumbham@xilinx.com>
In xemaclite_open() function we are setting the max speed of
emaclite to 100Mb using phy_set_max_speed() function so,
there is no need to write the advertising registers to stop
giga-bit speed and the phy_start() function starts the
auto-negotiation so, there is no need to handle it separately
using advertising registers. Remove the phy_read and phy_write
of advertising registers in xemaclite_open() function.
Signed-off-by: Shravya Kumbham <shravya.kumbham@xilinx.com>
Signed-off-by: Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
---
drivers/net/ethernet/xilinx/xilinx_emaclite.c | 15 ---------------
1 files changed, 0 insertions(+), 15 deletions(-)
diff --git a/drivers/net/ethernet/xilinx/xilinx_emaclite.c b/drivers/net/ethernet/xilinx/xilinx_emaclite.c
index 7a86ae8..f9cf86e 100644
--- a/drivers/net/ethernet/xilinx/xilinx_emaclite.c
+++ b/drivers/net/ethernet/xilinx/xilinx_emaclite.c
@@ -907,8 +907,6 @@ static int xemaclite_open(struct net_device *dev)
xemaclite_disable_interrupts(lp);
if (lp->phy_node) {
- u32 bmcr;
-
lp->phy_dev = of_phy_connect(lp->ndev, lp->phy_node,
xemaclite_adjust_link, 0,
PHY_INTERFACE_MODE_MII);
@@ -919,19 +917,6 @@ static int xemaclite_open(struct net_device *dev)
/* EmacLite doesn't support giga-bit speeds */
phy_set_max_speed(lp->phy_dev, SPEED_100);
-
- /* Don't advertise 1000BASE-T Full/Half duplex speeds */
- phy_write(lp->phy_dev, MII_CTRL1000, 0);
-
- /* Advertise only 10 and 100mbps full/half duplex speeds */
- phy_write(lp->phy_dev, MII_ADVERTISE, ADVERTISE_ALL |
- ADVERTISE_CSMA);
-
- /* Restart auto negotiation */
- bmcr = phy_read(lp->phy_dev, MII_BMCR);
- bmcr |= (BMCR_ANENABLE | BMCR_ANRESTART);
- phy_write(lp->phy_dev, MII_BMCR, bmcr);
-
phy_start(lp->phy_dev);
}
--
1.7.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 2/2] net: emaclite: Add error handling for of_address_to_resource()
2022-04-28 16:27 ` Radhey Shyam Pandey
@ 2022-04-28 16:27 ` Radhey Shyam Pandey
-1 siblings, 0 replies; 16+ messages in thread
From: Radhey Shyam Pandey @ 2022-04-28 16:27 UTC (permalink / raw)
To: davem, kuba, pabeni, michal.simek
Cc: netdev, linux-arm-kernel, linux-kernel, git, Shravya Kumbham,
Radhey Shyam Pandey
From: Shravya Kumbham <shravya.kumbham@xilinx.com>
check the return value of of_address_to_resource() and also add
missing of_node_put() for np and npp nodes.
Addresses-Coverity: Event check_return value.
Signed-off-by: Shravya Kumbham <shravya.kumbham@xilinx.com>
Signed-off-by: Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
---
drivers/net/ethernet/xilinx/xilinx_emaclite.c | 15 ++++++++++++---
1 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/xilinx/xilinx_emaclite.c b/drivers/net/ethernet/xilinx/xilinx_emaclite.c
index f9cf86e..c281423 100644
--- a/drivers/net/ethernet/xilinx/xilinx_emaclite.c
+++ b/drivers/net/ethernet/xilinx/xilinx_emaclite.c
@@ -803,7 +803,7 @@ static int xemaclite_mdio_write(struct mii_bus *bus, int phy_id, int reg,
static int xemaclite_mdio_setup(struct net_local *lp, struct device *dev)
{
struct mii_bus *bus;
- int rc;
+ int rc, ret;
struct resource res;
struct device_node *np = of_get_parent(lp->phy_node);
struct device_node *npp;
@@ -816,8 +816,14 @@ static int xemaclite_mdio_setup(struct net_local *lp, struct device *dev)
return -ENODEV;
}
npp = of_get_parent(np);
-
- of_address_to_resource(npp, 0, &res);
+ ret = of_address_to_resource(npp, 0, &res);
+ of_node_put(npp);
+ if (ret) {
+ dev_err(dev, "%s resource error!\n",
+ dev->of_node->full_name);
+ of_node_put(np);
+ return ret;
+ }
if (lp->ndev->mem_start != res.start) {
struct phy_device *phydev;
@@ -827,6 +833,7 @@ static int xemaclite_mdio_setup(struct net_local *lp, struct device *dev)
"MDIO of the phy is not registered yet\n");
else
put_device(&phydev->mdio.dev);
+ of_node_put(np);
return 0;
}
@@ -839,6 +846,7 @@ static int xemaclite_mdio_setup(struct net_local *lp, struct device *dev)
bus = mdiobus_alloc();
if (!bus) {
dev_err(dev, "Failed to allocate mdiobus\n");
+ of_node_put(np);
return -ENOMEM;
}
@@ -851,6 +859,7 @@ static int xemaclite_mdio_setup(struct net_local *lp, struct device *dev)
bus->parent = dev;
rc = of_mdiobus_register(bus, np);
+ of_node_put(np);
if (rc) {
dev_err(dev, "Failed to register mdio bus.\n");
goto err_register;
--
1.7.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 2/2] net: emaclite: Add error handling for of_address_to_resource()
@ 2022-04-28 16:27 ` Radhey Shyam Pandey
0 siblings, 0 replies; 16+ messages in thread
From: Radhey Shyam Pandey @ 2022-04-28 16:27 UTC (permalink / raw)
To: davem, kuba, pabeni, michal.simek
Cc: netdev, linux-arm-kernel, linux-kernel, git, Shravya Kumbham,
Radhey Shyam Pandey
From: Shravya Kumbham <shravya.kumbham@xilinx.com>
check the return value of of_address_to_resource() and also add
missing of_node_put() for np and npp nodes.
Addresses-Coverity: Event check_return value.
Signed-off-by: Shravya Kumbham <shravya.kumbham@xilinx.com>
Signed-off-by: Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
---
drivers/net/ethernet/xilinx/xilinx_emaclite.c | 15 ++++++++++++---
1 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/xilinx/xilinx_emaclite.c b/drivers/net/ethernet/xilinx/xilinx_emaclite.c
index f9cf86e..c281423 100644
--- a/drivers/net/ethernet/xilinx/xilinx_emaclite.c
+++ b/drivers/net/ethernet/xilinx/xilinx_emaclite.c
@@ -803,7 +803,7 @@ static int xemaclite_mdio_write(struct mii_bus *bus, int phy_id, int reg,
static int xemaclite_mdio_setup(struct net_local *lp, struct device *dev)
{
struct mii_bus *bus;
- int rc;
+ int rc, ret;
struct resource res;
struct device_node *np = of_get_parent(lp->phy_node);
struct device_node *npp;
@@ -816,8 +816,14 @@ static int xemaclite_mdio_setup(struct net_local *lp, struct device *dev)
return -ENODEV;
}
npp = of_get_parent(np);
-
- of_address_to_resource(npp, 0, &res);
+ ret = of_address_to_resource(npp, 0, &res);
+ of_node_put(npp);
+ if (ret) {
+ dev_err(dev, "%s resource error!\n",
+ dev->of_node->full_name);
+ of_node_put(np);
+ return ret;
+ }
if (lp->ndev->mem_start != res.start) {
struct phy_device *phydev;
@@ -827,6 +833,7 @@ static int xemaclite_mdio_setup(struct net_local *lp, struct device *dev)
"MDIO of the phy is not registered yet\n");
else
put_device(&phydev->mdio.dev);
+ of_node_put(np);
return 0;
}
@@ -839,6 +846,7 @@ static int xemaclite_mdio_setup(struct net_local *lp, struct device *dev)
bus = mdiobus_alloc();
if (!bus) {
dev_err(dev, "Failed to allocate mdiobus\n");
+ of_node_put(np);
return -ENOMEM;
}
@@ -851,6 +859,7 @@ static int xemaclite_mdio_setup(struct net_local *lp, struct device *dev)
bus->parent = dev;
rc = of_mdiobus_register(bus, np);
+ of_node_put(np);
if (rc) {
dev_err(dev, "Failed to register mdio bus.\n");
goto err_register;
--
1.7.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [PATCH 0/2] emaclite: improve error handling and minor cleanup
2022-04-28 16:27 ` Radhey Shyam Pandey
@ 2022-04-29 1:07 ` Andrew Lunn
-1 siblings, 0 replies; 16+ messages in thread
From: Andrew Lunn @ 2022-04-29 1:07 UTC (permalink / raw)
To: Radhey Shyam Pandey
Cc: davem, kuba, pabeni, michal.simek, netdev, linux-arm-kernel,
linux-kernel, git
On Thu, Apr 28, 2022 at 09:57:56PM +0530, Radhey Shyam Pandey wrote:
> It patchset does error handling for of_address_to_resource() and also
> removes "Don't advertise 1000BASE-T" and auto negotiation.
>
> TREE: net-next
Please read the netdev FAQ. It tells you how to specify the tree a
patchset should be applied to.
Andrew
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 0/2] emaclite: improve error handling and minor cleanup
@ 2022-04-29 1:07 ` Andrew Lunn
0 siblings, 0 replies; 16+ messages in thread
From: Andrew Lunn @ 2022-04-29 1:07 UTC (permalink / raw)
To: Radhey Shyam Pandey
Cc: davem, kuba, pabeni, michal.simek, netdev, linux-arm-kernel,
linux-kernel, git
On Thu, Apr 28, 2022 at 09:57:56PM +0530, Radhey Shyam Pandey wrote:
> It patchset does error handling for of_address_to_resource() and also
> removes "Don't advertise 1000BASE-T" and auto negotiation.
>
> TREE: net-next
Please read the netdev FAQ. It tells you how to specify the tree a
patchset should be applied to.
Andrew
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 1/2] net: emaclite: Don't advertise 1000BASE-T and do auto negotiation
2022-04-28 16:27 ` Radhey Shyam Pandey
@ 2022-04-29 1:08 ` Andrew Lunn
-1 siblings, 0 replies; 16+ messages in thread
From: Andrew Lunn @ 2022-04-29 1:08 UTC (permalink / raw)
To: Radhey Shyam Pandey
Cc: davem, kuba, pabeni, michal.simek, netdev, linux-arm-kernel,
linux-kernel, git, Shravya Kumbham
On Thu, Apr 28, 2022 at 09:57:57PM +0530, Radhey Shyam Pandey wrote:
> From: Shravya Kumbham <shravya.kumbham@xilinx.com>
>
> In xemaclite_open() function we are setting the max speed of
> emaclite to 100Mb using phy_set_max_speed() function so,
> there is no need to write the advertising registers to stop
> giga-bit speed and the phy_start() function starts the
> auto-negotiation so, there is no need to handle it separately
> using advertising registers. Remove the phy_read and phy_write
> of advertising registers in xemaclite_open() function.
>
> Signed-off-by: Shravya Kumbham <shravya.kumbham@xilinx.com>
> Signed-off-by: Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 1/2] net: emaclite: Don't advertise 1000BASE-T and do auto negotiation
@ 2022-04-29 1:08 ` Andrew Lunn
0 siblings, 0 replies; 16+ messages in thread
From: Andrew Lunn @ 2022-04-29 1:08 UTC (permalink / raw)
To: Radhey Shyam Pandey
Cc: davem, kuba, pabeni, michal.simek, netdev, linux-arm-kernel,
linux-kernel, git, Shravya Kumbham
On Thu, Apr 28, 2022 at 09:57:57PM +0530, Radhey Shyam Pandey wrote:
> From: Shravya Kumbham <shravya.kumbham@xilinx.com>
>
> In xemaclite_open() function we are setting the max speed of
> emaclite to 100Mb using phy_set_max_speed() function so,
> there is no need to write the advertising registers to stop
> giga-bit speed and the phy_start() function starts the
> auto-negotiation so, there is no need to handle it separately
> using advertising registers. Remove the phy_read and phy_write
> of advertising registers in xemaclite_open() function.
>
> Signed-off-by: Shravya Kumbham <shravya.kumbham@xilinx.com>
> Signed-off-by: Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 2/2] net: emaclite: Add error handling for of_address_to_resource()
2022-04-28 16:27 ` Radhey Shyam Pandey
@ 2022-04-29 1:17 ` Andrew Lunn
-1 siblings, 0 replies; 16+ messages in thread
From: Andrew Lunn @ 2022-04-29 1:17 UTC (permalink / raw)
To: Radhey Shyam Pandey
Cc: davem, kuba, pabeni, michal.simek, netdev, linux-arm-kernel,
linux-kernel, git, Shravya Kumbham
On Thu, Apr 28, 2022 at 09:57:58PM +0530, Radhey Shyam Pandey wrote:
> From: Shravya Kumbham <shravya.kumbham@xilinx.com>
>
> check the return value of of_address_to_resource() and also add
> missing of_node_put() for np and npp nodes.
>
> Addresses-Coverity: Event check_return value.
> Signed-off-by: Shravya Kumbham <shravya.kumbham@xilinx.com>
> Signed-off-by: Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
> ---
> drivers/net/ethernet/xilinx/xilinx_emaclite.c | 15 ++++++++++++---
> 1 files changed, 12 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/ethernet/xilinx/xilinx_emaclite.c b/drivers/net/ethernet/xilinx/xilinx_emaclite.c
> index f9cf86e..c281423 100644
> --- a/drivers/net/ethernet/xilinx/xilinx_emaclite.c
> +++ b/drivers/net/ethernet/xilinx/xilinx_emaclite.c
> @@ -803,7 +803,7 @@ static int xemaclite_mdio_write(struct mii_bus *bus, int phy_id, int reg,
> static int xemaclite_mdio_setup(struct net_local *lp, struct device *dev)
> {
> struct mii_bus *bus;
> - int rc;
> + int rc, ret;
> struct resource res;
> struct device_node *np = of_get_parent(lp->phy_node);
> struct device_node *npp;
Reverse Chritmas tree is messed up here, but you could make it a bet
less messed up by moving rc, ret further down.
Andrew
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 2/2] net: emaclite: Add error handling for of_address_to_resource()
@ 2022-04-29 1:17 ` Andrew Lunn
0 siblings, 0 replies; 16+ messages in thread
From: Andrew Lunn @ 2022-04-29 1:17 UTC (permalink / raw)
To: Radhey Shyam Pandey
Cc: davem, kuba, pabeni, michal.simek, netdev, linux-arm-kernel,
linux-kernel, git, Shravya Kumbham
On Thu, Apr 28, 2022 at 09:57:58PM +0530, Radhey Shyam Pandey wrote:
> From: Shravya Kumbham <shravya.kumbham@xilinx.com>
>
> check the return value of of_address_to_resource() and also add
> missing of_node_put() for np and npp nodes.
>
> Addresses-Coverity: Event check_return value.
> Signed-off-by: Shravya Kumbham <shravya.kumbham@xilinx.com>
> Signed-off-by: Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
> ---
> drivers/net/ethernet/xilinx/xilinx_emaclite.c | 15 ++++++++++++---
> 1 files changed, 12 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/ethernet/xilinx/xilinx_emaclite.c b/drivers/net/ethernet/xilinx/xilinx_emaclite.c
> index f9cf86e..c281423 100644
> --- a/drivers/net/ethernet/xilinx/xilinx_emaclite.c
> +++ b/drivers/net/ethernet/xilinx/xilinx_emaclite.c
> @@ -803,7 +803,7 @@ static int xemaclite_mdio_write(struct mii_bus *bus, int phy_id, int reg,
> static int xemaclite_mdio_setup(struct net_local *lp, struct device *dev)
> {
> struct mii_bus *bus;
> - int rc;
> + int rc, ret;
> struct resource res;
> struct device_node *np = of_get_parent(lp->phy_node);
> struct device_node *npp;
Reverse Chritmas tree is messed up here, but you could make it a bet
less messed up by moving rc, ret further down.
Andrew
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 16+ messages in thread
* RE: [PATCH 0/2] emaclite: improve error handling and minor cleanup
2022-04-29 1:07 ` Andrew Lunn
@ 2022-04-29 4:44 ` Radhey Shyam Pandey
-1 siblings, 0 replies; 16+ messages in thread
From: Radhey Shyam Pandey @ 2022-04-29 4:44 UTC (permalink / raw)
To: Andrew Lunn
Cc: davem, kuba, pabeni, Michal Simek, netdev, linux-arm-kernel,
linux-kernel, git
> -----Original Message-----
> From: Andrew Lunn <andrew@lunn.ch>
> Sent: Friday, April 29, 2022 6:38 AM
> To: Radhey Shyam Pandey <radheys@xilinx.com>
> Cc: davem@davemloft.net; kuba@kernel.org; pabeni@redhat.com; Michal
> Simek <michals@xilinx.com>; netdev@vger.kernel.org; linux-arm-
> kernel@lists.infradead.org; linux-kernel@vger.kernel.org; git <git@xilinx.com>
> Subject: Re: [PATCH 0/2] emaclite: improve error handling and minor cleanup
>
> On Thu, Apr 28, 2022 at 09:57:56PM +0530, Radhey Shyam Pandey wrote:
> > It patchset does error handling for of_address_to_resource() and also
> > removes "Don't advertise 1000BASE-T" and auto negotiation.
> >
> > TREE: net-next
>
> Please read the netdev FAQ. It tells you how to specify the tree a patchset
> should be applied to.
Thanks. As one of a patch is a bug fix will target for net. Will update it in v2.
>
> Andrew
>
^ permalink raw reply [flat|nested] 16+ messages in thread
* RE: [PATCH 0/2] emaclite: improve error handling and minor cleanup
@ 2022-04-29 4:44 ` Radhey Shyam Pandey
0 siblings, 0 replies; 16+ messages in thread
From: Radhey Shyam Pandey @ 2022-04-29 4:44 UTC (permalink / raw)
To: Andrew Lunn
Cc: davem, kuba, pabeni, Michal Simek, netdev, linux-arm-kernel,
linux-kernel, git
> -----Original Message-----
> From: Andrew Lunn <andrew@lunn.ch>
> Sent: Friday, April 29, 2022 6:38 AM
> To: Radhey Shyam Pandey <radheys@xilinx.com>
> Cc: davem@davemloft.net; kuba@kernel.org; pabeni@redhat.com; Michal
> Simek <michals@xilinx.com>; netdev@vger.kernel.org; linux-arm-
> kernel@lists.infradead.org; linux-kernel@vger.kernel.org; git <git@xilinx.com>
> Subject: Re: [PATCH 0/2] emaclite: improve error handling and minor cleanup
>
> On Thu, Apr 28, 2022 at 09:57:56PM +0530, Radhey Shyam Pandey wrote:
> > It patchset does error handling for of_address_to_resource() and also
> > removes "Don't advertise 1000BASE-T" and auto negotiation.
> >
> > TREE: net-next
>
> Please read the netdev FAQ. It tells you how to specify the tree a patchset
> should be applied to.
Thanks. As one of a patch is a bug fix will target for net. Will update it in v2.
>
> Andrew
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 16+ messages in thread
* RE: [PATCH 2/2] net: emaclite: Add error handling for of_address_to_resource()
2022-04-29 1:17 ` Andrew Lunn
@ 2022-04-29 4:52 ` Radhey Shyam Pandey
-1 siblings, 0 replies; 16+ messages in thread
From: Radhey Shyam Pandey @ 2022-04-29 4:52 UTC (permalink / raw)
To: Andrew Lunn
Cc: davem, kuba, pabeni, Michal Simek, netdev, linux-arm-kernel,
linux-kernel, git, Shravya Kumbham
> -----Original Message-----
> From: Andrew Lunn <andrew@lunn.ch>
> Sent: Friday, April 29, 2022 6:48 AM
> To: Radhey Shyam Pandey <radheys@xilinx.com>
> Cc: davem@davemloft.net; kuba@kernel.org; pabeni@redhat.com; Michal
> Simek <michals@xilinx.com>; netdev@vger.kernel.org; linux-arm-
> kernel@lists.infradead.org; linux-kernel@vger.kernel.org; git <git@xilinx.com>;
> Shravya Kumbham <shravyak@xilinx.com>
> Subject: Re: [PATCH 2/2] net: emaclite: Add error handling for
> of_address_to_resource()
>
> On Thu, Apr 28, 2022 at 09:57:58PM +0530, Radhey Shyam Pandey wrote:
> > From: Shravya Kumbham <shravya.kumbham@xilinx.com>
> >
> > check the return value of of_address_to_resource() and also add
> > missing of_node_put() for np and npp nodes.
> >
> > Addresses-Coverity: Event check_return value.
> > Signed-off-by: Shravya Kumbham <shravya.kumbham@xilinx.com>
> > Signed-off-by: Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
> > ---
> > drivers/net/ethernet/xilinx/xilinx_emaclite.c | 15 ++++++++++++---
> > 1 files changed, 12 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/net/ethernet/xilinx/xilinx_emaclite.c
> b/drivers/net/ethernet/xilinx/xilinx_emaclite.c
> > index f9cf86e..c281423 100644
> > --- a/drivers/net/ethernet/xilinx/xilinx_emaclite.c
> > +++ b/drivers/net/ethernet/xilinx/xilinx_emaclite.c
> > @@ -803,7 +803,7 @@ static int xemaclite_mdio_write(struct mii_bus *bus,
> int phy_id, int reg,
> > static int xemaclite_mdio_setup(struct net_local *lp, struct device *dev)
> > {
> > struct mii_bus *bus;
> > - int rc;
> > + int rc, ret;
> > struct resource res;
> > struct device_node *np = of_get_parent(lp->phy_node);
> > struct device_node *npp;
>
> Reverse Chritmas tree is messed up here, but you could make it a bet
> less messed up by moving rc, ret further down.
Thanks, I will fix the existing declaration order in a new patch.
and in this patch will align new changes to reverse Christmas tree
order.
>
> Andrew
^ permalink raw reply [flat|nested] 16+ messages in thread
* RE: [PATCH 2/2] net: emaclite: Add error handling for of_address_to_resource()
@ 2022-04-29 4:52 ` Radhey Shyam Pandey
0 siblings, 0 replies; 16+ messages in thread
From: Radhey Shyam Pandey @ 2022-04-29 4:52 UTC (permalink / raw)
To: Andrew Lunn
Cc: davem, kuba, pabeni, Michal Simek, netdev, linux-arm-kernel,
linux-kernel, git, Shravya Kumbham
> -----Original Message-----
> From: Andrew Lunn <andrew@lunn.ch>
> Sent: Friday, April 29, 2022 6:48 AM
> To: Radhey Shyam Pandey <radheys@xilinx.com>
> Cc: davem@davemloft.net; kuba@kernel.org; pabeni@redhat.com; Michal
> Simek <michals@xilinx.com>; netdev@vger.kernel.org; linux-arm-
> kernel@lists.infradead.org; linux-kernel@vger.kernel.org; git <git@xilinx.com>;
> Shravya Kumbham <shravyak@xilinx.com>
> Subject: Re: [PATCH 2/2] net: emaclite: Add error handling for
> of_address_to_resource()
>
> On Thu, Apr 28, 2022 at 09:57:58PM +0530, Radhey Shyam Pandey wrote:
> > From: Shravya Kumbham <shravya.kumbham@xilinx.com>
> >
> > check the return value of of_address_to_resource() and also add
> > missing of_node_put() for np and npp nodes.
> >
> > Addresses-Coverity: Event check_return value.
> > Signed-off-by: Shravya Kumbham <shravya.kumbham@xilinx.com>
> > Signed-off-by: Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
> > ---
> > drivers/net/ethernet/xilinx/xilinx_emaclite.c | 15 ++++++++++++---
> > 1 files changed, 12 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/net/ethernet/xilinx/xilinx_emaclite.c
> b/drivers/net/ethernet/xilinx/xilinx_emaclite.c
> > index f9cf86e..c281423 100644
> > --- a/drivers/net/ethernet/xilinx/xilinx_emaclite.c
> > +++ b/drivers/net/ethernet/xilinx/xilinx_emaclite.c
> > @@ -803,7 +803,7 @@ static int xemaclite_mdio_write(struct mii_bus *bus,
> int phy_id, int reg,
> > static int xemaclite_mdio_setup(struct net_local *lp, struct device *dev)
> > {
> > struct mii_bus *bus;
> > - int rc;
> > + int rc, ret;
> > struct resource res;
> > struct device_node *np = of_get_parent(lp->phy_node);
> > struct device_node *npp;
>
> Reverse Chritmas tree is messed up here, but you could make it a bet
> less messed up by moving rc, ret further down.
Thanks, I will fix the existing declaration order in a new patch.
and in this patch will align new changes to reverse Christmas tree
order.
>
> Andrew
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2022-04-29 4:53 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-28 16:27 [PATCH 0/2] emaclite: improve error handling and minor cleanup Radhey Shyam Pandey
2022-04-28 16:27 ` Radhey Shyam Pandey
2022-04-28 16:27 ` [PATCH 1/2] net: emaclite: Don't advertise 1000BASE-T and do auto negotiation Radhey Shyam Pandey
2022-04-28 16:27 ` Radhey Shyam Pandey
2022-04-29 1:08 ` Andrew Lunn
2022-04-29 1:08 ` Andrew Lunn
2022-04-28 16:27 ` [PATCH 2/2] net: emaclite: Add error handling for of_address_to_resource() Radhey Shyam Pandey
2022-04-28 16:27 ` Radhey Shyam Pandey
2022-04-29 1:17 ` Andrew Lunn
2022-04-29 1:17 ` Andrew Lunn
2022-04-29 4:52 ` Radhey Shyam Pandey
2022-04-29 4:52 ` Radhey Shyam Pandey
2022-04-29 1:07 ` [PATCH 0/2] emaclite: improve error handling and minor cleanup Andrew Lunn
2022-04-29 1:07 ` Andrew Lunn
2022-04-29 4:44 ` Radhey Shyam Pandey
2022-04-29 4:44 ` Radhey Shyam Pandey
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.