Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1066389imu; Tue, 11 Dec 2018 12:07:38 -0800 (PST) X-Google-Smtp-Source: AFSGD/VoOja+f9EW5cDBBQxdcPScznyk2K8YCHRNQ/77kW7uHpup0vScQYQeNvx/53NzRfqmX5yW X-Received: by 2002:a62:870e:: with SMTP id i14mr18059736pfe.41.1544558858283; Tue, 11 Dec 2018 12:07:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544558858; cv=none; d=google.com; s=arc-20160816; b=E0FrIYWC9BrRCjv8dFtezU3EFCZreTx+fVjNq8hz9BqgJLjpF4Z7go5enYirfjTTcO ENe7sm8BkPahjG0OE+dETFYYsTJONmzoax3O14Y2cjiTL9Y4J/wNnc/3NHNO0OM77dGP rkGXhs7f8wzxvtchYQ3br8qxuF9V9q5qsdMLV3C2WCZvIJBHgzxaHXFK6Fn4mXemddzG Jj1+78D1VX9J/T8QcIjHBLMk4CJynGMr1Nf6P+nM2tnBhNoxoUyivbXkJKR1oE6fAryA mW6fCU8sT0XhRYY/vKhqGTDyGieqNBpnpawU7RjZ5hcSfGfHUzqtJD/GxBE77Ghb9iBb UA9w== 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 :message-id:date:subject:cc:to:from; bh=Wfr2Bpi886zZIL+Xb43MLxNQJezLmuTszs6JTIaFkec=; b=AFVnrW4GENY2aSFOImTBikk9JmREXeXPZxUva6dZFaA/dXRWnX2VXjNMg9DBQjeSYL R0ycNfT+lCPVsSvoBggkl70eO9CYPi1Y4gh7RuFNpgNczl6KItvmD7eVIaFNSQf8hh9H RJ1IPGzPEZTm9RnbS90cxAfs9SCDC8syGe2kSM5Vc8pmIxxMHTvDG6OObRJ/ceoREq34 O+aQeN+Efji470+zICawoZiX6+h6E+qoCJqDnJVBmYPCjkavVGaQE6JpzQXt8TkNwUvh B+5ycX/mhv7W/W51wsglGxx0tJrYUMmFoZI1KJSB1emPhe8jrCMJFRSTaUl3Ky/olsZW PcNw== 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 j20si11968730pgg.162.2018.12.11.12.07.23; Tue, 11 Dec 2018 12:07:38 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726211AbeLKUGQ (ORCPT + 99 others); Tue, 11 Dec 2018 15:06:16 -0500 Received: from mout.kundenserver.de ([212.227.126.130]:42815 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726125AbeLKUGQ (ORCPT ); Tue, 11 Dec 2018 15:06:16 -0500 Received: from wuerfel.lan ([109.192.41.194]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.129]) with ESMTPA (Nemesis) id 1MJEMt-1grUtW2az5-00Kk4w; Tue, 11 Dec 2018 21:05:29 +0100 From: Arnd Bergmann To: Andrew Morton , =?UTF-8?q?J=C3=A9r=C3=B4me=20Glisse?= Cc: Arnd Bergmann , Stephen Rothwell , Michal Hocko , Mike Rapoport , David Rientjes , linux-kernel@vger.kernel.org Subject: [PATCH] mm/mmu_notifier: fix mmu_notifier_range_init warning Date: Tue, 11 Dec 2018 21:04:43 +0100 Message-Id: <20181211200526.3868586-1-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:1MkcEApk+eXxquabhdLak8+/CEQwfqjWwL9KHXt8d14hBX7aRFV n20GdNsInfN2uBT80nbrsTwwpW2EGb1WGABGmcv+pfdLL/kh4+qtlJmaZDHf1/3G9Dk4kM6 7R0QHqVJ36mV8wl1Y0oWXQYLXlGSByoglDxKDn0Fnd09MwYjSFAbm/YYBgUbnnzKmP+rfVx /qvAIHUwkbQJjFlnjNnhA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:nD4ZS/AeEqc=:HaU6cQ914RV1gbo3pr93+3 GiP2vc4XFTHNQXp5Ld8hq9Ik++AtNzwaGb4p++wVGNDKQi1DC4VXCs5jzCJAA31McvQ5vnmDe hnNL6fXeZxOYtp8KaqU/v+xEmESaSNRVNfFzmGys1XHAvMl4WQx8gK+RTqrKAkykZsssmu15C QTIQeB/ZDvjUvkpSeJWR+YHuzwatlowwTJd1JMrQPZzAYO9dneP8OB2JULvNwPZyHAHZIt4nw zV9WkavQfkiW/Y/O7Py2v0llKpLd7kjSnQXAN/r5uovQ2CBUrCmb9sXzzCQDDp64A4YtgYGrW o2yMf7IrFwPpXMtJcA6cX6k03bTmF10EPI9y3/zr+tWG0w0QCQUKC/dH61woEIHuogny8iED7 w7q29xfskQSeRT2LvNAzrS+eGbswe9+kgvj7kwrm9M2bx5jDs7wkLV6WjGdIcdWNyilTytDIE sinJebFU6+DuIr2E4sr711jYbWQL/Vl9THQRvygqk3ASaJjFKnEshW0rWEpMzfD1N/vmIievK 2R6UdLVLd9y+Jdtj1vP+bndPXL1BeSJuNvuUuPcwNdYVyQQ8zESXe8IVOoxI+f+3Vr2JDTEsK 41B518WB3RxCfFGebPgHE0rb/74FH00hymCVJxOJ68Lfk51z768hlRGPc2OXmIdRvwrQe5Yie KdYUOTc5Tfh/17UwFxND2qgA86kF5isOzNdvSxY12tLtstcP4DfvMDD1sshx8Q4QgcAXn3l7h SEdjNxY3uL3b60S1Nh0JuEXOin1NR0HamuDlrQ== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The macro version of mmu_notifier_range_init() for CONFIG_MMU_NOTIFIER=n does not evaluate all its arguments, leading to a warning in one case: mm/migrate.c: In function 'migrate_vma_pages': mm/migrate.c:2711:20: error: unused variable 'mm' [-Werror=unused-variable] struct mm_struct *mm = vma->vm_mm; Pass down the 'mm' as into the inline function as well so gcc can see why the variable exists. Fixes: 137d92bd73b1 ("mm/mmu_notifier: use structure for invalidate_range_start/end calls v2") Signed-off-by: Arnd Bergmann --- include/linux/mmu_notifier.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/linux/mmu_notifier.h b/include/linux/mmu_notifier.h index 29f7b9670ba3..b13ea00ded5d 100644 --- a/include/linux/mmu_notifier.h +++ b/include/linux/mmu_notifier.h @@ -476,6 +476,7 @@ struct mmu_notifier_range { }; static inline void _mmu_notifier_range_init(struct mmu_notifier_range *range, + struct mm_struct *mm, unsigned long start, unsigned long end) { @@ -484,7 +485,7 @@ static inline void _mmu_notifier_range_init(struct mmu_notifier_range *range, } #define mmu_notifier_range_init(range, mm, start, end, event) \ - _mmu_notifier_range_init(range, start, end) + _mmu_notifier_range_init(range, mm, start, end) static inline int mm_has_notifiers(struct mm_struct *mm) -- 2.20.0