From patchwork Thu Oct 12 02:48:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rongwei Wang X-Patchwork-Id: 13418180 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 46AD2CDB46E for ; Thu, 12 Oct 2023 02:48:57 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 0FD298D00F9; Wed, 11 Oct 2023 22:48:56 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 0AD088D0002; Wed, 11 Oct 2023 22:48:56 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E41088D00F9; Wed, 11 Oct 2023 22:48:55 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id D60738D0002 for ; Wed, 11 Oct 2023 22:48:55 -0400 (EDT) Received: from smtpin25.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 9B4231403D7 for ; Thu, 12 Oct 2023 02:48:55 +0000 (UTC) X-FDA: 81335277030.25.D4C7FCC Received: from out30-110.freemail.mail.aliyun.com (out30-110.freemail.mail.aliyun.com [115.124.30.110]) by imf22.hostedemail.com (Postfix) with ESMTP id 8DA35C0022 for ; Thu, 12 Oct 2023 02:48:53 +0000 (UTC) Authentication-Results: imf22.hostedemail.com; dkim=none; spf=pass (imf22.hostedemail.com: domain of rongwei.wang@linux.alibaba.com designates 115.124.30.110 as permitted sender) smtp.mailfrom=rongwei.wang@linux.alibaba.com; dmarc=pass (policy=none) header.from=alibaba.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1697078934; a=rsa-sha256; cv=none; b=r7TrYIytHeyX7HrQHwE+/87DsDB3vmXdloTnI42VePeLg7T2692pWpNMT/0DvlxtuJ5vcl d2RAVFQgGcfaYXnq8kgAejlKXZf++ESc9oL6r3VR3j2DSCcjpQuRZuiTw1RSMdl9Edmovd HusgQSCjrIjVQ8ueNQpEEGlWchmdsyA= ARC-Authentication-Results: i=1; imf22.hostedemail.com; dkim=none; spf=pass (imf22.hostedemail.com: domain of rongwei.wang@linux.alibaba.com designates 115.124.30.110 as permitted sender) smtp.mailfrom=rongwei.wang@linux.alibaba.com; dmarc=pass (policy=none) header.from=alibaba.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1697078934; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=VR7wPq0C0mPYrOmbzB0ZF5iIStSetPqgvjgy4RyVjjM=; b=a/KJosz6hCaMNDOm4I3GKNiDiqcrY0BICiBQwuJIUZCddhC1+Ch8LQCgqZB91acigJjV09 X65qvwVAA0NqLz4wxbV5OPfkdCPpSyl1SJ27XKPpVS0SZE1MQOpOE2lp+5KResGBy21Q5l NM4So/WCcJJzKI7u9m3MjwlW0IMHQLs= X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R131e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045192;MF=rongwei.wang@linux.alibaba.com;NM=1;PH=DS;RN=9;SR=0;TI=SMTPD_---0VtykMgL_1697078929; Received: from localhost.localdomain(mailfrom:rongwei.wang@linux.alibaba.com fp:SMTPD_---0VtykMgL_1697078929) by smtp.aliyun-inc.com; Thu, 12 Oct 2023 10:48:49 +0800 From: Rongwei Wang 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 Message-Id: <20231012024842.99703-3-rongwei.wang@linux.alibaba.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20231012024842.99703-1-rongwei.wang@linux.alibaba.com> References: <20231012024842.99703-1-rongwei.wang@linux.alibaba.com> MIME-Version: 1.0 X-Rspam-User: X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 8DA35C0022 X-Stat-Signature: 5x5xbxtp8uw51mocweutc496gauxjm49 X-HE-Tag: 1697078933-399163 X-HE-Meta: U2FsdGVkX18EBwxgMmclBSLmeFm540THMdWAQnv7w8311tHf6PtZbJ5pGPRubNMi90FN1X8hiFkzWjS0WC6xEI8eiY9ai/23z9Ij/Wc/Hpg/1ErkNesXvvcJxZq2oeYsPDYWh5GMURt8p4eis4yrZX4AYqqLaDXmXYwyvgNtiMdzbYtZiN3wKUwmqM2lnXuXO/UMMPvPSo5IkRGX5k5trZlN/BYFGuFhLxCaR4dgUAvB26WmQemP9O+hOWRFAxxRwtL1N360H/3yK/9MNx7CLPxGHLGOtunSCRZjC5Y9m3F8uaPdFcIhAfDTxEdsdxJ1BdS8XbVRDwJjd5OikENoMmGFNREDTRukDfcZF93xQjiBBP8WVRbQydy7P/gz4I0dW+0Q7IRhMK0hdZX7pPsYLCi8WH6YkqfEr2dmp3/TI9qHUFU8nxrz9MXl50HiynhkuC4KadoXLRCxKW6hAloW1qHd+i4Wm4N7TQ1hftjvknA4Zn58wm8Nc70Uj9hxnPNb9OHOnutWY65IBftCBU4/RSe9XUZmhWfh3ugIBSTz2dWFZltErjO+e53WOtYjKf7CjxbzW6Ozhw4u+S5wMWvXBLRsrf5xTHSThfBz9lazggyG6jZ7UxXamJSsO+y5DjcQz/wSHxf25q7miiJ3otBv6XepURKcEI3pWqdsKzD6SL3iPcf4648GP3J/twWO9OlnhWaM4wdHjcK/ZatQEtqDF6hQDkTzTZ+rbcDTiuqs1rWRWUWi/B6PUs+EKG0qZMgNZFjmdKFHQI39XHC3DBhDPTuZpE9gRmmZ7WxhYVzNLz+BtDowk/EKX6grbr7coTjxaW0yMcjB/xDxkSAvJSa3pAjgHTnTf+pPXdjRXWmqeMkEFhHwe25UF/BV5WjwRUifF/1eQOWfyhPwqZMJ5vDYzhh7Ine3OK7UURGuzmG5xkaGl5sTaHxDEJHfbn7nzq/WRtrX+YSnDjJPrOL9lGo gfyMQj+C dDrcWc4XKpOOYKgKoJlISXbcDs8aYiGUcLGIPYVSB41TJZnH39JObhdA2wYtvcIaL9D4rZSX8GXunp20= 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: 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 --- 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,