From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752410AbeDKItq (ORCPT ); Wed, 11 Apr 2018 04:49:46 -0400 Received: from mx2.suse.de ([195.135.220.15]:56781 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750825AbeDKItl (ORCPT ); Wed, 11 Apr 2018 04:49:41 -0400 Date: Wed, 11 Apr 2018 10:49:36 +0200 From: Michal Hocko To: Laurent Dufour Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, linuxppc-dev@lists.ozlabs.org, x86@kernel.org, linux-doc@vger.kernel.org, linux-snps-arc@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, Jerome Glisse , aneesh.kumar@linux.vnet.ibm.com, akpm@linux-foundation.org, mpe@ellerman.id.au, benh@kernel.crashing.org, paulus@samba.org, Jonathan Corbet , Catalin Marinas , Will Deacon , Yoshinori Sato , Rich Felker , "David S . Miller" , Thomas Gleixner , Ingo Molnar , Vineet Gupta , Palmer Dabbelt , Albert Ou , Martin Schwidefsky , Heiko Carstens , David Rientjes , Robin Murphy Subject: Re: [PATCH v3 2/2] mm: remove odd HAVE_PTE_SPECIAL Message-ID: <20180411084936.GC23400@dhcp22.suse.cz> References: <1523433816-14460-1-git-send-email-ldufour@linux.vnet.ibm.com> <1523433816-14460-3-git-send-email-ldufour@linux.vnet.ibm.com> <20180411083315.GA23400@dhcp22.suse.cz> <5bd1bb46-8f71-e6db-7fb7-43d023a37f58@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5bd1bb46-8f71-e6db-7fb7-43d023a37f58@linux.vnet.ibm.com> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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