linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Huacai Chen <chenhuacai@kernel.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Bibo Mao <maobibo@loongson.cn>,
	Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
	 Andrey Ryabinin <ryabinin.a.a@gmail.com>,
	loongarch@lists.linux.dev,  linux-kernel@vger.kernel.org,
	linux-mips@vger.kernel.org, linux-mm@kvack.org,
	 kasan-dev@googlegroups.com,
	Alexander Potapenko <glider@google.com>,
	 Andrey Konovalov <andreyknvl@gmail.com>,
	Dmitry Vyukov <dvyukov@google.com>,
	 Vincenzo Frascino <vincenzo.frascino@arm.com>,
	WANG Xuerui <kernel@xen0n.name>
Subject: Re: [PATCH v2] mm: define general function pXd_init()
Date: Thu, 31 Oct 2024 09:13:27 +0800	[thread overview]
Message-ID: <CAAhV-H7AyjyGT=4pW9X-ZrdN3JThs8ukC3dnoZW_dOxZLQsQtQ@mail.gmail.com> (raw)
In-Reply-To: <20241030164123.ff63a1c0e7666ad1a4f8944e@linux-foundation.org>

Hi, Andrew,

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

>
> ?
>
>
>
>


      parent reply	other threads:[~2024-11-01 13:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-30  6:39 Bibo Mao
2024-10-30 10:18 ` Huacai Chen
2024-10-30 23:41 ` Andrew Morton
2024-10-31  1:08   ` maobibo
2024-10-31  1:13   ` Huacai Chen [this message]

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='CAAhV-H7AyjyGT=4pW9X-ZrdN3JThs8ukC3dnoZW_dOxZLQsQtQ@mail.gmail.com' \
    --to=chenhuacai@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=andreyknvl@gmail.com \
    --cc=dvyukov@google.com \
    --cc=glider@google.com \
    --cc=kasan-dev@googlegroups.com \
    --cc=kernel@xen0n.name \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=loongarch@lists.linux.dev \
    --cc=maobibo@loongson.cn \
    --cc=ryabinin.a.a@gmail.com \
    --cc=tsbogend@alpha.franken.de \
    --cc=vincenzo.frascino@arm.com \
    /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