Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp1165493imm; Fri, 15 Jun 2018 12:19:03 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKZJb/LIivO9I4XMfo/mVIaPJxzhmGfFeNyJlsfPJPSIVMTK7fJQpdMOCf1gbSpC3nat3YX X-Received: by 2002:a62:701:: with SMTP id b1-v6mr3316099pfd.252.1529090343565; Fri, 15 Jun 2018 12:19:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529090343; cv=none; d=google.com; s=arc-20160816; b=ekMLMYfyeuhsem7TXPsEZqgXWnhnK9Qlw+MNMGb71sy3yxtxi+vcO8xZbF/78wQzhE uYxT66V0JJC6I8qsqCnhIm47EyeRQaEkG8KcrJysqf4CmDl09pxEVfpPKTFMkCoQZFL+ NiXX4nJ0zoHP8i5NXBx/JvlFi2mlFbUXYcQvMCS4w+es9zRchZTcYldnRDhEm94cuB1c ZSGOEr5jmC24HZMitfpUniv+inRVMFkpMafU5oTY+TWDtNu0+rtcECudj/PMzkdmchLC 4FZDK2t0LVvk40Fwnh8G0I1O+wtGQzBcXaJc2jmMXSZSdxrqLROorClYwHz10ocqLdG4 mZvA== 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 :references:in-reply-to:message-id:subject:cc:to:from:date :arc-authentication-results; bh=+7cFz1ONT8P7yBWTc1GfmayK02N5BGobc6T/iCcIyjs=; b=RTe/7vWsuCEFYg1971kgdvF0MSiIiLI4J5HgAStWkPWgpLUKvoeK8a7Ue/L3TTHmAE niMHHGL20UILzvYfJkyA9qV8jDqN/lEA8xNAkh3qxqAJ17bIORMaWI5Rf4ItEqoGyoF1 tI9g8uunQI0RaccFHuCKQHgaBs9pCxBNbXR8nyo8uwBvzs8vdIT9f1ndTlsboftn/CA4 dNxVrzo/Nmrjsgs+qu/F9PrZr547hYJ0zZA0Q1stQ9A1TsOotMDuqFQrEUPANaGdyCsG zMkN2nIdbYYjSUcITbDRiw+nAEd39ETaDQzQ/qBbh9kRDUquj5tzjsaJs7krQ+CLHLk3 6JMA== 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 d18-v6si9012749plr.265.2018.06.15.12.18.48; Fri, 15 Jun 2018 12:19:03 -0700 (PDT) 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 S965733AbeFOTRT (ORCPT + 99 others); Fri, 15 Jun 2018 15:17:19 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:55680 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S936269AbeFOTRS (ORCPT ); Fri, 15 Jun 2018 15:17:18 -0400 Received: from akpm3.svl.corp.google.com (unknown [104.133.9.92]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 9344DC7A; Fri, 15 Jun 2018 19:17:17 +0000 (UTC) Date: Fri, 15 Jun 2018 12:17:16 -0700 From: Andrew Morton To: Tony Luck Cc: Mathieu Malaterre , linux-mm@kvack.org, Linux Kernel Mailing List Subject: Re: [PATCH] mm/memblock: add missing include Message-Id: <20180615121716.37fb93385825b0b2f59240cc@linux-foundation.org> In-Reply-To: References: <20180606194144.16990-1-malat@debian.org> X-Mailer: Sylpheed 3.6.0 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 15 Jun 2018 11:59:10 -0700 Tony Luck wrote: > On Wed, Jun 6, 2018 at 12:41 PM, Mathieu Malaterre wrote: > > Commit 26f09e9b3a06 ("mm/memblock: add memblock memory allocation apis") > > introduced two new function definitions: > > ‘memblock_virt_alloc_try_nid_nopanic’ > > and > > ‘memblock_virt_alloc_try_nid’. > > Commit ea1f5f3712af ("mm: define memblock_virt_alloc_try_nid_raw") > > introduced the following function definition: > > ‘memblock_virt_alloc_try_nid_raw’ > > > > This commit adds an includeof header file to provide the > > missing function prototypes. Silence the following gcc warning (W=1): > > > > mm/memblock.c:1334:15: warning: no previous prototype for ‘memblock_virt_alloc_try_nid_raw’ [-Wmissing-prototypes] > > mm/memblock.c:1371:15: warning: no previous prototype for ‘memblock_virt_alloc_try_nid_nopanic’ [-Wmissing-prototypes] > > mm/memblock.c:1407:15: warning: no previous prototype for ‘memblock_virt_alloc_try_nid’ [-Wmissing-prototypes] > > > > Signed-off-by: Mathieu Malaterre > > Sadly that breaks ia64 build: > > CC mm/memblock.o > mm/memblock.c:1340: error: redefinition of ‘memblock_virt_alloc_try_nid_raw’ > ./include/linux/bootmem.h:335: error: previous definition of > ‘memblock_virt_alloc_try_nid_raw’ was here > mm/memblock.c:1377: error: redefinition of ‘memblock_virt_alloc_try_nid_nopanic’ > ./include/linux/bootmem.h:343: error: previous definition of > ‘memblock_virt_alloc_try_nid_nopanic’ was here > mm/memblock.c:1413: error: redefinition of ‘memblock_virt_alloc_try_nid’ > ./include/linux/bootmem.h:327: error: previous definition of > ‘memblock_virt_alloc_try_nid’ was here > make[1]: *** [mm/memblock.o] Error 1 > make: *** [mm/memblock.o] Error 2 Huh. How did that ever work. I guess it's either this: --- a/mm/Makefile~a +++ a/mm/Makefile @@ -45,6 +45,7 @@ obj-y += init-mm.o ifdef CONFIG_NO_BOOTMEM obj-y += nobootmem.o + obj-$(CONFIG_HAVE_MEMBLOCK) += memblock.o else obj-y += bootmem.o endif @@ -53,7 +54,6 @@ obj-$(CONFIG_ADVISE_SYSCALLS) += fadvise ifdef CONFIG_MMU obj-$(CONFIG_ADVISE_SYSCALLS) += madvise.o endif -obj-$(CONFIG_HAVE_MEMBLOCK) += memblock.o obj-$(CONFIG_SWAP) += page_io.o swap_state.o swapfile.o swap_slots.o obj-$(CONFIG_FRONTSWAP) += frontswap.o or this: --- a/include/linux/bootmem.h~a +++ a/include/linux/bootmem.h @@ -154,7 +154,7 @@ extern void *__alloc_bootmem_low_node(pg __alloc_bootmem_low_node(pgdat, x, PAGE_SIZE, 0) -#if defined(CONFIG_HAVE_MEMBLOCK) && defined(CONFIG_NO_BOOTMEM) +#if defined(CONFIG_HAVE_MEMBLOCK) /* FIXME: use MEMBLOCK_ALLOC_* variants here */ #define BOOTMEM_ALLOC_ACCESSIBLE 0 and I'm not sure which. I think I'll just revert $subject for now.