Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp2410329pxb; Sat, 19 Feb 2022 10:29:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJw0jam3SSUWcZhbD2Pc72cswigwNWAvGygoYndlKyk3A6Ur5+1ak9KLoJ7vcglSZoQ4BCzQ X-Received: by 2002:a05:6a00:a8b:b0:4e1:52db:9e5c with SMTP id b11-20020a056a000a8b00b004e152db9e5cmr13012357pfl.38.1645295364519; Sat, 19 Feb 2022 10:29:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645295364; cv=none; d=google.com; s=arc-20160816; b=WEnRa9fHdZD6wURpIafPQLheZ0lAIoHK0kxMcvuLikprIpl3Y4xVb0QKqPaP2ZAQcd UxfGT64jbOvE8OkkERaqdnwzFN+IFEptVlpwdd88/frAmCOl8O1L3CmTlj8SAjGufvrQ KtBtChRrS5sHiC031Co49IRzQLG0ttCM2OrdNafnuHT1ZRTqQ8pOBAT4R5r8wYQVsci4 u1LRJ+Gd38+Vnw9GHmT1Iuk5h9tAgpCTv+D006I+P0aA4TCydU/snPpJFwxwHRZkIzC0 NqhZALKLdm2fWEum5tY756P2zJmq8i6/kqnhVYjHgNRH9C0gbfk33lUJ+jmiOF3uIrIb AP6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dkim-signature; bh=DZGh4bIHBOmHOiALkgVaQHB6FPGaLxO56EvLhQh60X4=; b=RaUP6dsylfUcb7yO57UFtTLI7ea4sWyJM0a9seuKmwZg1nY58U+N/9pV8LkOWvE7Wl JVpzTCgW6I5XgEmC7xi4KZBOTf3VNAGvN5EIRXP0ylsm05VIcHInUpEN/MepqD/3u3HN MgjDP253lLloJgAGafcd3PuqqhZlD2J+UKUiftUHUUMLcBfm7suUxPqMNTyU/jBKDPD5 htNAJg6c3QRyXI1er6ueKXzSYJ/QXg+xmuIDC5ZuTpndMnjd9LPIc2EXj5V919TNGC6p oWWcvfp5l0SOgif3diSOmsKxLpvDdIIrpuqVqzyK1b1nsFaBerVMeVF4CRCHuaIbDLye XN0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Z12fQk4s; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a5si5876895pfv.4.2022.02.19.10.29.04; Sat, 19 Feb 2022 10:29:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Z12fQk4s; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233237AbiBSA4R (ORCPT + 99 others); Fri, 18 Feb 2022 19:56:17 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:39838 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240863AbiBSAzu (ORCPT ); Fri, 18 Feb 2022 19:55:50 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 5E9AC27AFD9 for ; Fri, 18 Feb 2022 16:55:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1645232124; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:in-reply-to:in-reply-to:references:references; bh=DZGh4bIHBOmHOiALkgVaQHB6FPGaLxO56EvLhQh60X4=; b=Z12fQk4s/bSyJI6yHts5A5TNML9Sje2Ut/hKRx+05qk5L/EN9bLIqTMZ8pu/H2pp9qJJet cijPyg1wTOJl0HWjsE/08fnMCz7sZkNdpikVWdLkpWZu8S7v+Ehbp0BC6AqK5a/5Q5kQgN uojgFKHvOpSrU/AJiNkNo0PYteOqj6A= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-670-b_nDA3aCMyKcIv_TXZ3MAg-1; Fri, 18 Feb 2022 19:55:21 -0500 X-MC-Unique: b_nDA3aCMyKcIv_TXZ3MAg-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7B4341006AA0; Sat, 19 Feb 2022 00:55:18 +0000 (UTC) Received: from MiWiFi-R3L-srv.redhat.com (ovpn-12-39.pek2.redhat.com [10.72.12.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7366162D56; Sat, 19 Feb 2022 00:55:09 +0000 (UTC) From: Baoquan He To: linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org, akpm@linux-foundation.org, hch@lst.de, cl@linux.com, 42.hyeyoo@gmail.com, penberg@kernel.org, rientjes@google.com, iamjoonsoo.kim@lge.com, vbabka@suse.cz, David.Laight@ACULAB.COM, david@redhat.com, herbert@gondor.apana.org.au, davem@davemloft.net, linux-crypto@vger.kernel.org, steffen.klassert@secunet.com, netdev@vger.kernel.org, hca@linux.ibm.com, gor@linux.ibm.com, agordeev@linux.ibm.com, borntraeger@linux.ibm.com, svens@linux.ibm.com, linux-s390@vger.kernel.org, michael@walle.cc, linux-i2c@vger.kernel.org, wsa@kernel.org Subject: [PATCH 13/22] spi: atmel: Don't use GFP_DMA when calling dma_alloc_coherent() Date: Sat, 19 Feb 2022 08:52:12 +0800 Message-Id: <20220219005221.634-14-bhe@redhat.com> In-Reply-To: <20220219005221.634-1-bhe@redhat.com> References: <20220219005221.634-1-bhe@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org dma_alloc_coherent() allocates dma buffer with device's addressing limitation in mind. It's redundent to specify GFP_DMA when calling dma_alloc_coherent(). [ 42.hyeyoo@gmail.com: Update changelog ] Signed-off-by: Baoquan He Acked-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> --- drivers/spi/spi-atmel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/spi/spi-atmel.c b/drivers/spi/spi-atmel.c index 9e300a932699..271dacf3b7d2 100644 --- a/drivers/spi/spi-atmel.c +++ b/drivers/spi/spi-atmel.c @@ -1516,14 +1516,14 @@ static int atmel_spi_probe(struct platform_device *pdev) as->addr_rx_bbuf = dma_alloc_coherent(&pdev->dev, SPI_MAX_DMA_XFER, &as->dma_addr_rx_bbuf, - GFP_KERNEL | GFP_DMA); + GFP_KERNEL); if (!as->addr_rx_bbuf) { as->use_dma = false; } else { as->addr_tx_bbuf = dma_alloc_coherent(&pdev->dev, SPI_MAX_DMA_XFER, &as->dma_addr_tx_bbuf, - GFP_KERNEL | GFP_DMA); + GFP_KERNEL); if (!as->addr_tx_bbuf) { as->use_dma = false; dma_free_coherent(&pdev->dev, SPI_MAX_DMA_XFER, -- 2.17.2