From patchwork Mon May 15 16:20:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anna-Maria Behnsen X-Patchwork-Id: 94217 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp7047462vqo; Mon, 15 May 2023 09:33:26 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6wHIdDnZM4bfK/4ylyPDYukfMA6V2S+YtVh7Xbn+CxhN4zIbpM/omRR4mRIGGPHZ9+e6FL X-Received: by 2002:a17:902:f552:b0:1ac:a058:555e with SMTP id h18-20020a170902f55200b001aca058555emr31000574plf.8.1684168406065; Mon, 15 May 2023 09:33:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684168406; cv=none; d=google.com; s=arc-20160816; b=bCHCglFGNvV9r+8DgUna6B/JOGxZ/Q7D2UnRdF1qXCuVdw3xJxtPkNvLJi5/SMpJgw wEpYq2UaNfUqLvYIABiJJN56bwWWpcViurrHwZHSl7E3Pl2aMydq7y4ITIZd3iShgl8I 94S5aCVyohCVAL/KWWWu1glNkIWI7IOyiBnVbYcD312+/LD6R9jduO4dze6m1wcFt0JZ bepZAL8IFdYNOiP+NHwImJyCmGmIeIzX8txPGx6j6pWL1PL8DEj7If9R7wXwi05cXy5f R2FKWkVnqxh9HdnHWqeXZ2CJ+CO34JlAZThnodG6MeUptNZ62If4WF7BZEtxHfF6AtQ5 1fAg== 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:dkim-signature:dkim-signature:from; bh=oq2w5/T8vszaBUacwCVwqQ0dStHOmx2WxWGJ0zePsOE=; b=ljhKv27MExlLtXPP1P7rg+hQZr8bnYo73/v9bnFJKFXG85cHTt1olXiD16LGg3Ga6U MKEMrvA6GQXMZUL+t1XEZefK39zqgFDCas9FGM5bfnW0EKejn6Q8pMIE4h27CsDurZP0 WLHURgIo4zi1xvjypAu6pio2OCBF26diuZaFBQRqqz+C43iSqauBpshxo2MvjKMHJowc PB6SsIRWtvVpuO8X2aY0iLqqJTjUxGRO4/P4Ez+XHO96ma7qLRtg6Wy8blhxU94y9SxU mtDFGi+w0BOt9rvAL5mD+lZkR8D0rUcDFzbK9UKlmcrMOrMYvyJBwMTnXdXPwAMmnOmZ zQ5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=OadXmL65; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b="sTBpwz/N"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g4-20020a170902934400b001ac404445c9si16262934plp.139.2023.05.15.09.33.13; Mon, 15 May 2023 09:33:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=OadXmL65; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b="sTBpwz/N"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234849AbjEOQVF (ORCPT + 99 others); Mon, 15 May 2023 12:21:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53540 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242658AbjEOQU6 (ORCPT ); Mon, 15 May 2023 12:20:58 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E31C62685; Mon, 15 May 2023 09:20:55 -0700 (PDT) From: Anna-Maria Behnsen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1684167654; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=oq2w5/T8vszaBUacwCVwqQ0dStHOmx2WxWGJ0zePsOE=; b=OadXmL65HTOLMouOg2/E4ln0eS+vJOI5AFhby61iDjlkoVIG3BrmMqqAPPR8vBH9fkGiL+ 0cSPSnVpFVTCo+idbSui8tRIK7cWXnMCOsCJmnsedgErujeaAufNtaQv18bgVAl+GdC9N4 /rL/5HGXVPRBNGBiVAbrodDXQf0K7GGqTeR9ggQ6ieflvPKnSh8NzyAQt/fYT6x6/aklcy JkUIsO0pBb7stMzLbBip5bJEmaf5u9tAXYZujP9YDd+LFhG2U2qvCVIBN+THiZ/WDINgE5 7qnpqt33q43t5qtmOPUSMLE5Jp2y15KwdGCXXWXPfwKQRCciqJXZuMmfF5sb0w== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1684167654; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=oq2w5/T8vszaBUacwCVwqQ0dStHOmx2WxWGJ0zePsOE=; b=sTBpwz/NMkKJNkl6z7kyf8JxmwAbmrSDnGKipLMiePIISXpqhdTOXLUbGlZd5ULNxW8VpZ 0yC/vVYXck0BLUDQ== To: linux-kernel@vger.kernel.org Cc: linux-doc@vger.kernel.org, Thomas Gleixner , Jonathan Corbet , Anna-Maria Behnsen Subject: [PATCH] Documentation: core-api/cpuhotplug: Fix state names Date: Mon, 15 May 2023 18:20:38 +0200 Message-Id: <20230515162038.62703-1-anna-maria@linutronix.de> MIME-Version: 1.0 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE 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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1765978570677291714?= X-GMAIL-MSGID: =?utf-8?q?1765978570677291714?= Dynamic allocated hotplug states in documentation and comment above cpuhp_state enum do not match the code. To not get confused by wrong documentation, change to proper state names. Signed-off-by: Anna-Maria Behnsen Reviewed-by: Thomas Gleixner --- Documentation/core-api/cpu_hotplug.rst | 10 +++++----- include/linux/cpuhotplug.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Documentation/core-api/cpu_hotplug.rst b/Documentation/core-api/cpu_hotplug.rst index f75778d37488..95ead18dd9e0 100644 --- a/Documentation/core-api/cpu_hotplug.rst +++ b/Documentation/core-api/cpu_hotplug.rst @@ -404,8 +404,8 @@ multi-instance state the following function is available: * cpuhp_setup_state_multi(state, name, startup, teardown) The @state argument is either a statically allocated state or one of the -constants for dynamically allocated states - CPUHP_PREPARE_DYN, -CPUHP_ONLINE_DYN - depending on the state section (PREPARE, ONLINE) for +constants for dynamically allocated states - CPUHP_BP_PREPARE_DYN, +CPUHP_AP_ONLINE_DYN - depending on the state section (PREPARE, ONLINE) for which a dynamic state should be allocated. The @name argument is used for sysfs output and for instrumentation. The @@ -597,7 +597,7 @@ notifications on online and offline operations:: Setup and teardown a dynamically allocated state in the ONLINE section for notifications on offline operations:: - state = cpuhp_setup_state(CPUHP_ONLINE_DYN, "subsys:offline", NULL, subsys_cpu_offline); + state = cpuhp_setup_state(CPUHP_AP_ONLINE_DYN, "subsys:offline", NULL, subsys_cpu_offline); if (state < 0) return state; .... @@ -606,7 +606,7 @@ for notifications on offline operations:: Setup and teardown a dynamically allocated state in the ONLINE section for notifications on online operations without invoking the callbacks:: - state = cpuhp_setup_state_nocalls(CPUHP_ONLINE_DYN, "subsys:online", subsys_cpu_online, NULL); + state = cpuhp_setup_state_nocalls(CPUHP_AP_ONLINE_DYN, "subsys:online", subsys_cpu_online, NULL); if (state < 0) return state; .... @@ -615,7 +615,7 @@ for notifications on online operations without invoking the callbacks:: Setup, use and teardown a dynamically allocated multi-instance state in the ONLINE section for notifications on online and offline operation:: - state = cpuhp_setup_state_multi(CPUHP_ONLINE_DYN, "subsys:online", subsys_cpu_online, subsys_cpu_offline); + state = cpuhp_setup_state_multi(CPUHP_AP_ONLINE_DYN, "subsys:online", subsys_cpu_online, subsys_cpu_offline); if (state < 0) return state; .... diff --git a/include/linux/cpuhotplug.h b/include/linux/cpuhotplug.h index 0f1001dca0e0..7b30f5cbf415 100644 --- a/include/linux/cpuhotplug.h +++ b/include/linux/cpuhotplug.h @@ -48,7 +48,7 @@ * same section. * * If neither #1 nor #2 apply, please use the dynamic state space when - * setting up a state by using CPUHP_PREPARE_DYN or CPUHP_PREPARE_ONLINE + * setting up a state by using CPUHP_BP_PREPARE_DYN or CPUHP_AP_ONLINE_DYN * for the @state argument of the setup function. * * See Documentation/core-api/cpu_hotplug.rst for further information and