Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1162528imu; Tue, 11 Dec 2018 13:55:04 -0800 (PST) X-Google-Smtp-Source: AFSGD/VuyotuTK1J9Eil/5iGM+vKn3oxk6EVm+u8quQLTfifvf4YvhP43Ypp17huIsJGlFx/bX3h X-Received: by 2002:a17:902:b118:: with SMTP id q24mr17872599plr.209.1544565304015; Tue, 11 Dec 2018 13:55:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544565303; cv=none; d=google.com; s=arc-20160816; b=r1DM14zUGOO9UgzEPpRt0XN+UKtLCB+9vG5/ZT7YjVFdhslIiBNWeIPd3zRgkrZ1L9 DyGYfjOR+413NYF582bcJ5O9gs1M7yVqoXRqRIem6uJxTkcFRjwIr/uc7sPgWt+0DfDk JqDhuRtdThW/HtwbF8K+NeVgMIzul9u53ed441IMx4PqCxmyzrlc+dBESIu9el3keih+ ZuhZMX+zGhCp1ZVElonNTDrxk5NrIxz2U898MntnaRQzSp7npSEKWKp7a1yFlAAqDPE2 fKivqfof5WEOTmk2cwZPSPiIEzYxVaf+qIJmFCWW4FG5Cq/qg60+W6kS1I1Quj8ickd3 IMuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=4iNAYTw+5oqFyyzTQHdI60zXkOGgUyhw+emjW/uoGSk=; b=sk9EW/37ZvhlgUR1S9YXVQdCnZMtXbVci9NLw0ubxl5aUJy9dVQSsTb38e4ZhVeGar 80/9mSVU6REAAaKU40XYV9rvyaLsqyd4cFbzYa/TV5nNocGSldTkme3cbBw0Jfuq831F HKKOw9eugKceVifjjQ8Ws55B+ZtlWvrjlw39cchxKEpGAB2u2WOqEUEdxOxwK727AflU zpmw9Sb3329ttcTBHLIpNbFyB1Ku4Ib4uC6FGRUQ0t6urnzfPmeDNOtckSPRV5Zyoh4S CL8O3e1lT3nwABzbjeTZmRPVBi5uGQh3w9/36Fy2tLGMrj5kXReiimMvoXuW+TYm1aUk Rnsw== 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 p3si13364825plr.376.2018.12.11.13.54.49; Tue, 11 Dec 2018 13:55:03 -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 S1726354AbeLKVxV (ORCPT + 99 others); Tue, 11 Dec 2018 16:53:21 -0500 Received: from mail-qt1-f194.google.com ([209.85.160.194]:44884 "EHLO mail-qt1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726209AbeLKVxV (ORCPT ); Tue, 11 Dec 2018 16:53:21 -0500 Received: by mail-qt1-f194.google.com with SMTP id n32so18257474qte.11 for ; Tue, 11 Dec 2018 13:53:20 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=4iNAYTw+5oqFyyzTQHdI60zXkOGgUyhw+emjW/uoGSk=; b=WCj9K4ar4Ccjc/vik2pIZV4ZsmA7bbKnP8NGTFHjbAtFgL+kXrAm8SKzwvh9GiilTc QsgntNakhCbNoPruNbUBCtKWHsm7VsQ58ho7LOhQtYTCSO8ouBLHVIpBClnPUQ/rDdnw 2Uq2UWJYJ1K3gUKuZ4ruXgweHZtaIHnJVFtLOeJZ8Y6OaoXGOJ9p4AqqVOk1katN/n6F ag33D3PtrLu829KcmrULcV2FQSfx7h+t0X17y99+N5HxCV/zsntRTlwE/O/nFvS91s2o mYgm3AmsYQnmtdhhe7F1vdpct76MgxVEY0/ZZ3/GG+z+XeTx1BkuifQwRXeXTAF/sPtv fB3w== X-Gm-Message-State: AA+aEWZjcBRZcUo4yZ8Nx3YrhMjv77YhEFSEXIN905+kffO+8TUamfvz 9dT2TOW4ktm93nmcF7btc27c+qRuqVK9+oRWO1o= X-Received: by 2002:a0c:f50c:: with SMTP id j12mr16734587qvm.149.1544565200047; Tue, 11 Dec 2018 13:53:20 -0800 (PST) MIME-Version: 1.0 References: <20181211200526.3868586-1-arnd@arndb.de> <20181211201909.GA6478@redhat.com> <20181211213636.GB6478@redhat.com> In-Reply-To: From: Arnd Bergmann Date: Tue, 11 Dec 2018 22:53:03 +0100 Message-ID: Subject: Re: [PATCH] mm/mmu_notifier: fix mmu_notifier_range_init warning To: David Rientjes Cc: =?UTF-8?B?SsOpcsO0bWUgR2xpc3Nl?= , Andrew Morton , Stephen Rothwell , Michal Hocko , Mike Rapoport , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 11, 2018 at 10:43 PM David Rientjes wrote: > > On Tue, 11 Dec 2018, Jerome Glisse wrote: > > Hmm, strange that Arnd's build failure is only reporting about an unused > variable instead of MMU_NOTIFY_CLEAR being undefined :/ > > I think this should be done so that anybody using > mmu_notifier_range_init() doesn't need to worry about the implications of > *any* unused formal parameter as a result of how the #define is formed: Your patch below is more or less what I tried at first, and that resulted in another build failure for mm/hugetlb.c: mmu_notifier_range_init(&range, mm, start, end, MMU_NOTIFY_CLEAR); mm/hugetlb.c- adjust_range_if_pmd_sharing_possible(vma, &range.start, &range.end); where range.end refers to a nonexisting member of range. Arnd