Skip to content

Commit 11bc021

Browse files
rddunlapKAGA-KOKO
authored andcommitted
cpu/hotplug: Eliminate all kernel-doc warnings
kernel/cpu.c:57: warning: cannot understand function prototype: 'struct cpuhp_cpu_state ' kernel/cpu.c:115: warning: cannot understand function prototype: 'struct cpuhp_step ' kernel/cpu.c:146: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * cpuhp_invoke_callback _ Invoke the callbacks for a given state kernel/cpu.c:75: warning: Function parameter or member 'fail' not described in 'cpuhp_cpu_state' kernel/cpu.c:75: warning: Function parameter or member 'cpu' not described in 'cpuhp_cpu_state' kernel/cpu.c:75: warning: Function parameter or member 'node' not described in 'cpuhp_cpu_state' kernel/cpu.c:75: warning: Function parameter or member 'last' not described in 'cpuhp_cpu_state' kernel/cpu.c:130: warning: Function parameter or member 'list' not described in 'cpuhp_step' kernel/cpu.c:130: warning: Function parameter or member 'multi_instance' not described in 'cpuhp_step' kernel/cpu.c:158: warning: No description found for return value of 'cpuhp_invoke_callback' kernel/cpu.c:1188: warning: No description found for return value of 'cpu_device_down' kernel/cpu.c:1400: warning: No description found for return value of 'cpu_device_up' kernel/cpu.c:1425: warning: No description found for return value of 'bringup_hibernate_cpu' Signed-off-by: Randy Dunlap <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent ed3cd1d commit 11bc021

File tree

1 file changed

+21
-5
lines changed

1 file changed

+21
-5
lines changed

kernel/cpu.c

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,19 @@
4141
#include "smpboot.h"
4242

4343
/**
44-
* cpuhp_cpu_state - Per cpu hotplug state storage
44+
* struct cpuhp_cpu_state - Per cpu hotplug state storage
4545
* @state: The current cpu state
4646
* @target: The target state
47+
* @fail: Current CPU hotplug callback state
4748
* @thread: Pointer to the hotplug thread
4849
* @should_run: Thread should execute
4950
* @rollback: Perform a rollback
5051
* @single: Single callback invocation
5152
* @bringup: Single callback bringup or teardown selector
53+
* @cpu: CPU number
54+
* @node: Remote CPU node; for multi-instance, do a
55+
* single entry callback for install/remove
56+
* @last: For multi-instance rollback, remember how far we got
5257
* @cb_state: The state for a single callback (install/uninstall)
5358
* @result: Result of the operation
5459
* @done_up: Signal completion to the issuer of the task for cpu-up
@@ -106,11 +111,12 @@ static inline void cpuhp_lock_release(bool bringup) { }
106111
#endif
107112

108113
/**
109-
* cpuhp_step - Hotplug state machine step
114+
* struct cpuhp_step - Hotplug state machine step
110115
* @name: Name of the step
111116
* @startup: Startup function of the step
112117
* @teardown: Teardown function of the step
113118
* @cant_stop: Bringup/teardown can't be stopped at this step
119+
* @multi_instance: State has multiple instances which get added afterwards
114120
*/
115121
struct cpuhp_step {
116122
const char *name;
@@ -124,7 +130,9 @@ struct cpuhp_step {
124130
int (*multi)(unsigned int cpu,
125131
struct hlist_node *node);
126132
} teardown;
133+
/* private: */
127134
struct hlist_head list;
135+
/* public: */
128136
bool cant_stop;
129137
bool multi_instance;
130138
};
@@ -143,14 +151,16 @@ static bool cpuhp_step_empty(bool bringup, struct cpuhp_step *step)
143151
}
144152

145153
/**
146-
* cpuhp_invoke_callback _ Invoke the callbacks for a given state
154+
* cpuhp_invoke_callback - Invoke the callbacks for a given state
147155
* @cpu: The cpu for which the callback should be invoked
148156
* @state: The state to do callbacks for
149157
* @bringup: True if the bringup callback should be invoked
150158
* @node: For multi-instance, do a single entry callback for install/remove
151159
* @lastp: For multi-instance rollback, remember how far we got
152160
*
153161
* Called from cpu hotplug and from the state register machinery.
162+
*
163+
* Return: %0 on success or a negative errno code
154164
*/
155165
static int cpuhp_invoke_callback(unsigned int cpu, enum cpuhp_state state,
156166
bool bringup, struct hlist_node *node,
@@ -1183,6 +1193,8 @@ static int cpu_down(unsigned int cpu, enum cpuhp_state target)
11831193
* This function is meant to be used by device core cpu subsystem only.
11841194
*
11851195
* Other subsystems should use remove_cpu() instead.
1196+
*
1197+
* Return: %0 on success or a negative errno code
11861198
*/
11871199
int cpu_device_down(struct device *dev)
11881200
{
@@ -1395,6 +1407,8 @@ static int cpu_up(unsigned int cpu, enum cpuhp_state target)
13951407
* This function is meant to be used by device core cpu subsystem only.
13961408
*
13971409
* Other subsystems should use add_cpu() instead.
1410+
*
1411+
* Return: %0 on success or a negative errno code
13981412
*/
13991413
int cpu_device_up(struct device *dev)
14001414
{
@@ -1420,6 +1434,8 @@ EXPORT_SYMBOL_GPL(add_cpu);
14201434
* On some architectures like arm64, we can hibernate on any CPU, but on
14211435
* wake up the CPU we hibernated on might be offline as a side effect of
14221436
* using maxcpus= for example.
1437+
*
1438+
* Return: %0 on success or a negative errno code
14231439
*/
14241440
int bringup_hibernate_cpu(unsigned int sleep_cpu)
14251441
{
@@ -1985,9 +2001,9 @@ EXPORT_SYMBOL_GPL(__cpuhp_state_add_instance);
19852001
* added afterwards.
19862002
*
19872003
* The caller needs to hold cpus read locked while calling this function.
1988-
* Returns:
2004+
* Return:
19892005
* On success:
1990-
* Positive state number if @state is CPUHP_AP_ONLINE_DYN
2006+
* Positive state number if @state is CPUHP_AP_ONLINE_DYN;
19912007
* 0 for all other states
19922008
* On failure: proper (negative) error code
19932009
*/

0 commit comments

Comments
 (0)