* [PATCH RFC 1/2] ixp4xx_eth: avoid calling dma_pool_create() with NULL dev
@ 2012-11-18 6:25 Xi Wang
2012-11-18 6:25 ` [PATCH RFC 2/2] ixp4xx_hss: " Xi Wang
2012-11-20 20:13 ` [PATCH RFC 1/2] ixp4xx_eth: " David Miller
0 siblings, 2 replies; 4+ messages in thread
From: Xi Wang @ 2012-11-18 6:25 UTC (permalink / raw)
To: Krzysztof Halasa; +Cc: netdev, Xi Wang, Andrew Morton
Use &port->netdev->dev instead of NULL since dma_pool_create() doesn't
allow NULL dev.
Signed-off-by: Xi Wang <xi.wang@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
---
See also
https://lkml.org/lkml/2012/11/14/11
---
drivers/net/ethernet/xscale/ixp4xx_eth.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/xscale/ixp4xx_eth.c b/drivers/net/ethernet/xscale/ixp4xx_eth.c
index 98934bd..477d672 100644
--- a/drivers/net/ethernet/xscale/ixp4xx_eth.c
+++ b/drivers/net/ethernet/xscale/ixp4xx_eth.c
@@ -1102,10 +1102,12 @@ static int init_queues(struct port *port)
{
int i;
- if (!ports_open)
- if (!(dma_pool = dma_pool_create(DRV_NAME, NULL,
- POOL_ALLOC_SIZE, 32, 0)))
+ if (!ports_open) {
+ dma_pool = dma_pool_create(DRV_NAME, &port->netdev->dev,
+ POOL_ALLOC_SIZE, 32, 0);
+ if (!dma_pool)
return -ENOMEM;
+ }
if (!(port->desc_tab = dma_pool_alloc(dma_pool, GFP_KERNEL,
&port->desc_tab_phys)))
--
1.7.10.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH RFC 2/2] ixp4xx_hss: avoid calling dma_pool_create() with NULL dev
2012-11-18 6:25 [PATCH RFC 1/2] ixp4xx_eth: avoid calling dma_pool_create() with NULL dev Xi Wang
@ 2012-11-18 6:25 ` Xi Wang
2012-11-20 20:13 ` David Miller
2012-11-20 20:13 ` [PATCH RFC 1/2] ixp4xx_eth: " David Miller
1 sibling, 1 reply; 4+ messages in thread
From: Xi Wang @ 2012-11-18 6:25 UTC (permalink / raw)
To: Krzysztof Halasa; +Cc: netdev, Xi Wang, Andrew Morton
Use &port->netdev->dev instead of NULL since dma_pool_create() doesn't
allow NULL dev.
Signed-off-by: Xi Wang <xi.wang@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
---
See also
https://lkml.org/lkml/2012/11/14/11
---
drivers/net/wan/ixp4xx_hss.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/net/wan/ixp4xx_hss.c b/drivers/net/wan/ixp4xx_hss.c
index 3f575af..e9a3da5 100644
--- a/drivers/net/wan/ixp4xx_hss.c
+++ b/drivers/net/wan/ixp4xx_hss.c
@@ -969,10 +969,12 @@ static int init_hdlc_queues(struct port *port)
{
int i;
- if (!ports_open)
- if (!(dma_pool = dma_pool_create(DRV_NAME, NULL,
- POOL_ALLOC_SIZE, 32, 0)))
+ if (!ports_open) {
+ dma_pool = dma_pool_create(DRV_NAME, &port->netdev->dev,
+ POOL_ALLOC_SIZE, 32, 0);
+ if (!dma_pool)
return -ENOMEM;
+ }
if (!(port->desc_tab = dma_pool_alloc(dma_pool, GFP_KERNEL,
&port->desc_tab_phys)))
--
1.7.10.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH RFC 1/2] ixp4xx_eth: avoid calling dma_pool_create() with NULL dev
2012-11-18 6:25 [PATCH RFC 1/2] ixp4xx_eth: avoid calling dma_pool_create() with NULL dev Xi Wang
2012-11-18 6:25 ` [PATCH RFC 2/2] ixp4xx_hss: " Xi Wang
@ 2012-11-20 20:13 ` David Miller
1 sibling, 0 replies; 4+ messages in thread
From: David Miller @ 2012-11-20 20:13 UTC (permalink / raw)
To: xi.wang; +Cc: khc, netdev, akpm
From: Xi Wang <xi.wang@gmail.com>
Date: Sun, 18 Nov 2012 01:25:09 -0500
> Use &port->netdev->dev instead of NULL since dma_pool_create() doesn't
> allow NULL dev.
>
> Signed-off-by: Xi Wang <xi.wang@gmail.com>
> Cc: Andrew Morton <akpm@linux-foundation.org>
Applied.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH RFC 2/2] ixp4xx_hss: avoid calling dma_pool_create() with NULL dev
2012-11-18 6:25 ` [PATCH RFC 2/2] ixp4xx_hss: " Xi Wang
@ 2012-11-20 20:13 ` David Miller
0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2012-11-20 20:13 UTC (permalink / raw)
To: xi.wang; +Cc: khc, netdev, akpm
From: Xi Wang <xi.wang@gmail.com>
Date: Sun, 18 Nov 2012 01:25:10 -0500
> Use &port->netdev->dev instead of NULL since dma_pool_create() doesn't
> allow NULL dev.
>
> Signed-off-by: Xi Wang <xi.wang@gmail.com>
> Cc: Andrew Morton <akpm@linux-foundation.org>
Applied.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-11-20 20:13 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-18 6:25 [PATCH RFC 1/2] ixp4xx_eth: avoid calling dma_pool_create() with NULL dev Xi Wang
2012-11-18 6:25 ` [PATCH RFC 2/2] ixp4xx_hss: " Xi Wang
2012-11-20 20:13 ` David Miller
2012-11-20 20:13 ` [PATCH RFC 1/2] ixp4xx_eth: " 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).