From patchwork Tue Oct 17 06:20:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Li kunyu X-Patchwork-Id: 153926 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2908:b0:403:3b70:6f57 with SMTP id ib8csp3931365vqb; Mon, 16 Oct 2023 23:20:45 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHxdmzLmW61l7L16+RMx8xNORaoZY/H9AaSrEkiGo7WL3d1hMecqPI4avH7D0YFZhjNL2Eb X-Received: by 2002:a05:6a00:4809:b0:6b9:7d5c:bb58 with SMTP id di9-20020a056a00480900b006b97d5cbb58mr1416904pfb.0.1697523645637; Mon, 16 Oct 2023 23:20:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697523645; cv=none; d=google.com; s=arc-20160816; b=Lm67oIqvamdm0UDzX+cxmyLdxd4+7Aj8IVyztZ8ZVL/hkJ6xIEPRCLUCtagNOJW3dt kJllA+rfEJaArchQUaRom6XIGRbhKihoy1RjbrYBKpRhljzZGXMCjsBP1U+XGoDiag8H oH9jNSs32Qm2syvzQfW3wzclzqrnsqWSIOMzCAW9NZQ/kY48N2/2Sz5nBMDYDMQD2mNy RXR8HE7o/vAx26WuWR4qDeL+l5UjEFYLC6T1IBg9tbhba/4INWTWQa/9agiqAYJuFTFF N9ObLJqJXW6UDVzlD3mlD1Od4J1RWyQXW83Fq3nLEujpnJ5Y732So6aGnJTZBEq0cM1k wqiw== 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 :message-id:date:subject:cc:to:from; bh=7jRmGCOLlRFwDaPGskTwh0oe16VjVfxlQuGsFG3crxE=; fh=DgK42RI/KtP2XUemLY5vhT2MqtnHrJ7qkSyuFgZ2Mz8=; b=YDXvoFTv5F4bqDGZa+qnn4L5dsJQuKc89h8wzpsW5mJVgDErh8deEaK/cGTQ7e5+uj D3wEgWn7Fn4XbiLnazseYdaMVxj0lcNndWYDCTTd/5Woj/JhKxv3dFfKAmUU2SbE7ZIn SI7mR1caiHiplYlTjAfSuvhxyPxZvudZyMLxgK253alVkF8BI9ZmftOMeIlF3CkA0ZQw 4vcpa876wP4Y5VG5U3FXFV2AUr9y35sqnI1LtXXkEvXD+2hdfk+Pbj9rVb0s7pq4DfIP R6GtnQ68rgZ8i384Yl6VuB/WzcX6zZ4njyRbqaHIHJPfda3NnJDpUSKC1lc4X9RsL4po VcTQ== 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:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id r3-20020aa79ec3000000b006be0b790ebfsi916734pfq.255.2023.10.16.23.20.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Oct 2023 23:20:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id B49CE80BB3CC; Mon, 16 Oct 2023 23:20:43 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233654AbjJQGU3 (ORCPT + 19 others); Tue, 17 Oct 2023 02:20:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58864 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234512AbjJQGU2 (ORCPT ); Tue, 17 Oct 2023 02:20:28 -0400 Received: from mail.nfschina.com (unknown [42.101.60.195]) by lindbergh.monkeyblade.net (Postfix) with SMTP id F1241AB for ; Mon, 16 Oct 2023 23:20:26 -0700 (PDT) Received: from localhost.localdomain (unknown [219.141.250.2]) by mail.nfschina.com (Maildata Gateway V2.8.8) with ESMTPA id CFD066027B162; Tue, 17 Oct 2023 14:20:07 +0800 (CST) X-MD-Sfrom: kunyu@nfschina.com X-MD-SrcIP: 219.141.250.2 From: Li kunyu To: mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, bristot@redhat.com, vschneid@redhat.com Cc: linux-kernel@vger.kernel.org, Li kunyu Subject: [PATCH] =?utf-8?q?sched=3A_topology=3A_Remove_unnecessary_=E2=80=98?= =?utf-8?q?0=E2=80=99_values_from_nr=5Flevels?= Date: Tue, 17 Oct 2023 14:20:06 +0800 Message-Id: <20231017062006.10879-1-kunyu@nfschina.com> X-Mailer: git-send-email 2.18.2 MIME-Version: 1.0 X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email 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 (agentk.vger.email [0.0.0.0]); Mon, 16 Oct 2023 23:20:43 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1779982554536644988 X-GMAIL-MSGID: 1779982554536644988 nr_levels is assigned first, so it does not need to initialize the assignment. Signed-off-by: Li kunyu --- kernel/sched/topology.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c index 05a5bc678c089..0ead4e72bc6ca 100644 --- a/kernel/sched/topology.c +++ b/kernel/sched/topology.c @@ -1823,7 +1823,7 @@ void sched_init_numa(int offline_node) { struct sched_domain_topology_level *tl; unsigned long *distance_map; - int nr_levels = 0; + int nr_levels; int i, j; int *distances; struct cpumask ***masks;