Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758292AbcLOOoe (ORCPT ); Thu, 15 Dec 2016 09:44:34 -0500 Received: from userp1040.oracle.com ([156.151.31.81]:48888 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757430AbcLOOoa (ORCPT ); Thu, 15 Dec 2016 09:44:30 -0500 From: Boris Ostrovsky To: tglx@linutronix.de, bigeasy@linutronix.de, rjw@rjwysocki.net, viresh.kumar@linaro.org Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, xen-devel@lists.xenproject.org, Boris Ostrovsky Subject: [PATCH 1/2] cpu/hotplug: Clarify description of __cpuhp_setup_state() return value Date: Thu, 15 Dec 2016 10:00:57 -0500 Message-Id: <1481814058-4799-2-git-send-email-boris.ostrovsky@oracle.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1481814058-4799-1-git-send-email-boris.ostrovsky@oracle.com> References: <1481814058-4799-1-git-send-email-boris.ostrovsky@oracle.com> X-Source-IP: aserv0021.oracle.com [141.146.126.233] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 930 Lines: 29 When ivoked with CPUHP_AP_ONLINE_DYN state __cpuhp_setup_state() is expected to return positive value which is the hotplug state that the routine assigns. Signed-off-by: Boris Ostrovsky --- kernel/cpu.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/kernel/cpu.c b/kernel/cpu.c index 217fd2e..5339aca 100644 --- a/kernel/cpu.c +++ b/kernel/cpu.c @@ -1586,7 +1586,11 @@ int __cpuhp_state_add_instance(enum cpuhp_state state, struct hlist_node *node, * @startup: startup callback function * @teardown: teardown callback function * - * Returns 0 if successful, otherwise a proper error code + * Returns: + * On success: + * Positive state number if @state is CPUHP_AP_ONLINE_DYN + * 0 for all other states + * On failure: proper (negative) error code */ int __cpuhp_setup_state(enum cpuhp_state state, const char *name, bool invoke, -- 1.7.1