From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933586AbbDILry (ORCPT ); Thu, 9 Apr 2015 07:47:54 -0400 Received: from mail-wg0-f47.google.com ([74.125.82.47]:34264 "EHLO mail-wg0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754996AbbDILrd (ORCPT ); Thu, 9 Apr 2015 07:47:33 -0400 From: Quentin Lambert To: "David S. Miller" , linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Cc: Quentin Lambert Subject: [PATCH 2/2] ide: replace GFP_ATOMIC by GFP_KERNEL Date: Thu, 9 Apr 2015 13:46:28 +0200 Message-Id: <1428579988-10167-3-git-send-email-lambert.quentin@gmail.com> X-Mailer: git-send-email 2.3.2 In-Reply-To: <1428579988-10167-1-git-send-email-lambert.quentin@gmail.com> References: <1428579988-10167-1-git-send-email-lambert.quentin@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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;