[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180411084936.GC23400@dhcp22.suse.cz>
Date: Wed, 11 Apr 2018 10:49:36 +0200
From: Michal Hocko <mhocko@...nel.org>
To: Laurent Dufour <ldufour@...ux.vnet.ibm.com>
Cc: linux-kernel@...r.kernel.org, linux-mm@...ck.org,
linuxppc-dev@...ts.ozlabs.org, x86@...nel.org,
linux-doc@...r.kernel.org, linux-snps-arc@...ts.infradead.org,
linux-arm-kernel@...ts.infradead.org,
linux-riscv@...ts.infradead.org, linux-s390@...r.kernel.org,
linux-sh@...r.kernel.org, sparclinux@...r.kernel.org,
Jerome Glisse <jglisse@...hat.com>,
aneesh.kumar@...ux.vnet.ibm.com, akpm@...ux-foundation.org,
mpe@...erman.id.au, benh@...nel.crashing.org, paulus@...ba.org,
Jonathan Corbet <corbet@....net>,
Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will.deacon@....com>,
Yoshinori Sato <ysato@...rs.sourceforge.jp>,
Rich Felker <dalias@...c.org>,
"David S . Miller" <davem@...emloft.net>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
Vineet Gupta <vgupta@...opsys.com>,
Palmer Dabbelt <palmer@...ive.com>,
Albert Ou <albert@...ive.com>,
Martin Schwidefsky <schwidefsky@...ibm.com>,
Heiko Carstens <heiko.carstens@...ibm.com>,
David Rientjes <rientjes@...gle.com>,
Robin Murphy <robin.murphy@....com>
Subject: Re: [PATCH v3 2/2] mm: remove odd HAVE_PTE_SPECIAL
On Wed 11-04-18 10:41:23, Laurent Dufour wrote:
> On 11/04/2018 10:33, Michal Hocko wrote:
> > On Wed 11-04-18 10:03:36, Laurent Dufour wrote:
> >> @@ -881,7 +876,8 @@ struct page *_vm_normal_page(struct vm_area_struct *vma, unsigned long addr,
> >>
> >> if (is_zero_pfn(pfn))
> >> return NULL;
> >> -check_pfn:
> >> +
> >> +check_pfn: __maybe_unused
> >> if (unlikely(pfn > highest_memmap_pfn)) {
> >> print_bad_pte(vma, addr, pte, NULL);
> >> return NULL;
> >> @@ -891,7 +887,7 @@ struct page *_vm_normal_page(struct vm_area_struct *vma, unsigned long addr,
> >> * NOTE! We still have PageReserved() pages in the page tables.
> >> * eg. VDSO mappings can cause them to exist.
> >> */
> >> -out:
> >> +out: __maybe_unused
> >> return pfn_to_page(pfn);
> >
> > Why do we need this ugliness all of the sudden?
> Indeed the compiler doesn't complaint but in theory it should since these
> labels are not used depending on CONFIG_ARCH_HAS_PTE_SPECIAL.
Well, such a warning would be quite pointless so I would rather not make
the code ugly. The value of unused label is quite questionable to start
with...
--
Michal Hocko
SUSE Labs
Powered by blists - more mailing lists