Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp3729226rdb; Wed, 27 Dec 2023 19:19:25 -0800 (PST) X-Google-Smtp-Source: AGHT+IEw+svmDYLXsXzUoTaV7YInE3QsSup5stAFpQk8whvYYVdiXhHjYCa79wBjzmy7WXiLKyAY X-Received: by 2002:a17:90a:67ce:b0:28c:9199:4d55 with SMTP id g14-20020a17090a67ce00b0028c91994d55mr832799pjm.70.1703733564783; Wed, 27 Dec 2023 19:19:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703733564; cv=none; d=google.com; s=arc-20160816; b=iRhFumdj8IGqTYUYptDokgdlCXwO1lTFZz/xwcckII7ee52UU91xRiFlnHSJSixFX8 27Jl7rLiuUzw22u++cwvmaOPupCC6+EWJ5wJO/yDAjuiMk+BIFscb+TJqzYPivKw54mn hLiNZrjhdyueY9RayBng91f896PU51N9VvQhmcjZyDA+orYJ8I9XG/jopitv0liNOnXD H9m6Zbh/nU5ALMO5RhDTlvnPuYPKtsvqq8BPe6BMOEFRDiOHkKzcjv1TwQFM3iGF3S8u 3gSSW7zeqLYlmdzIrv+yc90eBmSNK72HMFWy/6kh/KlFSeMqTGVZBZJhj9wsdWeB4NHA gbrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from; bh=F43yzqvdmqVm9+lBJxQ2Rh6x8twQbl5a5/GyywrAEJ0=; fh=IzSFRxsoHPKAHnIzT9loNGJhteyATfBRyrWDG5y974k=; b=gWMnfDcNSKAAS3zqvE8yh03ubduSR8UjQ4n/Ngi+9noK9XltCsLwYhiWu3a/s28gxQ J5LOked0yccOeFCFfLDPww83eH371jn5bA6Oo/oJaBIcYB1lyVjbkBb6YXbZ1bEhkbNs cbDra4PyVx038TsaozZ/8ZGp+6h5DK3u0ktG7sHbVY9/P79jB74F5Cq65Xo3mk7oClvv aCwNCGFNK/Bkin9TlA9P/ErqzDRrKpKlgPe1LNhj8Wr8+goqqK+KqMzDuF0f28cWCM+o PkRntKS1YdoeD3Rpbn5KJzTdEGZGotKEqaKlbLQVbw4hAlFuKXtfTUPmFSgZEmQVw99O fdzQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-12404-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-12404-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id u7-20020a17090a450700b002869d1b1921si12354250pjg.31.2023.12.27.19.19.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Dec 2023 19:19:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-12404-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-12404-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-12404-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id B2ACFB22960 for ; Thu, 28 Dec 2023 03:18:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5B15E5671; Thu, 28 Dec 2023 03:18:02 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org Received: from mail.nfschina.com (unknown [42.101.60.195]) by smtp.subspace.kernel.org (Postfix) with SMTP id 6546F5244 for ; Thu, 28 Dec 2023 03:17:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=nfschina.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nfschina.com Received: from localhost.localdomain (unknown [219.141.250.2]) by mail.nfschina.com (Maildata Gateway V2.8.8) with ESMTPA id 9929F6019ED87; Thu, 28 Dec 2023 11:17:52 +0800 (CST) X-MD-Sfrom: kunyu@nfschina.com X-MD-SrcIP: 219.141.250.2 From: Li kunyu To: tglx@linutronix.de, peterz@infradead.org Cc: linux-kernel@vger.kernel.org, Li kunyu Subject: [PATCH] =?UTF-8?q?kernel:=20cpu:=20Remove=20unnecessary=20?= =?UTF-8?q?=E2=80=980=E2=80=99=20values=20from=20ret?= Date: Thu, 28 Dec 2023 11:17:50 +0800 Message-Id: <20231228031750.12941-1-kunyu@nfschina.com> X-Mailer: git-send-email 2.18.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The ret variable is assigned when it does not need to be defined, as it has already been assigned before use. Signed-off-by: Li kunyu --- kernel/cpu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/cpu.c b/kernel/cpu.c index 6de7c6bb74eee..c1f331ddf0dc7 100644 --- a/kernel/cpu.c +++ b/kernel/cpu.c @@ -998,7 +998,7 @@ static int cpuhp_up_callbacks(unsigned int cpu, struct cpuhp_cpu_state *st, enum cpuhp_state target) { enum cpuhp_state prev_state = st->state; - int ret = 0; + int ret; ret = cpuhp_invoke_callback_range(true, cpu, st, target); if (ret) { @@ -1402,7 +1402,7 @@ static int cpuhp_down_callbacks(unsigned int cpu, struct cpuhp_cpu_state *st, enum cpuhp_state target) { enum cpuhp_state prev_state = st->state; - int ret = 0; + int ret; ret = cpuhp_invoke_callback_range(false, cpu, st, target); if (ret) { @@ -2488,7 +2488,7 @@ int __cpuhp_setup_state_cpuslocked(enum cpuhp_state state, int (*teardown)(unsigned int cpu), bool multi_instance) { - int cpu, ret = 0; + int cpu, ret; bool dynstate; lockdep_assert_cpus_held(); -- 2.18.2