Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp3050631imm; Thu, 24 May 2018 22:02:41 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrB42MkTVhSYedLYNiyEfAPNM0hawr5eyzpBeVhuDUEuiuRGO8lB7dTnNUPFuCorgs1ekd5 X-Received: by 2002:a17:902:369:: with SMTP id 96-v6mr1055953pld.64.1527224560953; Thu, 24 May 2018 22:02:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527224560; cv=none; d=google.com; s=arc-20160816; b=yC5edB+eAi9rcmaZlaa2TpTrzpG3ODExw/Mb/2OYcAlzMWwihlXp+iXh1/P4ha1YMp 9PuxP19nqYf/EeIPhS2htg7VLMtIv7RpRB0m+8EU9y3yUSVwG3SmSecSrvUeeeWGX3pV 4izIb/j0C96F0rze+BfcDpkPeSRBUR6sYMwZ3trSvBnDGR1iVRMVTQAISOwfZ1sI3ejE GLDn0hf3lWdUrjkTOAlg4FYnz2soXqMEWL+UlR6pXwEusN9SpIr8bYStkLFD0hGYczRB fHMO44+Bj3k79uirmoUf1+27+G2RyNO6UBfVcZacHrU+QIFXyxXLq1B7oN8OSYPpsp9Z lpPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :domainkey-signature:arc-authentication-results; bh=E/QFcEyQabQdU70LOvfQVbxVMx+EUqeJT8rBxxNIrbA=; b=lA7a21kHBtIjwcsGubi5faDB/4bpLmN/uR444vRIrFoTRiR+cDH4W9kuiz7DcG69dq ynScxY35raTZJQnpGizX93GqUa/SiTls8HMUCjV/Gm6+/bk8x3y7mMyIW9Gn2nCJ1Nhl D3sQAZjRNp5B39yoeS2E5ya9Yrs7HVnRieZCX+UoRIkPkCukD8YX8P3jbkWYopEhSNnP Yty2QRFu5pHv+mvSW7U+EOOsCxzOVdVp29WMhONyYxFMCPrBeIUhF6zIhoKFqMAWn7q+ kDRKRPwry4RRK4CXd38h6fDwnVbfYJ9tSOTMCSMSpAngmqQ9/ksDa8i4BAhtR474auSm Jkpg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y1-v6si18359468pge.248.2018.05.24.22.02.26; Thu, 24 May 2018 22:02:40 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935466AbeEYFAr (ORCPT + 99 others); Fri, 25 May 2018 01:00:47 -0400 Received: from sender-pp-092.zoho.com ([135.84.80.237]:25429 "EHLO sender-pp-092.zoho.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935256AbeEYFAp (ORCPT ); Fri, 25 May 2018 01:00:45 -0400 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=zapps768; d=zoho.com; h=from:to:cc:subject:date:message-id; b=e3rsvyG9gX+Yt0TuwWlxj6Vb88HCzNzbl2kNB0tNfK0eX6LSKImy1S2C2A02jwebPgJWLC+27gEi qFRqvrGM142uPYBzrczRol4upqxJ4OnFIqTmoUBQDa8i7UaJ4H/Z Received: from YEHS1XR956R00D1.lenovo.com (114.253.18.226 [114.253.18.226]) by mx.zohomail.com with SMTPS id 1527224435961118.978551210619; Thu, 24 May 2018 22:00:35 -0700 (PDT) From: Huaisheng Ye To: iommu@lists.linux-foundation.org Cc: linux-kernel@vger.kernel.org, x86@kernel.org, chengnt@lenovo.com, Huaisheng Ye , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Christoph Hellwig , Marek Szyprowski , Robin Murphy , Konrad Rzeszutek Wilk , Andrew Morton , Greg Kroah-Hartman , Tom Lendacky , Kate Stewart , Randy Dunlap , Michal Hocko Subject: [PATCH v1] arch/x86/kernel/pci-dma: Remove useless parameter of arch_dma_alloc_attrs Date: Fri, 25 May 2018 13:00:00 +0800 Message-Id: <20180525050000.6076-1-yehs2007@zoho.com> X-Mailer: git-send-email 2.17.0.windows.1 X-ZohoMailClient: External Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Huaisheng Ye arch_dma_alloc_attrs has parameter gfp which is not used at all. Remove it. Signed-off-by: Huaisheng Ye Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: Christoph Hellwig Cc: Marek Szyprowski Cc: Robin Murphy Cc: Konrad Rzeszutek Wilk Cc: Andrew Morton Cc: Greg Kroah-Hartman Cc: Tom Lendacky Cc: Kate Stewart Cc: Randy Dunlap Cc: Michal Hocko --- arch/x86/include/asm/dma-mapping.h | 2 +- arch/x86/kernel/pci-dma.c | 2 +- include/linux/dma-mapping.h | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/x86/include/asm/dma-mapping.h b/arch/x86/include/asm/dma-mapping.h index 89ce4bf..ef59747 100644 --- a/arch/x86/include/asm/dma-mapping.h +++ b/arch/x86/include/asm/dma-mapping.h @@ -33,7 +33,7 @@ static inline const struct dma_map_ops *get_arch_dma_ops(struct bus_type *bus) int arch_dma_supported(struct device *dev, u64 mask); #define arch_dma_supported arch_dma_supported -bool arch_dma_alloc_attrs(struct device **dev, gfp_t *gfp); +bool arch_dma_alloc_attrs(struct device **dev); #define arch_dma_alloc_attrs arch_dma_alloc_attrs #endif diff --git a/arch/x86/kernel/pci-dma.c b/arch/x86/kernel/pci-dma.c index 77625b6..94d1a49 100644 --- a/arch/x86/kernel/pci-dma.c +++ b/arch/x86/kernel/pci-dma.c @@ -76,7 +76,7 @@ void __init pci_iommu_alloc(void) } } -bool arch_dma_alloc_attrs(struct device **dev, gfp_t *gfp) +bool arch_dma_alloc_attrs(struct device **dev) { if (!*dev) *dev = &x86_dma_fallback_dev; diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h index f8ab1c0..c80bb09 100644 --- a/include/linux/dma-mapping.h +++ b/include/linux/dma-mapping.h @@ -502,7 +502,7 @@ void *dma_common_pages_remap(struct page **pages, size_t size, #define dma_get_sgtable(d, t, v, h, s) dma_get_sgtable_attrs(d, t, v, h, s, 0) #ifndef arch_dma_alloc_attrs -#define arch_dma_alloc_attrs(dev, flag) (true) +#define arch_dma_alloc_attrs(dev) (true) #endif static inline void *dma_alloc_attrs(struct device *dev, size_t size, @@ -521,7 +521,7 @@ static inline void *dma_alloc_attrs(struct device *dev, size_t size, /* let the implementation decide on the zone to allocate from: */ flag &= ~(__GFP_DMA | __GFP_DMA32 | __GFP_HIGHMEM); - if (!arch_dma_alloc_attrs(&dev, &flag)) + if (!arch_dma_alloc_attrs(&dev)) return NULL; if (!ops->alloc) return NULL; -- 1.8.3.1