Re: [PATCH v2] mm: define general function pXd_init()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi, Andrew,

On Thu, Oct 31, 2024 at 7:41 AM Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> wrote:
>
> On Wed, 30 Oct 2024 14:39:05 +0800 Bibo Mao <maobibo@xxxxxxxxxxx> 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

>
> ?
>
>
>
>





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux