Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp3936942imm; Mon, 25 Jun 2018 07:07:11 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLyAspa2Gz5X3AnmeroyMBJauJmI8olMHv5EYWtr/U6FTWR4epXimT7rHdMMJFleywgONV4 X-Received: by 2002:a63:6092:: with SMTP id u140-v6mr10862635pgb.433.1529935630951; Mon, 25 Jun 2018 07:07:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529935630; cv=none; d=google.com; s=arc-20160816; b=lCI6QSBVW3j49nLHE9VRyxzEcvfykwCijXcqWUm137CgPDbsFQeoWNUmTh4Fn1H2zN T4P9EVgPcH933b6wzkoCMJTOB9t9WhMTB9tDsVCS//jWJZw9c748bkQ5noe/w0ZjvUyZ jduwXglizk/p7xLZR/+wwt1LulA12v9GqFSRsD0AfcJ9vL2uWVNsilOUPlSUKWHGVVb3 tZ4AiDJEHNYFF23fR98Be5N4afIC7ZGobHQ3ZVgM/Zw1mrQu5qj+uA/VX4URjiEP6613 wjaq2FFxJrmdWN/irbAPwbQOU1MY+uzgq63gaiujSkJvMnq8kEh2csTWW5gnxyClcA7E 49Xw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=8nZQF6BClWkxToSxJYH0o2gw0n5mCg4Db0zHbEmJltM=; b=umZboL1JF9IaWfJALEc1mKuhHRO1R6WFYCK7sFZn8LValN8IIS4035KU/P5d/AHCJk rEGEucM6YY4WO3ZVaHnrPB8szoC6Hs6Hf1ywzfalzuL27YNIwspnjPXV8FG3iw32W/W3 sT8GrIMkZL7O5cZibkIyleGLd4Ub0L/21chD/FmTrhWodD+1O1S33v5aB37FRM972WlJ 2KCchTEdc+hkiBzsDUCXrNMOClJZMUFLbTb94PeSiyPmrP+FIhJPhHE8Qz1u9hexgLaG 2Dgv/WZx4b9LFNKEhuJI4XKy3bo16u37mQ2pEul09WxN/OQvKainXfJ10vmqdpzcCzLl wVMg== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b20-v6si9147953pgb.645.2018.06.25.07.06.50; Mon, 25 Jun 2018 07:07:10 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934208AbeFYODu (ORCPT + 99 others); Mon, 25 Jun 2018 10:03:50 -0400 Received: from mx2.suse.de ([195.135.220.15]:53332 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933997AbeFYODt (ORCPT ); Mon, 25 Jun 2018 10:03:49 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext-too.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id ABBEDAEFE; Mon, 25 Jun 2018 14:03:48 +0000 (UTC) Date: Mon, 25 Jun 2018 16:03:46 +0200 From: Michal Hocko To: Mathieu Malaterre Cc: Andrew Morton , Tony Luck , Pavel Tatashin , Daniel Jordan , Steven Sistare , Daniel Vacek , Stefan Agner , Joe Perches , Andy Shevchenko , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm/memblock: add missing include and #ifdef Message-ID: <20180625140346.GM28965@dhcp22.suse.cz> References: <20180622210542.2025-1-malat@debian.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180622210542.2025-1-malat@debian.org> User-Agent: Mutt/1.9.5 (2018-04-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri 22-06-18 23:05:41, Mathieu Malaterre wrote: > 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 I was not aware of -Wmissing-prototypes > --- > 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) Why do you need CONFIG_HAVE_MEMBLOCK dependency? mm/Makefile says obj-$(CONFIG_HAVE_MEMBLOCK) += memblock.o so we even do not compile this code for !HAVE_MEMBLOCK AFAICS. > /** > * 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 -- Michal Hocko SUSE Labs