Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp1302957imm; Fri, 22 Jun 2018 14:07:46 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIoENZENADgEtUbYnbkD2BYHGbOU+JJ0BAkzRJizutPBY1E2vdLQzzq9UFnQ4xDXee0Izjn X-Received: by 2002:a63:770b:: with SMTP id s11-v6mr2804129pgc.339.1529701666771; Fri, 22 Jun 2018 14:07:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529701666; cv=none; d=google.com; s=arc-20160816; b=v4w+V4UqJ6oKcLc2omLe0hY6cTf0oh04qNbkM2ESTv8Z3fajOLvgliS7elXDArWAe3 lClYV1zBT1ahZ0Mvm1tFTr5im6LLXH2zgVsfNtdY6RFgV1d5t7pPWAG6bwi4twKgCgsV t44s+bB+50ptrK+XNanEa25D2DRqJFp7oy1inlHpdg0DUiFpEv96WgAtxEhcOZb9GGYW yPtjuslsLB2el2Cjn9krOf5JH0y/KD43qV55E7tZ9KQ0to7y9wWasFMjxsukunNYHRy/ hOP9q9R0XD8Yu+RqjS3Iv0HEt/s5xNqIzAXDckLcPe3PwP46q01cDo8+MewEJM0VwupW zy7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=Jsye4p+cOLXge3eoj+C91hZU95Kz3JDWe4e4VqwucQk=; b=pF6OihSWyMrQf4ViBYVD+sxs6kfwCD4BP3zq+7f26FTOoYvwLTGCbfJPcH03R/1eXj /GCw4lf7MKuQd5CeD1LmwXsBIut2ZGnisMts0ZxNiHZGvjb/Ni72UCCD+tyA/XOi1Jsr 4QMOFzFHPbtzvw8cNn+Rr0UMIdZ65tWB5ByHKBIR9uWgUDWTW45cN/TOk8S/I0fqxX7+ YQu+MYED5Eb4zdFtiF5W7OS+d6ur/bNVn88KK3wTmQXji9GP/xXT8KRnXd5DTtLUtGKB hBwCSN1I8hAs5thFfqzMncd9MSlOeBbsNBMcFPvwK4eEk0XxM4TFDrdoHnqAqW34DnkN AGqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=nQtc2ONF; 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 68-v6si6439332pga.324.2018.06.22.14.07.31; Fri, 22 Jun 2018 14:07:46 -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=nQtc2ONF; 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 S932950AbeFVVGD (ORCPT + 99 others); Fri, 22 Jun 2018 17:06:03 -0400 Received: from mail-wr0-f193.google.com ([209.85.128.193]:42107 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754435AbeFVVGB (ORCPT ); Fri, 22 Jun 2018 17:06:01 -0400 Received: by mail-wr0-f193.google.com with SMTP id w10-v6so7896258wrk.9 for ; Fri, 22 Jun 2018 14:06:01 -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; bh=Jsye4p+cOLXge3eoj+C91hZU95Kz3JDWe4e4VqwucQk=; b=nQtc2ONFvJsMYiFStX+sahhF4uktBpC5q+CtLx1mAQfRCUHObaxlQaCmj3ElXbKF14 8DDJ+mHB9naBOJkz1DQTqkokGQpmTtbRvHGd0DNneuqCQL4gB3KjEnfovmxD3m0YD2i1 iMCGhRlJqKJjTjmUeI1+breh6QNbIkRpl4MXj2usvVd2Q9loagFV0z6zT8ZN9XxjGpCs xFhhtePVqHZFraQXOB5muX/oB6pafHfE2hWp00f+w5fYFuK85rJTFUNGf3zyf1MPkTUJ BUalhx3Zuo9p/I4KiCPJcmmkP2Rb2lwdbLsKPjJcIoCezwhHBQi09GJoI9bG4glHOeQX QSlQ== 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; bh=Jsye4p+cOLXge3eoj+C91hZU95Kz3JDWe4e4VqwucQk=; b=GPRuTv0rSp1pCDn2ai6OYYJzs1isV7xUp+shBHaNySQ3WjcZWcnkcu4X7MVkuX+dni YVrAnoiLnat06sn9Ga8H9GfQhAia8QRZ7rd/E9OIU/kk2VyntPItFpkUQHaugsScE+VZ tjhwJIj4L2jl7XjZqU7zi0DZIRR3QMK080y5zgHnuPf4vsk296kdFhedBFVsBt4Q09lc CnugOFK1OyMqyQ5cSmP9YxBCgI35KMPYvi6R3jE4I6P3CPPi+xS9vyUS113lvsKR+70U LvH4slFmZivpsz5+gdYKlId7kUTPMAU+zZPB39FiK0rxJwawtcWbmrolWOVH8AFAezVU ISeA== X-Gm-Message-State: APt69E31ue+61KhcFSlRDlWXMozCkciRw9U7XVjy0+OEpoBIgiJdiiQ9 INu4efpiP0pRKsef2TSLSKw= X-Received: by 2002:adf:85ec:: with SMTP id 41-v6mr2804332wru.120.1529701560675; Fri, 22 Jun 2018 14:06:00 -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 d90-v6sm3409287wmi.26.2018.06.22.14.05.59 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 22 Jun 2018 14:05:59 -0700 (PDT) Received: by macbookpro.malat.net (Postfix, from userid 1000) id 0260D10C0452; Fri, 22 Jun 2018 23:05:58 +0200 (CEST) From: Mathieu Malaterre To: Andrew Morton Cc: Tony Luck , 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] mm/memblock: add missing include and #ifdef Date: Fri, 22 Jun 2018 23:05:41 +0200 Message-Id: <20180622210542.2025-1-malat@debian.org> X-Mailer: git-send-email 2.11.0 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] As seen in commit 6cc22dc08a24 ("revert "mm/memblock: add missing include "") #ifdef blockers were missing which lead to compilation failure on mips/ia64 where CONFIG_NO_BOOTMEM=n. Suggested-by: Tony Luck Signed-off-by: Mathieu Malaterre --- mm/memblock.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mm/memblock.c b/mm/memblock.c index 4c98672bc3e2..f4b6766d7907 100644 --- a/mm/memblock.c +++ b/mm/memblock.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include @@ -1226,6 +1227,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_HAVE_MEMBLOCK) && defined(CONFIG_NO_BOOTMEM) /** * memblock_virt_alloc_internal - allocate boot memory block * @size: size of memory block to be allocated in bytes @@ -1433,6 +1435,7 @@ void * __init memblock_virt_alloc_try_nid( (u64)max_addr); return NULL; } +#endif /** * __memblock_free_early - free boot memory block -- 2.11.0