Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp32972rdg; Wed, 11 Oct 2023 19:49:28 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH7TdQmA97y7FSxmpYRW1vx2Nurp+UDWwV0elg4oEyRAj8bwU76lOXH3WJIf7AvL+TE7I7y X-Received: by 2002:a05:6a20:3d1b:b0:12e:4d86:c017 with SMTP id y27-20020a056a203d1b00b0012e4d86c017mr28185496pzi.10.1697078968030; Wed, 11 Oct 2023 19:49:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697078968; cv=none; d=google.com; s=arc-20160816; b=utgGYJQ5RzSinr8trFlKnTftYVSt1oEWnoiFFTp8Mu7dHZMvDpSBFIjF88MIuRIFmV tbrbV3CptL2AsoiUSrCNRx+8P/PgRppiSlfqJrlkzgoGkfEDv4hEx8kz1sQHHWrJD6pZ W0FhvEi0oEkbGtDGTHzwqqva5DMtDDOy9FdDTm02l6d0LLiaf0FkykB4DeATmecbwMKA QKtx3Znx93hKKJ32H5zjsKQbDd3OHkKPO6cakUGFql0l4z4MVyTT6ziqxcx3HcokQTBt 2VEJWxIXnQHyTIHmtJf4JHDRWhwtjWov439sKdA1kff+lmQ++rbaWku66FNB8s5duyfm Nwaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=VR7wPq0C0mPYrOmbzB0ZF5iIStSetPqgvjgy4RyVjjM=; fh=ZYoHe1wlSxRVpYSXw5DcseDzNzuurc0wqkDMPTWnoPk=; b=r68MsR5kb0ua3w65CWbiIXoAlsjVqhsoLwb+7iAc1YKv68SqWzo3SpWPAOXX+i7AKR ccceODh+tsr+n2rkNO7WAoW0TAfLcmjj6E43ikqjO3vFp0wtya3tcGkxb0dXczMayhjP WpUGulCn/Yt6LuVuFbut551CJtS3ulv5wbZBNWggxbLV5Qm4OfiP3nSQojH0AsBICoCE 3FVSOTuJJidvipIDwHzlEZzCpP0ikOSwfHIb9QBoeWjpeWiTlXpIy/+jH0wErVUZLiFI iGLqmXEo0UJpEJUIJ3FKKTloeBMPvxIpFtOtZAt5i5Rx3VGXASaTcwdkfOGr5+S+BAyj e5yw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id gx5-20020a17090b124500b002534f4ce2b6si1138471pjb.125.2023.10.11.19.49.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 19:49:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 2E8B38206D6A; Wed, 11 Oct 2023 19:49:27 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235311AbjJLCtV (ORCPT + 99 others); Wed, 11 Oct 2023 22:49:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56916 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235276AbjJLCsy (ORCPT ); Wed, 11 Oct 2023 22:48:54 -0400 Received: from out30-124.freemail.mail.aliyun.com (out30-124.freemail.mail.aliyun.com [115.124.30.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 96508A9 for ; Wed, 11 Oct 2023 19:48:52 -0700 (PDT) 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 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS, UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 11 Oct 2023 19:49:27 -0700 (PDT) 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, -- 2.32.0.3.gf3a3e56d6