From patchwork Thu Dec 28 03:20:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Li kunyu X-Patchwork-Id: 183626 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:6f82:b0:100:9c79:88ff with SMTP id tb2csp1785431dyb; Wed, 27 Dec 2023 19:21:29 -0800 (PST) X-Google-Smtp-Source: AGHT+IE5bQzu8V4XgaVqYCrm9ZRPF9uFfNdj5nO5Ni25ggHfwdzyJw6FfIKQL8ZJ0ydUXWizvXya X-Received: by 2002:a05:6a00:1d05:b0:6d9:bfb8:e37c with SMTP id a5-20020a056a001d0500b006d9bfb8e37cmr6219147pfx.41.1703733689722; Wed, 27 Dec 2023 19:21:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703733689; cv=none; d=google.com; s=arc-20160816; b=R3PKm5jjGnTgjmaGebE45W3hcYYaEPcIeZc1ZZ15tzE5VGGMs7YJUEDd+J33rr9znf KRl+GOQDDxGj9uOLOLcLVPJFGkJ9iOa/NL2rPpJshZHNSMPQCU08S8I1ijk1Ebcya1lL 5nqxU2thkiLRPJwzmART3NaKhdD4eeDkaC9wEZNfRx7DMiJOuekYJULGj8E0IT29OQl+ mTVvpRY+wRMYhub3xtiqcFeR0jChyA3vAGZel7lB0uTdIv4AeWVRhLu/1xPuGmxpVTUH TAV44Djpta9cHwv347CFpi8LM8CmTHSbGFnEuE8OpUFOsuyo+xS6YSNayltmv4ZY9/1d lYIg== 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=qU9Iav7ANwC4ZtvJgo+HSYxWqONp7mX+e1X6MhGtuQk=; fh=IzSFRxsoHPKAHnIzT9loNGJhteyATfBRyrWDG5y974k=; b=eDp203zK+4aAJb8UrvvSqt9h7cOlOGPZBJrxbWY0C4yYGnw0GdwpDScjQzmVeHV8HV Ye3nqeNctxU2MlnfUhLukyoWO7GgifcXZsSlmoWO3SF3XRzEHDIVcl8BrvVb0CpLIyey i2egn28c1g+x2nLqci0ria/yMGXFJHkrk1BHORI8AYzaISUH9HCKN7PXxmJm9ZGwUlUi kUcavu9v8OpRD1FoMohpCJ5bxkmAhYcwM9e/cUYbqmUas7nbfHplpqiY2ha5Jmf7evsQ 8LYMYtkhbCznIIjjMwjGFFXglkeLKjR5DkgyBtejsZkUCllrPoiX7GK9/UoS1zsEqAyh MZnA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-12408-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-12408-ouuuleilei=gmail.com@vger.kernel.org" Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id t123-20020a628181000000b006d98a6168c5si9975730pfd.344.2023.12.27.19.21.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Dec 2023 19:21:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-12408-ouuuleilei=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-12408-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-12408-ouuuleilei=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 AE33AB21261 for ; Thu, 28 Dec 2023 03:21:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2093123A7; Thu, 28 Dec 2023 03:21: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 A05E8137B for ; Thu, 28 Dec 2023 03:20:55 +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 B414B6019FAD7; Thu, 28 Dec 2023 11:20: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=3A_cpu=3A_Remove_unnecessary_=E2=80=980?= =?utf-8?q?=E2=80=99_values_from_err?= Date: Thu, 28 Dec 2023 11:20:51 +0800 Message-Id: <20231228032051.13440-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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1786494257083091214 X-GMAIL-MSGID: 1786494257083091214 The err 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/cpu.c b/kernel/cpu.c index c1f331ddf0dc7..bea9cd176449e 100644 --- a/kernel/cpu.c +++ b/kernel/cpu.c @@ -1720,7 +1720,7 @@ static int _cpu_up(unsigned int cpu, int tasks_frozen, enum cpuhp_state target) static int cpu_up(unsigned int cpu, enum cpuhp_state target) { - int err = 0; + int err; if (!cpu_possible(cpu)) { pr_err("can't online cpu %d because it is not configured as may-hotadd at boot time\n",