From: Song Chen <chensong_2000@189.cn>
To: karolinadrobnik@gmail.com, rppt@kernel.org
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
Song Chen <chensong_2000@189.cn>
Subject: [PATCH 2/2] tools/testing/memblock: define pr_warn_ratelimited
Date: Mon, 29 Aug 2022 14:39:00 +0800 [thread overview]
Message-ID: <1661755140-3331-1-git-send-email-chensong_2000@189.cn> (raw)
Commit 14d9a675fd0d("mm: Ratelimited mirrored memory related warning
messages") introduced pr_warn_ratelimited in memblock.c, which breaks
tools/test/memblock, below is the message:
/usr/bin/ld: memblock.o: in function `memblock_find_in_range.constprop.0':
memblock.c:(.text+0x4603): undefined reference to `pr_warn_ratelimited'
/usr/bin/ld: memblock.o: in function `memblock_alloc_range_nid':
memblock.c:(.text+0x786a): undefined reference to `pr_warn_ratelimited'
collect2: error: ld returned 1 exit status
A fake pr_warn_ratelimited needs to be defined in printk.h like other
prink functions.
Signed-off-by: Song Chen <chensong_2000@189.cn>
---
tools/testing/memblock/linux/printk.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/testing/memblock/linux/printk.h b/tools/testing/memblock/linux/printk.h
index 61af424d8c6c..bdca5eedbe4c 100644
--- a/tools/testing/memblock/linux/printk.h
+++ b/tools/testing/memblock/linux/printk.h
@@ -21,5 +21,6 @@
#define pr_cont printk
#define pr_err printk
#define pr_warn printk
+#define pr_warn_ratelimited printf
#endif
--
2.25.1
next reply other threads:[~2022-08-29 6:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-29 6:39 Song Chen [this message]
2022-08-29 8:24 ` [PATCH 2/2] tools/testing/memblock: define pr_warn_ratelimited Mike Rapoport
2022-08-29 8:32 ` Song Chen
2022-08-29 8:45 ` Mike Rapoport
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=1661755140-3331-1-git-send-email-chensong_2000@189.cn \
--to=chensong_2000@189.cn \
--cc=karolinadrobnik@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=rppt@kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).