linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Wei Yang <richard.weiyang@gmail.com>
To: Mike Rapoport <rppt@kernel.org>
Cc: Wei Yang <richard.weiyang@gmail.com>,
	akpm@linux-foundation.org, linux-mm@kvack.org
Subject: Re: [Patch v2 3/8] mm/memblock: fix comment for memblock_isolate_range()
Date: Sun, 28 Apr 2024 13:07:36 +0000	[thread overview]
Message-ID: <20240428130736.ionlmpvexeylnreq@master> (raw)
In-Reply-To: <Zi3wKjv2Ve7Li_7A@kernel.org>

On Sun, Apr 28, 2024 at 09:43:54AM +0300, Mike Rapoport wrote:
>On Thu, Apr 25, 2024 at 07:19:24AM +0000, Wei Yang wrote:
>> The isolated range is [*@start_rgn, *@end_rgn - 1], while the comment says
>> "the end region inside the range" is *@end_rgn.
>> 
>> Let's correct it.
>> 
>> Signed-off-by: Wei Yang <richard.weiyang@gmail.com>
>> ---
>>  mm/memblock.c | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>> 
>> diff --git a/mm/memblock.c b/mm/memblock.c
>> index 98d25689cf10..5a363ef283d0 100644
>> --- a/mm/memblock.c
>> +++ b/mm/memblock.c
>> @@ -772,12 +772,12 @@ bool __init_memblock memblock_validate_numa_coverage(unsigned long threshold_byt
>>   * @base: base of range to isolate
>>   * @size: size of range to isolate
>>   * @start_rgn: out parameter for the start of isolated region
>> - * @end_rgn: out parameter for the end of isolated region
>> + * @end_rgn: out parameter for the (end + 1) of isolated region
>
>end can be inclusive or exclusive, please let's keep this line ...
>
>>   *
>>   * Walk @type and ensure that regions don't cross the boundaries defined by
>>   * [@base, @base + @size).  Crossing regions are split at the boundaries,
>>   * which may create at most two more regions.  The index of the first
>> - * region inside the range is returned in *@start_rgn and end in *@end_rgn.
>> + * region inside the range is returned in *@start_rgn and (end + 1) in *@end_rgn.
>
>... and emphasise here that end is exclusive, e.g
>
>The index of the first region inside the range is returned in *@start_rgn
>and the index of the first region after the range is returned in *@end_rgn.
>

Looks better, thanks.

>>   *
>>   * Return:
>>   * 0 on success, -errno on failure.
>> -- 
>> 2.34.1
>> 
>
>-- 
>Sincerely yours,
>Mike.

-- 
Wei Yang
Help you, Help me


      reply	other threads:[~2024-04-28 13:07 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-25  7:19 [Patch v2 0/8] memblock: clenup Wei Yang
2024-04-25  7:19 ` [Patch v2 1/8] memblock tests: reserve the 129th memory block at all possible position Wei Yang
2024-04-28  6:35   ` Mike Rapoport
2024-04-28 12:22     ` Wei Yang
2024-04-29 14:17       ` Mike Rapoport
2024-04-30  0:12         ` Wei Yang
2024-04-25  7:19 ` [Patch v2 4/8] mm/memblock: remove consecutive regions at once Wei Yang
2024-04-28  6:44   ` Mike Rapoport
2024-04-28 12:37     ` Wei Yang
2024-04-25  7:19 ` [Patch v2 5/8] memblock tests: add memblock_overlaps_region_checks Wei Yang
2024-04-25  7:19 ` [Patch v2 6/8] mm/memblock: return true directly on finding overlap region Wei Yang
2024-04-25  7:19 ` [Patch v2 7/8] mm/memblock: use PAGE_ALIGN_DOWN to get pgend in free_memmap Wei Yang
2024-04-25  7:19 ` [Patch v2 8/8] mm/memblock: default region's nid may be MAX_NUMNODES Wei Yang
     [not found] ` <20240425071929.18004-3-richard.weiyang@gmail.com>
2024-04-28  6:40   ` [Patch v2 2/8] memblock tests: add memblock_reserve_many_may_conflict_check() Mike Rapoport
2024-04-28 12:36     ` Wei Yang
2024-04-30  1:49     ` Wei Yang
2024-05-01  8:44       ` Mike Rapoport
     [not found] ` <20240425071929.18004-4-richard.weiyang@gmail.com>
2024-04-28  6:43   ` [Patch v2 3/8] mm/memblock: fix comment for memblock_isolate_range() Mike Rapoport
2024-04-28 13:07     ` Wei Yang [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240428130736.ionlmpvexeylnreq@master \
    --to=richard.weiyang@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-mm@kvack.org \
    --cc=rppt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox