From: Andrew Morton <akpm@linux-foundation.org>
To: Leesoo Ahn <lsahn@ooseel.net>
Cc: Leesoo Ahn <lsahn@wewakecorp.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Mike Rapoport <rppt@kernel.org>
Subject: Re: [PATCH] mm: sparse: clarify a variable name and its value
Date: Sun, 9 Jun 2024 14:03:41 -0700 [thread overview]
Message-ID: <20240609140341.14ba3a1c62029771d60059ed@linux-foundation.org> (raw)
In-Reply-To: <20240608152114.867961-1-lsahn@wewakecorp.com>
On Sun, 9 Jun 2024 00:21:14 +0900 Leesoo Ahn <lsahn@ooseel.net> wrote:
> Setting 'limit' variable to 0 might seem like it means "no limit". But
> in the memblock API, 0 actually means the 'MEMBLOCK_ALLOC_ACCESSIBLE'
> enum, which limits the physical address range based on
> 'memblock.current_limit'. This can be confusing.
Does it? From my reading, this meaning applies to the range end
address, in memblock_find_in_range_node()? If your interpretation is
correct, this should be documented in the relevant memblock kerneldoc.
> To make things clearer, I suggest renaming the variable to
> 'limit_or_flag'. This name shows that the variable can either be a
> number for limits or an enum for a flag. This way, readers will easily
> understand what kind of value is being passed to the memblock API and
> how it works without needing to look into the API details.
>
I think I'll cc Mike and run away ;)
next prev parent reply other threads:[~2024-06-09 21:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-08 15:21 Leesoo Ahn
2024-06-09 21:03 ` Andrew Morton [this message]
2024-06-10 3:39 ` Leesoo Ahn
2024-06-10 6:06 ` Mike Rapoport
2024-06-10 8:20 ` Leesoo Ahn
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=20240609140341.14ba3a1c62029771d60059ed@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lsahn@ooseel.net \
--cc=lsahn@wewakecorp.com \
--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