From patchwork Tue Dec 11 20:04:43 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 153515 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp1034293ljp; Tue, 11 Dec 2018 12:06:19 -0800 (PST) X-Google-Smtp-Source: AFSGD/VdUcrHkYWYUKhRQsgzBWiok4k4EUoaWwIjP51/RuZl9g8dCRfJS2gWEddSJC6zE/gX+OYn X-Received: by 2002:a17:902:b707:: with SMTP id d7mr16429051pls.29.1544558779559; Tue, 11 Dec 2018 12:06:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544558779; cv=none; d=google.com; s=arc-20160816; b=OUi1foeEkzncz1drcLzqmYnXu80UbekeymdlekMsFOkbZSEZkhqQrftoSwKjEtbolw iOItsV/ARh72zxaEAdHekl0q9pbzIbhK+lZYwQGd9X1Z2QCA7k/lE3SvwiL3Ljfn2mNI 2iShfKAUuGpiYnWkmgDTUMjEPXR8oIH9Fwmg8G+fJXjjwkMdbzoD6rtuk7X6dottsQ2X GBkFVWZ0QRSeq8EV5CSmKXwgCG6nFcq29tbidV035+WhlgcSwPa8hC41hdqzVcel5f+q X7Lxz6PJXx5rfAPIVlfBHZlj8x7t/NTdP88drB745z2p88VI2Zj8WuLaPEi7xJwXQ7D2 HUCQ== 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 b12si13243694pls.32.2018.12.11.12.06.18; Tue, 11 Dec 2018 12:06:19 -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 S1726297AbeLKUGQ (ORCPT + 31 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?b?SsOpcsO0bWUgR2xp?= =?utf-8?q?sse?= 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 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(-) -- 2.20.0 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)