linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Quentin Lambert <lambert.quentin@gmail.com>
To: "David S. Miller" <davem@davemloft.net>,
	linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org,
	kernel-janitors@vger.kernel.org
Cc: Quentin Lambert <lambert.quentin@gmail.com>
Subject: [PATCH 2/2] ide: replace GFP_ATOMIC by GFP_KERNEL
Date: Thu,  9 Apr 2015 13:46:28 +0200	[thread overview]
Message-ID: <1428579988-10167-3-git-send-email-lambert.quentin@gmail.com> (raw)
In-Reply-To: <1428579988-10167-1-git-send-email-lambert.quentin@gmail.com>

Both pmac_ide_init_dma and ide_dma_sgiioc4 are stored in the init_dma field of
an ide_port_info structure. This field seems to only be called from contexts
where sleep is allowed. Therefore, this patch replaces uses of GFP_ATOMIC by
GFP_KERNEL.

Signed-off-by: Quentin Lambert <lambert.quentin@gmail.com>
---
 drivers/ide/pmac.c    |    2 +-
 drivers/ide/sgiioc4.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/ide/pmac.c
+++ b/drivers/ide/pmac.c
@@ -1691,7 +1691,7 @@ static int pmac_ide_init_dma(ide_hwif_t
 	 */
 	pmif->dma_table_cpu = dma_alloc_coherent(&dev->dev,
 		(MAX_DCMDS + 2) * sizeof(struct dbdma_cmd),
-		&hwif->dmatable_dma, GFP_ATOMIC);
+		&hwif->dmatable_dma, GFP_KERNEL);
 	if (pmif->dma_table_cpu == NULL) {
 		printk(KERN_ERR "%s: unable to allocate DMA command list\n",
 		       hwif->name);
--- a/drivers/ide/sgiioc4.c
+++ b/drivers/ide/sgiioc4.c
@@ -335,7 +335,7 @@ static int ide_dma_sgiioc4(ide_hwif_t *h
 		goto dma_pci_alloc_failure;
 
 	pad = dma_alloc_coherent(&dev->dev, IOC4_IDE_CACHELINE_SIZE,
-				   (dma_addr_t *)&hwif->extra_base, GFP_ATOMIC);
+				   (dma_addr_t *)&hwif->extra_base, GFP_KERNEL);
 	if (pad) {
 		ide_set_hwifdata(hwif, pad);
 		return 0;

  parent reply	other threads:[~2015-04-09 11:46 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-09 11:46 [PATCH 0/2] pci to dma Quentin Lambert
2015-04-09 11:46 ` [PATCH 1/2] ide: remove deprecated use of pci api Quentin Lambert
2015-04-09 12:35   ` Dan Carpenter
2015-04-13 12:25   ` One Thousand Gnomes
2015-04-13 17:08     ` David Miller
2015-04-13 17:23       ` Dan Carpenter
2015-04-13 17:39         ` David Miller
2015-04-09 11:46 ` Quentin Lambert [this message]
2015-04-09 12:36   ` [PATCH 2/2] ide: replace GFP_ATOMIC by GFP_KERNEL Dan Carpenter
2015-04-09 14:33     ` Quentin Lambert
2015-04-09 14:40       ` Dan Carpenter
2015-04-09 14:50       ` Dan Carpenter
2015-04-09 14:51         ` Quentin Lambert
2015-04-09 14:53         ` Julia Lawall
2015-04-09 15:13           ` Dan Carpenter

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=1428579988-10167-3-git-send-email-lambert.quentin@gmail.com \
    --to=lambert.quentin@gmail.com \
    --cc=davem@davemloft.net \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@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).