Thread (15 messages) flat view 15 messages, 4 authors, 2018-04-12

Re: [PATCH v3 2/2] mm: remove odd HAVE_PTE_SPECIAL

From: Michal Hocko <mhocko@kernel.org>
Date: 2018-04-11 08:49:46
Also in: linux-arm-kernel, linux-doc, linux-mm, linux-riscv, linux-sh, lkml, sparclinux

On Wed 11-04-18 10:41:23, Laurent Dufour wrote:
On 11/04/2018 10:33, Michal Hocko wrote:
quoted
On Wed 11-04-18 10:03:36, Laurent Dufour wrote:
quoted
@@ -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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help