All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] net: axienet: Fix error return code in axienet_probe()
@ 2019-11-06 15:54 ` Wei Yongjun
  0 siblings, 0 replies; 12+ messages in thread
From: Wei Yongjun @ 2019-11-06 15:54 UTC (permalink / raw)
  To: Radhey Shyam Pandey, Michal Simek, Russell King, Robert Hancock
  Cc: Wei Yongjun, netdev, linux-arm-kernel, kernel-janitors

In the DMA memory resource get failed case, the error is not
set and 0 will be returned. Fix it by reove redundant check
since devm_ioremap_resource() will handle it.

Fixes: 28ef9ebdb64c ("net: axienet: make use of axistream-connected attribute optional")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
index 867726d696e2..8f32db6d2c45 100644
--- a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
+++ b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
@@ -1788,10 +1788,6 @@ static int axienet_probe(struct platform_device *pdev)
 		/* Check for these resources directly on the Ethernet node. */
 		struct resource *res = platform_get_resource(pdev,
 							     IORESOURCE_MEM, 1);
-		if (!res) {
-			dev_err(&pdev->dev, "unable to get DMA memory resource\n");
-			goto free_netdev;
-		}
 		lp->dma_regs = devm_ioremap_resource(&pdev->dev, res);
 		lp->rx_irq = platform_get_irq(pdev, 1);
 		lp->tx_irq = platform_get_irq(pdev, 0);




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

* [PATCH net-next] net: axienet: Fix error return code in axienet_probe()
@ 2019-11-06 15:54 ` Wei Yongjun
  0 siblings, 0 replies; 12+ messages in thread
From: Wei Yongjun @ 2019-11-06 15:54 UTC (permalink / raw)
  To: Radhey Shyam Pandey, Michal Simek, Russell King, Robert Hancock
  Cc: netdev, kernel-janitors, Wei Yongjun, linux-arm-kernel

In the DMA memory resource get failed case, the error is not
set and 0 will be returned. Fix it by reove redundant check
since devm_ioremap_resource() will handle it.

Fixes: 28ef9ebdb64c ("net: axienet: make use of axistream-connected attribute optional")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
index 867726d696e2..8f32db6d2c45 100644
--- a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
+++ b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
@@ -1788,10 +1788,6 @@ static int axienet_probe(struct platform_device *pdev)
 		/* Check for these resources directly on the Ethernet node. */
 		struct resource *res = platform_get_resource(pdev,
 							     IORESOURCE_MEM, 1);
-		if (!res) {
-			dev_err(&pdev->dev, "unable to get DMA memory resource\n");
-			goto free_netdev;
-		}
 		lp->dma_regs = devm_ioremap_resource(&pdev->dev, res);
 		lp->rx_irq = platform_get_irq(pdev, 1);
 		lp->tx_irq = platform_get_irq(pdev, 0);

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

* [PATCH net-next] net: axienet: Fix error return code in axienet_probe()
@ 2019-11-06 15:54 ` Wei Yongjun
  0 siblings, 0 replies; 12+ messages in thread
From: Wei Yongjun @ 2019-11-06 15:54 UTC (permalink / raw)
  To: Radhey Shyam Pandey, Michal Simek, Russell King, Robert Hancock
  Cc: netdev, kernel-janitors, Wei Yongjun, linux-arm-kernel

In the DMA memory resource get failed case, the error is not
set and 0 will be returned. Fix it by reove redundant check
since devm_ioremap_resource() will handle it.

Fixes: 28ef9ebdb64c ("net: axienet: make use of axistream-connected attribute optional")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
index 867726d696e2..8f32db6d2c45 100644
--- a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
+++ b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
@@ -1788,10 +1788,6 @@ static int axienet_probe(struct platform_device *pdev)
 		/* Check for these resources directly on the Ethernet node. */
 		struct resource *res = platform_get_resource(pdev,
 							     IORESOURCE_MEM, 1);
-		if (!res) {
-			dev_err(&pdev->dev, "unable to get DMA memory resource\n");
-			goto free_netdev;
-		}
 		lp->dma_regs = devm_ioremap_resource(&pdev->dev, res);
 		lp->rx_irq = platform_get_irq(pdev, 1);
 		lp->tx_irq = platform_get_irq(pdev, 0);




_______________________________________________
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] 12+ messages in thread

* RE: [PATCH net-next] net: axienet: Fix error return code in axienet_probe()
  2019-11-06 15:54 ` Wei Yongjun
  (?)
@ 2019-11-06 16:59   ` Radhey Shyam Pandey
  -1 siblings, 0 replies; 12+ messages in thread
From: Radhey Shyam Pandey @ 2019-11-06 16:59 UTC (permalink / raw)
  To: Wei Yongjun, Michal Simek, Russell King, Robert Hancock
  Cc: netdev, linux-arm-kernel, kernel-janitors

> -----Original Message-----
> From: Wei Yongjun <weiyongjun1@huawei.com>
> Sent: Wednesday, November 6, 2019 9:25 PM
> To: Radhey Shyam Pandey <radheys@xilinx.com>; Michal Simek
> <michals@xilinx.com>; Russell King <linux@armlinux.org.uk>; Robert Hancock
> <hancock@sedsystems.ca>
> Cc: Wei Yongjun <weiyongjun1@huawei.com>; netdev@vger.kernel.org; linux-
> arm-kernel@lists.infradead.org; kernel-janitors@vger.kernel.org
> Subject: [PATCH net-next] net: axienet: Fix error return code in axienet_probe()
> 
> In the DMA memory resource get failed case, the error is not
> set and 0 will be returned. Fix it by reove redundant check
:s/reove/removing

> since devm_ioremap_resource() will handle it.
> 
> Fixes: 28ef9ebdb64c ("net: axienet: make use of axistream-connected attribute
> optional")
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>

The rest looks fine.
Reviewed-by: Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>

> ---
>  drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 4 ----
>  1 file changed, 4 deletions(-)
> 
> diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
> b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
> index 867726d696e2..8f32db6d2c45 100644
> --- a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
> +++ b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
> @@ -1788,10 +1788,6 @@ static int axienet_probe(struct platform_device
> *pdev)
>  		/* Check for these resources directly on the Ethernet node. */
>  		struct resource *res = platform_get_resource(pdev,
> 
> IORESOURCE_MEM, 1);
> -		if (!res) {
> -			dev_err(&pdev->dev, "unable to get DMA memory
> resource\n");
> -			goto free_netdev;
> -		}
>  		lp->dma_regs = devm_ioremap_resource(&pdev->dev, res);
>  		lp->rx_irq = platform_get_irq(pdev, 1);
>  		lp->tx_irq = platform_get_irq(pdev, 0);
> 
> 


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

* RE: [PATCH net-next] net: axienet: Fix error return code in axienet_probe()
@ 2019-11-06 16:59   ` Radhey Shyam Pandey
  0 siblings, 0 replies; 12+ messages in thread
From: Radhey Shyam Pandey @ 2019-11-06 16:59 UTC (permalink / raw)
  To: Wei Yongjun, Michal Simek, Russell King, Robert Hancock
  Cc: netdev, kernel-janitors, linux-arm-kernel

> -----Original Message-----
> From: Wei Yongjun <weiyongjun1@huawei.com>
> Sent: Wednesday, November 6, 2019 9:25 PM
> To: Radhey Shyam Pandey <radheys@xilinx.com>; Michal Simek
> <michals@xilinx.com>; Russell King <linux@armlinux.org.uk>; Robert Hancock
> <hancock@sedsystems.ca>
> Cc: Wei Yongjun <weiyongjun1@huawei.com>; netdev@vger.kernel.org; linux-
> arm-kernel@lists.infradead.org; kernel-janitors@vger.kernel.org
> Subject: [PATCH net-next] net: axienet: Fix error return code in axienet_probe()
> 
> In the DMA memory resource get failed case, the error is not
> set and 0 will be returned. Fix it by reove redundant check
:s/reove/removing

> since devm_ioremap_resource() will handle it.
> 
> Fixes: 28ef9ebdb64c ("net: axienet: make use of axistream-connected attribute
> optional")
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>

The rest looks fine.
Reviewed-by: Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>

> ---
>  drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 4 ----
>  1 file changed, 4 deletions(-)
> 
> diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
> b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
> index 867726d696e2..8f32db6d2c45 100644
> --- a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
> +++ b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
> @@ -1788,10 +1788,6 @@ static int axienet_probe(struct platform_device
> *pdev)
>  		/* Check for these resources directly on the Ethernet node. */
>  		struct resource *res = platform_get_resource(pdev,
> 
> IORESOURCE_MEM, 1);
> -		if (!res) {
> -			dev_err(&pdev->dev, "unable to get DMA memory
> resource\n");
> -			goto free_netdev;
> -		}
>  		lp->dma_regs = devm_ioremap_resource(&pdev->dev, res);
>  		lp->rx_irq = platform_get_irq(pdev, 1);
>  		lp->tx_irq = platform_get_irq(pdev, 0);
> 
> 

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

* RE: [PATCH net-next] net: axienet: Fix error return code in axienet_probe()
@ 2019-11-06 16:59   ` Radhey Shyam Pandey
  0 siblings, 0 replies; 12+ messages in thread
From: Radhey Shyam Pandey @ 2019-11-06 16:59 UTC (permalink / raw)
  To: Wei Yongjun, Michal Simek, Russell King, Robert Hancock
  Cc: netdev, kernel-janitors, linux-arm-kernel

> -----Original Message-----
> From: Wei Yongjun <weiyongjun1@huawei.com>
> Sent: Wednesday, November 6, 2019 9:25 PM
> To: Radhey Shyam Pandey <radheys@xilinx.com>; Michal Simek
> <michals@xilinx.com>; Russell King <linux@armlinux.org.uk>; Robert Hancock
> <hancock@sedsystems.ca>
> Cc: Wei Yongjun <weiyongjun1@huawei.com>; netdev@vger.kernel.org; linux-
> arm-kernel@lists.infradead.org; kernel-janitors@vger.kernel.org
> Subject: [PATCH net-next] net: axienet: Fix error return code in axienet_probe()
> 
> In the DMA memory resource get failed case, the error is not
> set and 0 will be returned. Fix it by reove redundant check
:s/reove/removing

> since devm_ioremap_resource() will handle it.
> 
> Fixes: 28ef9ebdb64c ("net: axienet: make use of axistream-connected attribute
> optional")
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>

The rest looks fine.
Reviewed-by: Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>

> ---
>  drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 4 ----
>  1 file changed, 4 deletions(-)
> 
> diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
> b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
> index 867726d696e2..8f32db6d2c45 100644
> --- a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
> +++ b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
> @@ -1788,10 +1788,6 @@ static int axienet_probe(struct platform_device
> *pdev)
>  		/* Check for these resources directly on the Ethernet node. */
>  		struct resource *res = platform_get_resource(pdev,
> 
> IORESOURCE_MEM, 1);
> -		if (!res) {
> -			dev_err(&pdev->dev, "unable to get DMA memory
> resource\n");
> -			goto free_netdev;
> -		}
>  		lp->dma_regs = devm_ioremap_resource(&pdev->dev, res);
>  		lp->rx_irq = platform_get_irq(pdev, 1);
>  		lp->tx_irq = platform_get_irq(pdev, 0);
> 
> 


_______________________________________________
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] 12+ messages in thread

* Re: [PATCH net-next] net: axienet: Fix error return code in axienet_probe()
  2019-11-06 15:54 ` Wei Yongjun
  (?)
@ 2019-11-07  5:24   ` David Miller
  -1 siblings, 0 replies; 12+ messages in thread
From: David Miller @ 2019-11-07  5:24 UTC (permalink / raw)
  To: weiyongjun1
  Cc: radhey.shyam.pandey, michal.simek, linux, hancock, netdev,
	linux-arm-kernel, kernel-janitors

From: Wei Yongjun <weiyongjun1@huawei.com>
Date: Wed, 6 Nov 2019 15:54:49 +0000

> In the DMA memory resource get failed case, the error is not
> set and 0 will be returned. Fix it by reove redundant check
> since devm_ioremap_resource() will handle it.
> 
> Fixes: 28ef9ebdb64c ("net: axienet: make use of axistream-connected attribute optional")
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>

Fixed with the commit message typo fixed.

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

* Re: [PATCH net-next] net: axienet: Fix error return code in axienet_probe()
@ 2019-11-07  5:24   ` David Miller
  0 siblings, 0 replies; 12+ messages in thread
From: David Miller @ 2019-11-07  5:24 UTC (permalink / raw)
  To: weiyongjun1
  Cc: netdev, radhey.shyam.pandey, kernel-janitors, michal.simek,
	linux, hancock, linux-arm-kernel

From: Wei Yongjun <weiyongjun1@huawei.com>
Date: Wed, 6 Nov 2019 15:54:49 +0000

> In the DMA memory resource get failed case, the error is not
> set and 0 will be returned. Fix it by reove redundant check
> since devm_ioremap_resource() will handle it.
> 
> Fixes: 28ef9ebdb64c ("net: axienet: make use of axistream-connected attribute optional")
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>

Fixed with the commit message typo fixed.

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

* Re: [PATCH net-next] net: axienet: Fix error return code in axienet_probe()
@ 2019-11-07  5:24   ` David Miller
  0 siblings, 0 replies; 12+ messages in thread
From: David Miller @ 2019-11-07  5:24 UTC (permalink / raw)
  To: weiyongjun1
  Cc: netdev, radhey.shyam.pandey, kernel-janitors, michal.simek,
	linux, hancock, linux-arm-kernel

From: Wei Yongjun <weiyongjun1@huawei.com>
Date: Wed, 6 Nov 2019 15:54:49 +0000

> In the DMA memory resource get failed case, the error is not
> set and 0 will be returned. Fix it by reove redundant check
> since devm_ioremap_resource() will handle it.
> 
> Fixes: 28ef9ebdb64c ("net: axienet: make use of axistream-connected attribute optional")
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>

Fixed with the commit message typo fixed.

_______________________________________________
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] 12+ messages in thread

* Re: [PATCH net-next] net: axienet: Fix error return code in axienet_probe()
  2019-11-07  5:24   ` David Miller
  (?)
@ 2019-11-07  5:25     ` David Miller
  -1 siblings, 0 replies; 12+ messages in thread
From: David Miller @ 2019-11-07  5:25 UTC (permalink / raw)
  To: weiyongjun1
  Cc: radhey.shyam.pandey, michal.simek, linux, hancock, netdev,
	linux-arm-kernel, kernel-janitors

From: David Miller <davem@davemloft.net>
Date: Wed, 06 Nov 2019 21:24:41 -0800 (PST)

> From: Wei Yongjun <weiyongjun1@huawei.com>
> Date: Wed, 6 Nov 2019 15:54:49 +0000
> 
>> In the DMA memory resource get failed case, the error is not
>> set and 0 will be returned. Fix it by reove redundant check
>> since devm_ioremap_resource() will handle it.
>> 
>> Fixes: 28ef9ebdb64c ("net: axienet: make use of axistream-connected attribute optional")
>> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> 
> Fixed with the commit message typo fixed.

I meant "Applied with the commit message typo fixed." :-)

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

* Re: [PATCH net-next] net: axienet: Fix error return code in axienet_probe()
@ 2019-11-07  5:25     ` David Miller
  0 siblings, 0 replies; 12+ messages in thread
From: David Miller @ 2019-11-07  5:25 UTC (permalink / raw)
  To: weiyongjun1
  Cc: netdev, radhey.shyam.pandey, kernel-janitors, michal.simek,
	linux, hancock, linux-arm-kernel

From: David Miller <davem@davemloft.net>
Date: Wed, 06 Nov 2019 21:24:41 -0800 (PST)

> From: Wei Yongjun <weiyongjun1@huawei.com>
> Date: Wed, 6 Nov 2019 15:54:49 +0000
> 
>> In the DMA memory resource get failed case, the error is not
>> set and 0 will be returned. Fix it by reove redundant check
>> since devm_ioremap_resource() will handle it.
>> 
>> Fixes: 28ef9ebdb64c ("net: axienet: make use of axistream-connected attribute optional")
>> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> 
> Fixed with the commit message typo fixed.

I meant "Applied with the commit message typo fixed." :-)

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

* Re: [PATCH net-next] net: axienet: Fix error return code in axienet_probe()
@ 2019-11-07  5:25     ` David Miller
  0 siblings, 0 replies; 12+ messages in thread
From: David Miller @ 2019-11-07  5:25 UTC (permalink / raw)
  To: weiyongjun1
  Cc: netdev, radhey.shyam.pandey, kernel-janitors, michal.simek,
	linux, hancock, linux-arm-kernel

From: David Miller <davem@davemloft.net>
Date: Wed, 06 Nov 2019 21:24:41 -0800 (PST)

> From: Wei Yongjun <weiyongjun1@huawei.com>
> Date: Wed, 6 Nov 2019 15:54:49 +0000
> 
>> In the DMA memory resource get failed case, the error is not
>> set and 0 will be returned. Fix it by reove redundant check
>> since devm_ioremap_resource() will handle it.
>> 
>> Fixes: 28ef9ebdb64c ("net: axienet: make use of axistream-connected attribute optional")
>> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> 
> Fixed with the commit message typo fixed.

I meant "Applied with the commit message typo fixed." :-)

_______________________________________________
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] 12+ messages in thread

end of thread, other threads:[~2019-11-07  5:25 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-06 15:54 [PATCH net-next] net: axienet: Fix error return code in axienet_probe() Wei Yongjun
2019-11-06 15:54 ` Wei Yongjun
2019-11-06 15:54 ` Wei Yongjun
2019-11-06 16:59 ` Radhey Shyam Pandey
2019-11-06 16:59   ` Radhey Shyam Pandey
2019-11-06 16:59   ` Radhey Shyam Pandey
2019-11-07  5:24 ` David Miller
2019-11-07  5:24   ` David Miller
2019-11-07  5:24   ` David Miller
2019-11-07  5:25   ` David Miller
2019-11-07  5:25     ` David Miller
2019-11-07  5:25     ` David Miller

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.