From: Xi Wang <xi.wang@gmail.com>
To: Krzysztof Halasa <khc@pm.waw.pl>
Cc: netdev@vger.kernel.org, Xi Wang <xi.wang@gmail.com>,
Andrew Morton <akpm@linux-foundation.org>
Subject: [PATCH RFC 2/2] ixp4xx_hss: avoid calling dma_pool_create() with NULL dev
Date: Sun, 18 Nov 2012 01:25:10 -0500 [thread overview]
Message-ID: <1353219910-24690-2-git-send-email-xi.wang@gmail.com> (raw)
In-Reply-To: <1353219910-24690-1-git-send-email-xi.wang@gmail.com>
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
next prev parent reply other threads:[~2012-11-18 6:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2012-11-20 20:13 ` [PATCH RFC 2/2] ixp4xx_hss: " David Miller
2012-11-20 20:13 ` [PATCH RFC 1/2] ixp4xx_eth: " David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1353219910-24690-2-git-send-email-xi.wang@gmail.com \
--to=xi.wang@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=khc@pm.waw.pl \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).