Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752189AbbGPF3z (ORCPT ); Thu, 16 Jul 2015 01:29:55 -0400 Received: from cn.fujitsu.com ([59.151.112.132]:7322 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1751000AbbGPF3y (ORCPT ); Thu, 16 Jul 2015 01:29:54 -0400 X-IronPort-AV: E=Sophos;i="5.13,665,1427731200"; d="scan'208";a="98506962" Message-ID: <55A7417C.6000106@cn.fujitsu.com> Date: Thu, 16 Jul 2015 13:30:36 +0800 From: Tang Chen User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: Tejun Heo CC: , , , , , , , , , , , , , , , , , Subject: Re: [PATCH 1/1] mem-hotplug: Handle node hole when initializing numa_meminfo. References: <1435720614-16480-1-git-send-email-tangchen@cn.fujitsu.com> <20150715212008.GK15934@mtj.duckdns.org> In-Reply-To: <20150715212008.GK15934@mtj.duckdns.org> Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1132 Lines: 35 On 07/16/2015 05:20 AM, Tejun Heo wrote: > On Wed, Jul 01, 2015 at 11:16:54AM +0800, Tang Chen wrote: > ... >> - /* and there's no empty block */ >> - if (bi->start >= bi->end) >> + /* and there's no empty or non-exist block */ >> + if (bi->start >= bi->end || >> + memblock_overlaps_region(&memblock.memory, >> + bi->start, bi->end - bi->start) == -1) > Ugh.... can you please change memblock_overlaps_region() to return > bool instead? Well, I think memblock_overlaps_region() is designed to return the index of the region overlapping with the given region. Maybe it had some users before. Of course for now, it is only called by memblock_is_region_reserved(). It is OK to change the return value of memblock_overlaps_region() to bool. But any caller of memblock_is_region_reserved() should also be changed. I think it is OK to leave it there. Thanks. > > Thanks. > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/