Re: [PATCH v2] mm/memblock: Correct totalram_pages accounting with KMSAN

From: Marco Elver
Date: Wed Sep 24 2025 - 09:35:37 EST


On Wed, 24 Sept 2025 at 15:23, Markus Elfring <Markus.Elfring@xxxxxx> wrote:
>
>
> > +++ b/mm/mm_init.c
> > @@ -2548,24 +2548,25 @@ void *__init alloc_large_system_hash(const char *tablename,
>
> > +unsigned long __init memblock_free_pages(struct page *page, unsigned long pfn,
> > + unsigned int order)
> > {
>
> > if (!kmsan_memblock_free_pages(page, order)) {
> > /* KMSAN will take care of these pages. */
> > - return;
> > + return 0;
> > }
>
>
> How do you think about to omit curly brackets for this if statement?
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/coding-style.rst?h=v6.17-rc7#n197

No - with the /* .. */ comment there are 2 lines in this block.