Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp1953682imj; Sun, 10 Feb 2019 14:35:04 -0800 (PST) X-Google-Smtp-Source: AHgI3IbcfGgPaop+ktp+kt0UpBZPG/UF70wnI/G6J/eusItz17RKbF706d5h4JCx4wJWXPV6Ga76 X-Received: by 2002:a17:902:6acc:: with SMTP id i12mr33910419plt.148.1549838104180; Sun, 10 Feb 2019 14:35:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549838104; cv=none; d=google.com; s=arc-20160816; b=ai+qUi1ixdnJsmyU930PMhGaI0EtgWcelc64Dpl2Zuk6nkI4wceLke4oUHWCRLEuDE sSBy+KcLsaBJoVcIAONA461vZZa+ahrRV+hxI3trtwaZCVYlDfpFdcuG6LZgJUAFTSYf drWy5iqncg6r1+ObjJ5fEfMppty2pYBPHlOudEQJL9g+WUNUS8+9BOzENgHLMNCkgaRg QitBBElNv3jLQ31Lx5oKVayT6Fk3KFD3Stdqb4KLOpKlK4hc1XXrzfSmiFYHRFXtLfDq Z6lXtaw8nQCLqLREfa+7aufsrNBXRTl+QURhF29J/OgFg3Dy0/qBf7B2FrMmfXKDnf6g /WHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=C3JT8DoB1yulYYIE3Nc8T8CrrkCjzwNPFcDNpNG9Oyo=; b=qWHtHeS9P8+bErZS+kBTXPI4imUnt/Op53qEWOj3qjPPDNMWm8Z47sP/4QxxDkBuVP AIyjbRWUezHidUI+K1RnDvFdFPJuVB+es7w2vX1DPzRm6ZlyzA1kyGkF3Ck0yQn0l1sE 4TROcHlKYbK1ZQLGUdkZlwwsI/esEvaPLYeHBg6T4FVavZPAaaLagGVUCRI3RU01lj70 LNzzJkFlA4EvZGiYOqU0FJxBjNTasrKBYTOrJXutdNYEizKAvQ3id7IeOHvZohpZ1/cW f4HZ6J4yl3FO5gJET3yrk9hvd0ADZzO9oGsHIA4N72JIRPLki8zGaMehcl0qbsyjq+Kv LYlQ== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g3si7598410pgq.61.2019.02.10.14.34.47; Sun, 10 Feb 2019 14:35:04 -0800 (PST) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726191AbfBJWej (ORCPT + 99 others); Sun, 10 Feb 2019 17:34:39 -0500 Received: from mga01.intel.com ([192.55.52.88]:3922 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726093AbfBJWei (ORCPT ); Sun, 10 Feb 2019 17:34:38 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Feb 2019 14:34:38 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,356,1544515200"; d="scan'208";a="143135415" Received: from iweiny-desk2.sc.intel.com ([10.3.52.157]) by fmsmga004.fm.intel.com with ESMTP; 10 Feb 2019 14:34:38 -0800 From: ira.weiny@intel.com To: Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org Cc: "Kirill A. Shutemov" , Dave Hansen , Andrew Morton , Dan Williams , Ira Weiny Subject: [PATCH V2] mm/gup: Remove write argument in gup_fast_permitted() Date: Sun, 10 Feb 2019 14:34:24 -0800 Message-Id: <20190210223424.13934-1-ira.weiny@intel.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190209173109.9361-1-ira.weiny@intel.com> References: <20190209173109.9361-1-ira.weiny@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ira Weiny The write argument is unused in gup_fast_permitted() so remove it. Acked-by: Kirill A. Shutemov Signed-off-by: Ira Weiny --- Changes since V1 Clean up commit message arch/x86/include/asm/pgtable_64.h | 3 +-- mm/gup.c | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/arch/x86/include/asm/pgtable_64.h b/arch/x86/include/asm/pgtable_64.h index 9c85b54bf03c..0bb566315621 100644 --- a/arch/x86/include/asm/pgtable_64.h +++ b/arch/x86/include/asm/pgtable_64.h @@ -259,8 +259,7 @@ extern void init_extra_mapping_uc(unsigned long phys, unsigned long size); extern void init_extra_mapping_wb(unsigned long phys, unsigned long size); #define gup_fast_permitted gup_fast_permitted -static inline bool gup_fast_permitted(unsigned long start, int nr_pages, - int write) +static inline bool gup_fast_permitted(unsigned long start, int nr_pages) { unsigned long len, end; diff --git a/mm/gup.c b/mm/gup.c index 05acd7e2eb22..b63e88eca31b 100644 --- a/mm/gup.c +++ b/mm/gup.c @@ -1786,7 +1786,7 @@ static void gup_pgd_range(unsigned long addr, unsigned long end, * Check if it's allowed to use __get_user_pages_fast() for the range, or * we need to fall back to the slow version: */ -bool gup_fast_permitted(unsigned long start, int nr_pages, int write) +bool gup_fast_permitted(unsigned long start, int nr_pages) { unsigned long len, end; @@ -1828,7 +1828,7 @@ int __get_user_pages_fast(unsigned long start, int nr_pages, int write, * block IPIs that come from THPs splitting. */ - if (gup_fast_permitted(start, nr_pages, write)) { + if (gup_fast_permitted(start, nr_pages)) { local_irq_save(flags); gup_pgd_range(start, end, write, pages, &nr); local_irq_restore(flags); @@ -1870,7 +1870,7 @@ int get_user_pages_fast(unsigned long start, int nr_pages, int write, if (unlikely(!access_ok((void __user *)start, len))) return -EFAULT; - if (gup_fast_permitted(start, nr_pages, write)) { + if (gup_fast_permitted(start, nr_pages)) { local_irq_disable(); gup_pgd_range(addr, end, write, pages, &nr); local_irq_enable(); -- 2.20.1