From patchwork Mon Jul 2 13:19:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinod Koul X-Patchwork-Id: 10501345 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0343D6028F for ; Mon, 2 Jul 2018 13:20:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E8EB128A8C for ; Mon, 2 Jul 2018 13:20:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E722A28A9C; Mon, 2 Jul 2018 13:20:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 93DF328A8C for ; Mon, 2 Jul 2018 13:20:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752167AbeGBNU0 (ORCPT ); Mon, 2 Jul 2018 09:20:26 -0400 Received: from mail.kernel.org ([198.145.29.99]:60996 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751878AbeGBNUZ (ORCPT ); Mon, 2 Jul 2018 09:20:25 -0400 Received: from localhost.localdomain (unknown [122.167.89.144]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D5C0325447; Mon, 2 Jul 2018 13:20:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1530537625; bh=bYrf9T+EwHiwH5or/YhIaybgSqoj6S5gVjQmGruZrw4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xGkbrKoiufihIriLNA9Zl7KK8mhH1DziOaI3qjgnPX9kL+baXr/QAILSBRSjZHtGu ZBE2NIuPk2F3HvqE2j9S7TLiN48qbqPcNAoDAv1h3PQMdNgLRz38KVuHczdJn5Ht2E X80NVEE8cKC7SyxZLdjpqat+IIYOfZvwqgBJd/g8= From: Vinod Koul To: dmaengine@vger.kernel.org Cc: Robin Gong , Sascha Hauer , Lucas Stach , Vinod Koul Subject: [PATCH 2/3] dmaengine: imx-sdma: Use GFP_NOWAIT for dma allocations Date: Mon, 2 Jul 2018 18:49:38 +0530 Message-Id: <20180702131939.31481-2-vkoul@kernel.org> X-Mailer: git-send-email 2.14.4 In-Reply-To: <20180702131939.31481-1-vkoul@kernel.org> References: <20180702131939.31481-1-vkoul@kernel.org> Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The memory allocation in DMA callbacks should use GFP_NOWAIT, so update this one and fix code alignment for this call while at it. Signed-off-by: Vinod Koul --- drivers/dma/imx-sdma.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c index d650065f42dd..dfd1fbbe7ba8 100644 --- a/drivers/dma/imx-sdma.c +++ b/drivers/dma/imx-sdma.c @@ -1157,8 +1157,8 @@ static int sdma_alloc_bd(struct sdma_desc *desc) { int ret = 0; - desc->bd = dma_pool_alloc(desc->sdmac->bd_pool, GFP_ATOMIC, - &desc->bd_phys); + desc->bd = dma_pool_alloc(desc->sdmac->bd_pool, GFP_NOWAIT, + &desc->bd_phys); if (!desc->bd) { ret = -ENOMEM; goto out;