[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAAhV-H7AyjyGT=4pW9X-ZrdN3JThs8ukC3dnoZW_dOxZLQsQtQ@mail.gmail.com>
Date: Thu, 31 Oct 2024 09:13:27 +0800
From: Huacai Chen <chenhuacai@...nel.org>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Bibo Mao <maobibo@...ngson.cn>, Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
Andrey Ryabinin <ryabinin.a.a@...il.com>, loongarch@...ts.linux.dev,
linux-kernel@...r.kernel.org, linux-mips@...r.kernel.org, linux-mm@...ck.org,
kasan-dev@...glegroups.com, Alexander Potapenko <glider@...gle.com>,
Andrey Konovalov <andreyknvl@...il.com>, Dmitry Vyukov <dvyukov@...gle.com>,
Vincenzo Frascino <vincenzo.frascino@....com>, WANG Xuerui <kernel@...0n.name>
Subject: Re: [PATCH v2] mm: define general function pXd_init()
Hi, Andrew,
On Thu, Oct 31, 2024 at 7:41 AM Andrew Morton <akpm@...ux-foundation.org> wrote:
>
> On Wed, 30 Oct 2024 14:39:05 +0800 Bibo Mao <maobibo@...ngson.cn> wrote:
>
> > --- a/arch/loongarch/include/asm/pgtable.h
> > +++ b/arch/loongarch/include/asm/pgtable.h
> > @@ -267,8 +267,11 @@ extern void set_pmd_at(struct mm_struct *mm, unsigned long addr, pmd_t *pmdp, pm
> > * Initialize a new pgd / pud / pmd table with invalid pointers.
> > */
> > extern void pgd_init(void *addr);
> > +#define pud_init pud_init
> > extern void pud_init(void *addr);
> > +#define pmd_init pmd_init
> > extern void pmd_init(void *addr);
> > +#define kernel_pte_init kernel_pte_init
> > extern void kernel_pte_init(void *addr);
>
> Nitlet: don't we usually put the #define *after* the definition?
>
> void foo(void);
> #define foo() foo()
Is there any convention or documents about this? In kernel code there
are both before definitions and after definitions.
Huacai
>
> ?
>
>
>
>
Powered by blists - more mailing lists