From patchwork Mon Aug 29 06:39:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Song Chen X-Patchwork-Id: 12957467 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id D8037ECAAD2 for ; Mon, 29 Aug 2022 06:35:34 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 73D5294000A; Mon, 29 Aug 2022 02:35:34 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 6EC4C940007; Mon, 29 Aug 2022 02:35:34 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5DC3394000A; Mon, 29 Aug 2022 02:35:34 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 4BCE0940007 for ; Mon, 29 Aug 2022 02:35:34 -0400 (EDT) Received: from smtpin09.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 343C414076D for ; Mon, 29 Aug 2022 06:35:34 +0000 (UTC) X-FDA: 79851668988.09.EC150AE Received: from 189.cn (ptr.189.cn [183.61.185.104]) by imf08.hostedemail.com (Postfix) with ESMTP id A1141160026 for ; Mon, 29 Aug 2022 06:35:33 +0000 (UTC) HMM_SOURCE_IP: 10.64.8.43:58254.465013519 HMM_ATTACHE_NUM: 0000 HMM_SOURCE_TYPE: SMTP Received: from clientip-123.150.8.42 (unknown [10.64.8.43]) by 189.cn (HERMES) with SMTP id 47BFB1002C5; Mon, 29 Aug 2022 14:35:30 +0800 (CST) Received: from ([123.150.8.42]) by gateway-153622-dep-84fc4d489d-2xtjd with ESMTP id d5b1e1b832374690908240b4c2875a1c for karolinadrobnik@gmail.com; Mon, 29 Aug 2022 14:35:31 CST X-Transaction-ID: d5b1e1b832374690908240b4c2875a1c X-Real-From: chensong_2000@189.cn X-Receive-IP: 123.150.8.42 X-MEDUSA-Status: 0 From: Song Chen To: karolinadrobnik@gmail.com, rppt@kernel.org Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, Song Chen Subject: [PATCH 2/2] tools/testing/memblock: define pr_warn_ratelimited Date: Mon, 29 Aug 2022 14:39:00 +0800 Message-Id: <1661755140-3331-1-git-send-email-chensong_2000@189.cn> X-Mailer: git-send-email 2.7.4 ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1661754933; a=rsa-sha256; cv=none; b=ucofVglvOqir9/L9j1eTfGwc2nFfAsF2iIhTHE5KT7vrmr2TAjISnLkPTb8bKb2qgPyFbZ In+2JCclv0/aP844N10QRpHY8df1814WXyUOkkdXf5v/9dKLCvTEl043pU13xUloNtIDOx k3/tIlWr2UQw99A/ur28JnI2+QoKC1w= ARC-Authentication-Results: i=1; imf08.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf08.hostedemail.com: domain of chensong_2000@189.cn designates 183.61.185.104 as permitted sender) smtp.mailfrom=chensong_2000@189.cn ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1661754933; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=xyUXf98guNZw+34LmVPdG1obPIw5Amfl6VWDFzoM5/0=; b=th44Bo3ouIjdS2p1GZDNfvgaiSY7qmlGP24qhTetERmONIgzx+xVdWPmwA1+z4AE5lZM4v qLVqQDnc4CFHaZ1KP8fere3VYGmki3YDyOIblQCaoMUz9ZIUB6yVoGFajGJtxqFauUVxlI 5977Xg7SyWYW24WJ0NfD2LYfIGNjJwo= X-Rspam-User: X-Rspamd-Queue-Id: A1141160026 Authentication-Results: imf08.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf08.hostedemail.com: domain of chensong_2000@189.cn designates 183.61.185.104 as permitted sender) smtp.mailfrom=chensong_2000@189.cn X-Stat-Signature: odqps17s77pp4c43z43bohfnpcjo37fd X-Rspamd-Server: rspam07 X-HE-Tag: 1661754933-811169 X-Bogosity: Ham, tests=bogofilter, spamicity=0.095014, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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 --- 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