[PATCH v4 1/7] mm: Introduce for_each_valid_pfn() and use it from reserve_bootmem_region()
David Hildenbrand
david at redhat.com
Mon Apr 28 00:06:58 PDT 2025
On 26.04.25 00:01, David Woodhouse wrote:
> On Thu, 2025-04-24 at 23:11 +0200, David Hildenbrand wrote:
>>
>>> + unsigned long pfn;
>>>
>>> - for (; start_pfn < end_pfn; start_pfn++) {
>>> - if (pfn_valid(start_pfn)) {
>>> - struct page *page = pfn_to_page(start_pfn);
>>> + for_each_valid_pfn (pfn, PFN_DOWN(start), PFN_UP(end)) {
>>
>> ^ space should be removed
>
>
> I was treating for_each_foobar() like for(), which always *does* have
> the space before the parentheses. But a quick grep shows that that's
> the minority, by at least two orders of magnitude. Fixing it locally;
> thanks.
Yeah, it's frowned upon. Note that checkpatch will properly complain:
WARNING: space prohibited between function name and open parenthesis '('
#70: FILE: mm/mm_init.c:782:
+ for_each_valid_pfn (pfn, PFN_DOWN(start), PFN_UP(end)) {
--
Cheers,
David / dhildenb
More information about the linux-arm-kernel
mailing list