From: Hanjun Guo <guohanjun@huawei.com>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: <linux-acpi@vger.kernel.org>, <linuxarm@huawei.com>,
Hanjun Guo <guohanjun@huawei.com>
Subject: [PATCH 3/3] ACPI: NUMA: Remove the useless 'node >= MAX_NUMNODES' check
Date: Tue, 21 Jul 2020 17:59:06 +0800 [thread overview]
Message-ID: <1595325546-63774-4-git-send-email-guohanjun@huawei.com> (raw)
In-Reply-To: <1595325546-63774-1-git-send-email-guohanjun@huawei.com>
acpi_map_pxm_to_node() will never return numa node greater
than MAX_NUMNODES, so 'node >= MAX_NUMNODES' is not needed,
remove it.
Signed-off-by: Hanjun Guo <guohanjun@huawei.com>
---
drivers/acpi/numa/srat.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/acpi/numa/srat.c b/drivers/acpi/numa/srat.c
index 3d430b0..15bbaab 100644
--- a/drivers/acpi/numa/srat.c
+++ b/drivers/acpi/numa/srat.c
@@ -230,7 +230,7 @@ void __init acpi_numa_slit_init(struct acpi_table_slit *slit)
pxm &= 0xff;
node = acpi_map_pxm_to_node(pxm);
- if (node == NUMA_NO_NODE || node >= MAX_NUMNODES) {
+ if (node == NUMA_NO_NODE) {
pr_err("SRAT: Too many proximity domains.\n");
goto out_err_bad_srat;
}
--
1.7.12.4
next prev parent reply other threads:[~2020-07-21 10:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-21 9:59 [PATCH 0/3] Minor cleanups Hanjun Guo
2020-07-21 9:59 ` [PATCH 1/3] ACPI: tables: Remove the duplicated checks for acpi_parse_entries_array() Hanjun Guo
2020-07-21 9:59 ` [PATCH 2/3] ACPI: NUMA: Remove the useless sub table pointer check Hanjun Guo
2020-07-21 9:59 ` Hanjun Guo [this message]
2020-07-27 13:20 ` [PATCH 0/3] Minor cleanups Rafael J. Wysocki
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=1595325546-63774-4-git-send-email-guohanjun@huawei.com \
--to=guohanjun@huawei.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=rjw@rjwysocki.net \
/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).