Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp4134954imm; Mon, 25 Jun 2018 10:16:36 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKMGg9wVrncN/7SFuEwjKbjt2rpQxzK4NSQLvPaeUa3fx3vmv0u9TL/8gMHdMxLnXEQ789d X-Received: by 2002:a62:4015:: with SMTP id n21-v6mr10908967pfa.198.1529946996298; Mon, 25 Jun 2018 10:16:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529946996; cv=none; d=google.com; s=arc-20160816; b=EFm24XUtnVa0VdY6RrqVf6SNcHVcYj+v3sR33s5li2Py33H0omEZ+/LITUksWXWFg/ FVowutBH3+KB57XTsJjfiWIrR64eooP828kcJBuw/hNu8JYEE5LyjC1Z67XeFd43YAvm o8KliWIKzTHX6Q+FYgyVJ6fVV6FD3oGJwC3D0QOPmNEpdLV+3H0TzQ8pOjYF88Sc1id6 Dvhqhx0KukONIOgwyCH4BnG17UBPn3ltKi3k2Eidvl58Vs7Lpx5yQc+w88ZQCYdht2Qf +xn+yYqp63NTWext1wIkYsN5qk55UCI0thnHWhQCNaH7sGSlCN0DvWa604AIko2TsiW5 9Gpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=gxP2DHPoQcAC9ByHdNoaj6eoO27/6dRlpCnrsVK4IE4=; b=To/8PME9gR+T+2VmeZRCgriIeF9zyAI8BBbyCMhmV1BsrI2A9HFXkkqLOtB0fpqjeK 9yWOeSHFBEzztk8d7azSHXf1EvE4qf4zheTkOyhdSH93UcxEAFfNUSj+lJF3ByuGARc7 5j2U2pMiSOKMq2fdYVPf4xwgni6OouNm7ZS9mXB6j0mkhR2nN1RsPX/rNbVfqHetzFLA 67cVO49liyxeXI61CTC7c+sXZUUkIw9gUPxSi233oYK30lcf2aKD6kw1OzweX00E6Xqm nEmiQQaf2Sn0u7DxlDgzwqBmoxB+q90QVnfliAyT+ydiquiP4bma48dil8aoBe7mFXb9 ND1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=kET9he7F; 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 u14-v6si11547220pgv.180.2018.06.25.10.16.21; Mon, 25 Jun 2018 10:16:36 -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; dkim=fail header.i=@gmail.com header.s=20161025 header.b=kET9he7F; 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 S934426AbeFYRP0 (ORCPT + 99 others); Mon, 25 Jun 2018 13:15:26 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:50776 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933724AbeFYRPY (ORCPT ); Mon, 25 Jun 2018 13:15:24 -0400 Received: by mail-wm0-f65.google.com with SMTP id e16-v6so10125602wmd.0 for ; Mon, 25 Jun 2018 10:15:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=gxP2DHPoQcAC9ByHdNoaj6eoO27/6dRlpCnrsVK4IE4=; b=kET9he7FsGyudj3ux8mPQvheEJic6xNMo1WIhZ+A9IgJ+jfYjmzNVhQWvU8QEm0eKi su/kxt1QAERJt6bFqfX4XYX7v8wZKST0yKX6vGJSXw0RuiqZ8bMhb0eL2FOm8WUDN7OZ k33gs3+DN4dn0BCR69zAEonjWPeyHXWMFS5V9m7o2GndmqUBldhT6+b0N/+bYnhQ9rwf q00tLnHuIgACShUmeepUbZP379ClrNWR574vDwOwvH75duBy/BfI9SuOA9ce/OLmRln6 0uiBjuIAjxW9MCv5An+Rsgot8vmB9udXBOkqd7t9/5JPC95KQ/8ktBwYiVDMXDSJ0x1R GGow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=gxP2DHPoQcAC9ByHdNoaj6eoO27/6dRlpCnrsVK4IE4=; b=pDywePkLrZqowiJ7JdS7/+2qkscvZq4rQ3wK0lIfYBd6FO68zohVVX0RSnh+nruwaC qjKO1ijXtsVJGBm+8vn2OxrW6CH4Dye+BWNm/T4hLeAimxZtJBbPkYywo3l0bOS/UGJZ C277/zcmHgBck9jvbZqWVgwZ8gTEpCmMNwtXYnsuScgkgG6deGBU/o1SmhShN+GZ3bao 9YBcKr/jyMFMfI8pWDqf9RzOjKcE9UYp6blQ9L7Tomhkr25SvSZShQuNOgq9EB+Y7agj BF03eNg9tUFm9CwBzmDEXap2gFjoHPSlSiq63gQZlXVb1Ykn0Jb7w1fWOTvvKxkEpHnV uCBA== X-Gm-Message-State: APt69E1mx+1RIUHGmVtWXcZppzjPt1XD0PotJb5aRArsMXSxfVsKqH0t 5V1gldRRTTK38Khz/w+Ni+4= X-Received: by 2002:a1c:dac2:: with SMTP id r185-v6mr1634074wmg.31.1529946923642; Mon, 25 Jun 2018 10:15:23 -0700 (PDT) Received: from macbookpro.malat.net (bru31-1-78-225-226-121.fbx.proxad.net. [78.225.226.121]) by smtp.gmail.com with ESMTPSA id u204-v6sm5474958wmd.7.2018.06.25.10.15.22 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 25 Jun 2018 10:15:22 -0700 (PDT) Received: by macbookpro.malat.net (Postfix, from userid 1000) id B7F9D10C03DD; Mon, 25 Jun 2018 19:15:21 +0200 (CEST) From: Mathieu Malaterre To: Andrew Morton Cc: Tony Luck , Michal Hocko , Mathieu Malaterre , Michal Hocko , Pavel Tatashin , Daniel Jordan , Steven Sistare , Daniel Vacek , Stefan Agner , Joe Perches , Andy Shevchenko , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH v2] mm/memblock: add missing include Date: Mon, 25 Jun 2018 19:15:12 +0200 Message-Id: <20180625171513.31845-1-malat@debian.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180622210542.2025-1-malat@debian.org> References: <20180622210542.2025-1-malat@debian.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit 26f09e9b3a06 ("mm/memblock: add memblock memory allocation apis") introduced two new function definitions: memblock_virt_alloc_try_nid_nopanic() 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 include of 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] It also adds #ifdef blockers to prevent compilation failure on mips/ia64 where CONFIG_NO_BOOTMEM=n. Because Makefile already does: obj-$(CONFIG_HAVE_MEMBLOCK) += memblock.o The #ifdef has been simplified from: #if defined(CONFIG_HAVE_MEMBLOCK) && defined(CONFIG_NO_BOOTMEM) to simply: #if defined(CONFIG_NO_BOOTMEM) Suggested-by: Tony Luck Suggested-by: Michal Hocko Signed-off-by: Mathieu Malaterre --- v2: Simplify #ifdef mm/memblock.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mm/memblock.c b/mm/memblock.c index 03d48d8835ba..611a970ac902 100644 --- a/mm/memblock.c +++ b/mm/memblock.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include @@ -1224,6 +1225,7 @@ phys_addr_t __init memblock_alloc_try_nid(phys_addr_t size, phys_addr_t align, i return memblock_alloc_base(size, align, MEMBLOCK_ALLOC_ACCESSIBLE); } +#if defined(CONFIG_NO_BOOTMEM) /** * memblock_virt_alloc_internal - allocate boot memory block * @size: size of memory block to be allocated in bytes @@ -1431,6 +1433,7 @@ void * __init memblock_virt_alloc_try_nid( (u64)max_addr); return NULL; } +#endif /** * __memblock_free_early - free boot memory block -- 2.11.0