From: Andrew Morton <akpm@linux-foundation.org>
To: Kefeng Wang <wangkefeng.wang@huawei.com>
Cc: Naoya Horiguchi <naoya.horiguchi@nec.com>,
Miaohe Lin <linmiaohe@huawei.com>, <linux-mm@kvack.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] mm: memory-failure: convert to pr_fmt()
Date: Thu, 28 Jul 2022 18:37:59 -0700 [thread overview]
Message-ID: <20220728183759.6a3eaab13b1b122a5810af58@linux-foundation.org> (raw)
In-Reply-To: <20220727032511.145506-1-wangkefeng.wang@huawei.com>
On Wed, 27 Jul 2022 11:25:11 +0800 Kefeng Wang <wangkefeng.wang@huawei.com> wrote:
> Use pr_fmt to prefix all pr_<level> output, but unpoison_memory()
> and soft_offline_page() are used by error injection, which have
> own prefixes like "Unpoison:" and "soft offline:", meanwhile,
> soft_offline_page() could be used by memory hotremove, so undef
> pr_fmt before unpoison_pr_info definition to keep the original
> output for them.
>
> ...
>
> @@ -2289,6 +2285,7 @@ static int __init memory_failure_init(void)
> }
> core_initcall(memory_failure_init);
>
> +#undef pr_fmt
> #define unpoison_pr_info(fmt, pfn, rs) \
> ({ \
> if (__ratelimit(rs)) \
This change makes the build fail.
In file included from ./include/linux/kernel.h:29,
from mm/memory-failure.c:39:
mm/memory-failure.c: In function 'unpoison_memory':
./include/linux/printk.h:537:26: error: expected ')' before 'pr_fmt'
537 | printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~
./include/linux/printk.h:388:42: note: in definition of macro '__printk_index_emit'
388 | if (__builtin_constant_p(_fmt) && __builtin_constant_p(_level)) { \
| ^~~~
./include/linux/printk.h:464:26: note: in expansion of macro 'printk_index_wrap'
464 | #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~~
./include/linux/printk.h:537:9: note: in expansion of macro 'printk'
537 | printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~
mm/memory-failure.c:2292:17: note: in expansion of macro 'pr_info'
2292 | pr_info(fmt, pfn); \
| ^~~~~~~
mm/memory-failure.c:2326:17: note: in expansion of macro 'unpoison_pr_info'
2326 | unpoison_pr_info("Unpoison: Disabled after HW memory failure %#lx\n",
| ^~~~~~~~~~~~~~~~
[1500 lines of the same]
next prev parent reply other threads:[~2022-07-29 1:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-27 3:25 Kefeng Wang
2022-07-27 4:07 ` HORIGUCHI NAOYA(堀口 直也)
2022-07-27 6:59 ` Miaohe Lin
2022-07-29 1:37 ` Andrew Morton [this message]
2022-07-29 2:03 ` Kefeng Wang
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=20220728183759.6a3eaab13b1b122a5810af58@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=linmiaohe@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=naoya.horiguchi@nec.com \
--cc=wangkefeng.wang@huawei.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