From patchwork Mon Jun 24 01:54:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yang X-Patchwork-Id: 13708831 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 5AD59C27C4F for ; Mon, 24 Jun 2024 01:54:54 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 38F996B00C9; Sun, 23 Jun 2024 21:54:53 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 340756B00CB; Sun, 23 Jun 2024 21:54:53 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 206646B00CA; Sun, 23 Jun 2024 21:54:53 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 0454C6B0455 for ; Sun, 23 Jun 2024 21:54:52 -0400 (EDT) Received: from smtpin27.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 689E1409FC for ; Mon, 24 Jun 2024 01:54:52 +0000 (UTC) X-FDA: 82264113624.27.82C6AE1 Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com [209.85.221.45]) by imf25.hostedemail.com (Postfix) with ESMTP id BCA2DA0006 for ; Mon, 24 Jun 2024 01:54:50 +0000 (UTC) Authentication-Results: imf25.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=UEJ55hk6; spf=pass (imf25.hostedemail.com: domain of richard.weiyang@gmail.com designates 209.85.221.45 as permitted sender) smtp.mailfrom=richard.weiyang@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1719194083; a=rsa-sha256; cv=none; b=EIwc1eLh7ZC6sjrj+sDo1uXp76L9WFyv3dG/JJ4zNea7ReaGgu6Zf+8WGZJqDlSYbJuvy4 xG1aYECF6PotSK7jb5BCvuqK99/5NyJysNQ9NKNVLOG+AOJMo/pNN6Ve1afMt3YJWMwaND xNadHfujn+CWkMJNoyz5Bhon20tIydU= ARC-Authentication-Results: i=1; imf25.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=UEJ55hk6; spf=pass (imf25.hostedemail.com: domain of richard.weiyang@gmail.com designates 209.85.221.45 as permitted sender) smtp.mailfrom=richard.weiyang@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1719194083; h=from:from: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:dkim-signature; bh=hNlx4BB+USO3ljNUu/YjG9aPjV6v3pguEGQyNEvyZHM=; b=WSe4l6TSi3dl7KI1PvHaEzsnVrSbucwGHRBzWYh5hK/QgYuVWI0lCa8xk4yDtgSpIOJZm5 S9oBkC4L89JgIfo9JpsTpYc2YzLw+IlODmcr7di/s18Q44ujmyqZPNrk/ON9ks90sV0/fD qmqcehVnL9wBoNb0fRkFh3ue94VpLik= Received: by mail-wr1-f45.google.com with SMTP id ffacd0b85a97d-3608e6d14b6so2454098f8f.0 for ; Sun, 23 Jun 2024 18:54:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719194089; x=1719798889; darn=kvack.org; h=message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=hNlx4BB+USO3ljNUu/YjG9aPjV6v3pguEGQyNEvyZHM=; b=UEJ55hk6E7D1m9Lsph+UYl1KaJc4FQnmpJInvezeInAcXQg2GBiaZ59n/DsHueOcPk l/UybmgZ2bfLm0tF0Q+pZS3aiZo4tW+OoznEbzp9T3FEACRuXt0pbkHFsGiPr/Lvl3a7 tywa0gCTdflpDc0QbU4RxJj8Hko5HNWMdlYIQo10q0abAlfks0+RFfNNFzWzPm3W8b9F C7zmWHhOzWLpxDwrkPUyr8IqM1yl8ZrJZ3HMizJKrCCxrm0b8savp52ht0Ipq2I0jir5 5NF6NppnUQjGIND/LyKhp0nYZDI7iL95Vz2vlYWZLzWSAFeHIoUKhsMKtsEWNCsQLYpk M8MQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719194089; x=1719798889; h=message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hNlx4BB+USO3ljNUu/YjG9aPjV6v3pguEGQyNEvyZHM=; b=KxksgwYmjEwxMEdEutzRR+258VAe5EKzUuVNXVwbAsB31F4b+FZWjeN+0aXEnAqUQZ Ic+2/Z0+bEFgFCeNQi1AccrgQBE0R3/Hbb4LGx0s+Yr+wSozM5nlEAS2xh/Xlq+HKaYz TV8RlBMjc90eWHydbkGrVjJQ64NUpO7QInTZ4aoXyJTQ35Yl+SFMugY4Vf3pXTWFb44E KHUGPjhFg0Zc0wLg8RUL99Q0zcM0ncx30cH+799pwFxoRB28cbR80R8XbzsXD8kUCyMi JrhGSaSC0ULONzSS0oz+ddPargWCuDtNBf1PpAMzHlU9SeEWCTw6I4AkXlSJA1cmPzew ezIw== X-Gm-Message-State: AOJu0YwPTzF+mnntheR+o1Xwavd1w4hBoERJW0aokqpouI577/Sq8Oy3 An3qWLJx9JddG4FeKSQJQPgLhnITHVXnbsTKfto8WgmtAbuBCepH X-Google-Smtp-Source: AGHT+IEP4cpTxQdYFDG/48CO0MmAx99wIaDibTQiI1HK8jDCnqXDWDwQB7lUpnlwAOlMmKxvTP0dTA== X-Received: by 2002:a05:6000:1847:b0:366:ead3:37cd with SMTP id ffacd0b85a97d-366ead33bc6mr2314407f8f.28.1719194088993; Sun, 23 Jun 2024 18:54:48 -0700 (PDT) Received: from localhost ([185.92.221.13]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6fe077369dsm252468266b.68.2024.06.23.18.54.48 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 23 Jun 2024 18:54:48 -0700 (PDT) From: Wei Yang To: rppt@kernel.org Cc: linux-mm@kvack.org, Wei Yang Subject: [PATCH] memblock tests: fix implicit declaration of function 'numa_valid_node' Date: Mon, 24 Jun 2024 01:54:32 +0000 Message-Id: <20240624015432.31134-1-richard.weiyang@gmail.com> X-Mailer: git-send-email 2.11.0 X-Stat-Signature: tf3d8c519dcjipqzs9rm5mr8ok4o5dg7 X-Rspamd-Queue-Id: BCA2DA0006 X-Rspam-User: X-Rspamd-Server: rspam10 X-HE-Tag: 1719194090-127607 X-HE-Meta: U2FsdGVkX18q/0iUgTj7gNKMfhjlBbtYCxSIcxkTr5sP469cCjThfLrAHFAT9Ny+vmoqZJ57F5+IjjPl2tnRFXOUBpUGC3G9JYbec5FANbkRn7N3VukiuPSZ1OrhayJZxEf+Bnhji8RADBkCg+3/ej6HPutDj1eHDau4HqC94P9LXj99O2wvyu2qO2qy81xXYShkCzWRYPF8gnkRKmk6dySv+PFZr5Od19EU+zgAXKQLr8EPNfeNRBG4GIJMKj16EIkcDZInNjaEQIARknwYwPAnpXA2yhjvY6Mhu/FVPru474/vp3XpjyufUd4TMfpCQapZYbnzN87ie14gSY3V6cNZWaVp5sNfFB9IEWCYi7WD8fKkdYuA+5+19OoxUJi8gS0Jg+Lu0d0Haclqhzmp+xtpBSQdZb+Nfk7/FJf0oCVt7K2jfh8NbV0Ln0eGRyI/8aiAzn1j22xM84S62zF/+nL8NjYlcP1NjXYl/jzzur8mEB5jwHMXR42O5b1bjgXh1XqEWJJrLl0szdk+PDVEa2fLyeKoVJSONF/uy+xisUWOMi1ODRZcV4YHW8RnQLDOfS5t+cMVmq4Y6QY74sEDX+CKH1my7Nnnm1eB7iDa8FnjZPd/ny0l1DlUSrlQW0KFhcUj0Pl0Gm8L3LdLmr1ci+cPaxM2xdqVboUSUN3urIDgMmaBaXUedTvUwP4QVwxD3weArCLFykPb/CjuJFNC/6SbZnxtafS68u+62NxoZQhEyzFmHUDp7QJ47eZdrK9kFkdN8wr1lUfuqg2UdzIZCgG4C39JDQHP+qTsGOpJLavZzC3obcZPNiXJfERCvR3KxsZd3DUa83o6I5RFcxu2kt8C4eK4s4I96Z/YDec+edkLRliaEiFs9D4hZOIn9FbtzryEBtwBWjY7HE+zrqoH+GaBczCU4MqcBQRBnJzLFRsrN3Pw3vCA1ErAApSTUUR6S15uVl7Ec6PckCanErp a1OLkeAH BZp8yk0NvZJkaZ15sdDY6WmFdXgPuj9zWZoWaiSyA1GWnEr1QyOr75vXs/yuG6u7h/D1w34vo7C1S354WbODjcL5NdMXxhocYmuWSoH4CHNuOnVw9uQCBsE57K07PHgzN6k08J4U3B2Hyl4AXx+h9uebxbPys7mD/YIJC7iHgRSxtvkfoMJw4jHW+ADT++l9qfn0b6aABsLV9vIMIqC4wMxbx1n29yi0cLOaIOlYv/8u6wg4FttbwT2dEBuzpxjIVvUD3n4tl+XfIomksY0VXNn283lJCWBkh+jh3kFb5DHBKQUaNNDh+OdA6QaYv7nWh30c3hBPLdrXYusxs1OsOxGJloOmfn/JD/nbsteaiGD3uBx+SZ1OMSqmKEpdcye+Gcy6P8EcpFqk62/wmbnyng86Vmux/XlF2KdnZCJvi/3rwjSkjCY0UuPnyOEZNyZzGv9FsHPVBt2RA5qWAN1R5gMjRpc/aFjOPZV6F X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: commit 8043832e2a12 ("memblock: use numa_valid_node() helper to check for invalid node ID") introduce a new helper numa_valid_node(), which is not defined in memblock tests. Let's add it in the corresponding header file. Signed-off-by: Wei Yang CC: Mike Rapoport (IBM) --- tools/include/linux/numa.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/include/linux/numa.h b/tools/include/linux/numa.h index 110b0e5d0fb0..c8b9369335e0 100644 --- a/tools/include/linux/numa.h +++ b/tools/include/linux/numa.h @@ -13,4 +13,9 @@ #define NUMA_NO_NODE (-1) +static inline bool numa_valid_node(int nid) +{ + return nid >= 0 && nid < MAX_NUMNODES; +} + #endif /* _LINUX_NUMA_H */