linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Rongwei Wang <rongwei.wang@linux.alibaba.com>
To: linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org
Cc: akpm@linux-foundation.org, willy@infradead.org,
	catalin.marinas@arm.com, dave.hansen@linux.intel.com,
	tj@kernel.org, mingo@redhat.com
Subject: [PATCH RFC 2/5] mm: percpu: fix variable type of cpu
Date: Thu, 12 Oct 2023 10:48:39 +0800	[thread overview]
Message-ID: <20231012024842.99703-3-rongwei.wang@linux.alibaba.com> (raw)
In-Reply-To: <20231012024842.99703-1-rongwei.wang@linux.alibaba.com>

Almost all places declare 'cpu' as 'unsigned int'
type, but early_cpu_to_nod() not. So correct it
in this patch.

Signed-off-by: Rongwei Wang <rongwei.wang@linux.alibaba.com>
---
 drivers/base/arch_numa.c | 2 +-
 include/linux/percpu.h   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/base/arch_numa.c b/drivers/base/arch_numa.c
index eaa31e567d1e..db0bb8b8fd67 100644
--- a/drivers/base/arch_numa.c
+++ b/drivers/base/arch_numa.c
@@ -144,7 +144,7 @@ void __init early_map_cpu_to_node(unsigned int cpu, int nid)
 unsigned long __per_cpu_offset[NR_CPUS] __read_mostly;
 EXPORT_SYMBOL(__per_cpu_offset);
 
-static int __init early_cpu_to_node(int cpu)
+static int __init early_cpu_to_node(unsigned int cpu)
 {
 	return cpu_to_node_map[cpu];
 }
diff --git a/include/linux/percpu.h b/include/linux/percpu.h
index 68fac2e7cbe6..4aee8400af54 100644
--- a/include/linux/percpu.h
+++ b/include/linux/percpu.h
@@ -100,7 +100,7 @@ extern const char * const pcpu_fc_names[PCPU_FC_NR];
 
 extern enum pcpu_fc pcpu_chosen_fc;
 
-typedef int (pcpu_fc_cpu_to_node_fn_t)(int cpu);
+typedef int (pcpu_fc_cpu_to_node_fn_t)(unsigned int cpu);
 typedef int (pcpu_fc_cpu_distance_fn_t)(unsigned int from, unsigned int to);
 
 extern struct pcpu_alloc_info * __init pcpu_alloc_alloc_info(int nr_groups,
-- 
2.32.0.3.gf3a3e56d6


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2023-10-12  2:49 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-12  2:48 [PATCH RFC 0/5] support NUMA emulation for arm64 Rongwei Wang
2023-10-12  2:48 ` [PATCH RFC 1/5] mm/numa: move numa emulation APIs into generic files Rongwei Wang
2023-10-12  6:05   ` Ingo Molnar
2023-10-12  2:48 ` Rongwei Wang [this message]
2023-10-12  2:48 ` [PATCH RFC 3/5] arch_numa: remove __init in early_cpu_to_node() Rongwei Wang
2023-10-12  2:48 ` [PATCH RFC 4/5] mm/numa: support CONFIG_NUMA_EMU for arm64 Rongwei Wang
2023-10-12  2:48 ` [PATCH RFC 5/5] mm/numa: migrate leftover numa emulation into mm/numa.c Rongwei Wang
2023-10-12 12:37 ` [PATCH RFC 0/5] support NUMA emulation for arm64 Pierre Gondois
2023-10-12 13:30   ` Rongwei Wang
2023-10-23 13:03     ` Pierre Gondois
2024-02-20 11:36 ` [PATCH v1 0/2] support NUMA emulation for genertic arch Rongwei Wang
2024-02-20 11:36   ` [PATCH v1 1/2] arch_numa: remove __init for early_cpu_to_node Rongwei Wang
2024-02-20 11:36   ` [PATCH v1 2/2] numa: introduce numa emulation for genertic arch Rongwei Wang
2024-02-21  6:12   ` [PATCH v1 0/2] support NUMA " Mike Rapoport
2024-02-21 15:51     ` Pierre Gondois
2024-02-29  3:26       ` Rongwei 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=20231012024842.99703-3-rongwei.wang@linux.alibaba.com \
    --to=rongwei.wang@linux.alibaba.com \
    --cc=akpm@linux-foundation.org \
    --cc=catalin.marinas@arm.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mingo@redhat.com \
    --cc=tj@kernel.org \
    --cc=willy@infradead.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).