From patchwork Fri Jun 15 19:17:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 10467457 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 590A260348 for ; Fri, 15 Jun 2018 19:17:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4A0AA28C46 for ; Fri, 15 Jun 2018 19:17:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3EA4128E48; Fri, 15 Jun 2018 19:17:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1C9F028C46 for ; Fri, 15 Jun 2018 19:17:20 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 908F36B0007; Fri, 15 Jun 2018 15:17:19 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 8EBC36B0008; Fri, 15 Jun 2018 15:17:19 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7CD626B000A; Fri, 15 Jun 2018 15:17:19 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pf0-f200.google.com (mail-pf0-f200.google.com [209.85.192.200]) by kanga.kvack.org (Postfix) with ESMTP id 3E5626B0007 for ; Fri, 15 Jun 2018 15:17:19 -0400 (EDT) Received: by mail-pf0-f200.google.com with SMTP id y8-v6so5058486pfl.17 for ; Fri, 15 Jun 2018 12:17:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-original-authentication-results:x-gm-message-state:date:from:to :cc:subject:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=+7cFz1ONT8P7yBWTc1GfmayK02N5BGobc6T/iCcIyjs=; b=JHg9zBByiMNe7jjZBssOzdQ8GnT561ueozDkEdKuQweck5MOugSjCW1ja9yLLABVdV /7DiWtGy9oItp9XmbaJUOrEMRTmRT2rC3Upt/Mp9Tph513sCqQKmi4kKftluGlQK4HRC ZdpYnKiosckT67VrUmhO5JpASxFfZjYxG6CClWSRaFsh0Tv9DUbao6JdXX7Uc9neainS qEwlN1yrmhCmoX8sHUMNZaIvpb5gwUx0VuNGvEUkBpnAX8pQtB+coD7iX0IhV9VGnWzt dWi3X15ZwXrY6EeKQxLm/E7QDDCKTKsjvFqM8T6XE3yI8264bpud3xi0NaC5nMtbETE5 RbLw== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of akpm@linux-foundation.org designates 140.211.169.12 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org X-Gm-Message-State: APt69E1wg5ZmZlqpNVRVcpVSFVQYFJnEiTePQhmSBB1ydkWl6S26Hmcg P69aP/oxe6q4ExpML9Etllwj+hWnCm9RSXT9ZoyXfA5JDGUZz1ih5FMO2Uhz89+9Xv9czrmmDcG hzLzQkmVH3yWqIsCEi81XER8b8TPqRRW7TqUUpWCff/WifFF8ZObU35agdcFV0ION+Q== X-Received: by 2002:a17:902:2702:: with SMTP id c2-v6mr3380633plb.297.1529090238907; Fri, 15 Jun 2018 12:17:18 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIW2L37BQI5m4fXnR+yH/RmwcRfUYQPN6BSxjYYKs8Nb4e46ybkOwLK+boJEB7g/ssw/wKl X-Received: by 2002:a17:902:2702:: with SMTP id c2-v6mr3380587plb.297.1529090238272; Fri, 15 Jun 2018 12:17:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529090238; cv=none; d=google.com; s=arc-20160816; b=HpAflOxJZWB0eHk4heP+X5WogSQm+vKojpEOsVjPZQiFAIRx4k72fYGgL3yM2osdTf z3MeSS4ZHrfRhntENfmOni0JCHIZovKJjJepuuoA69rbxjb19KUwFclFKDlUovciv5gO TGjpkPXBCBsiZphRWet4Dm8JTqA+dKg/FvPVzaBtJUaDI3OpvEXrYCPT0kEP/tma2n5q YXwSi1Wd7+KsZhlDZo0hPv2uMofw71nvhN0AIzRD1MHkVZbyiytW9l+BcxFQc3mh3cCT BLsvgOrkc4dj7BVpjTMVymD16aq9VF33SMdOCTzURXqA30mGDGHi3sVUZA9/Rgi3uGVb /gQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:arc-authentication-results; bh=+7cFz1ONT8P7yBWTc1GfmayK02N5BGobc6T/iCcIyjs=; b=kFBYwxhT9SYy1puuHIvIwTmUCEcAPuuzB5NaqPlJJ/bQq0jywbdkd53eXxnpRLORqY qHHf+846XRfMy1H1tSqK2oO/qUXuO+nKMwEkZ4ku9kk0GO7P7Ub7byDbgnMFWoJdOZ2h mUCFL5NGEtWzKongePwsUHoozeoaiUI27Wxc6hO9ddYGOOl8DzbhxH7h/126AC3EqXmk KHfSXbQBj8z9/oXSWPX9mM4k5LBHlgJA61LrXya4Slcw5gG8pt/ARcT3LT/WBj+vqDE6 BWwiQghbmaTK0UZ+7WlnHi9jEw6Nmy67FXUDen7JHFaig8ccfLTrqPC1avfqYN5JkhBO vBAw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of akpm@linux-foundation.org designates 140.211.169.12 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org Received: from mail.linuxfoundation.org (mail.linuxfoundation.org. [140.211.169.12]) by mx.google.com with ESMTPS id g4-v6si9979870plm.181.2018.06.15.12.17.18 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 15 Jun 2018 12:17:18 -0700 (PDT) Received-SPF: pass (google.com: domain of akpm@linux-foundation.org designates 140.211.169.12 as permitted sender) client-ip=140.211.169.12; Authentication-Results: mx.google.com; spf=pass (google.com: domain of akpm@linux-foundation.org designates 140.211.169.12 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org 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 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP 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: and I'm not sure which. I think I'll just revert $subject for now. --- 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