Skip to content

Commit 4efe85b

Browse files
lorelei-sakaiMikulas Patocka
authored andcommitted
dm vdo: fix kerneldoc warnings
Fix kerneldoc warnings across the dm-vdo target. Also remove some unhelpful or inaccurate doc comments, and fix some format inconsistencies that did not produce warnings. No functional changes. Suggested-by: Sunday Adelodun <adelodunolaoluwa@yahoo.com> Signed-off-by: Matthew Sakai <msakai@redhat.com> Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
1 parent d0ac06a commit 4efe85b

20 files changed

Lines changed: 298 additions & 169 deletions

drivers/md/dm-vdo/action-manager.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ struct action {
4343
* @actions: The two action slots.
4444
* @current_action: The current action slot.
4545
* @zones: The number of zones in which an action is to be applied.
46-
* @Scheduler: A function to schedule a default next action.
46+
* @scheduler: A function to schedule a default next action.
4747
* @get_zone_thread_id: A function to get the id of the thread on which to apply an action to a
4848
* zone.
4949
* @initiator_thread_id: The ID of the thread on which actions may be initiated.

drivers/md/dm-vdo/admin-state.c

Lines changed: 50 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,8 @@ const struct admin_state_code *VDO_ADMIN_STATE_RESUMING = &VDO_CODE_RESUMING;
149149
/**
150150
* get_next_state() - Determine the state which should be set after a given operation completes
151151
* based on the operation and the current state.
152-
* @operation The operation to be started.
152+
* @state: The current admin state.
153+
* @operation: The operation to be started.
153154
*
154155
* Return: The state to set when the operation completes or NULL if the operation can not be
155156
* started in the current state.
@@ -187,6 +188,8 @@ static const struct admin_state_code *get_next_state(const struct admin_state *s
187188

188189
/**
189190
* vdo_finish_operation() - Finish the current operation.
191+
* @state: The current admin state.
192+
* @result: The result of the operation.
190193
*
191194
* Will notify the operation waiter if there is one. This method should be used for operations
192195
* started with vdo_start_operation(). For operations which were started with vdo_start_draining(),
@@ -214,8 +217,10 @@ bool vdo_finish_operation(struct admin_state *state, int result)
214217

215218
/**
216219
* begin_operation() - Begin an operation if it may be started given the current state.
217-
* @waiter A completion to notify when the operation is complete; may be NULL.
218-
* @initiator The vdo_admin_initiator_fn to call if the operation may begin; may be NULL.
220+
* @state: The current admin state.
221+
* @operation: The operation to be started.
222+
* @waiter: A completion to notify when the operation is complete; may be NULL.
223+
* @initiator: The vdo_admin_initiator_fn to call if the operation may begin; may be NULL.
219224
*
220225
* Return: VDO_SUCCESS or an error.
221226
*/
@@ -259,8 +264,10 @@ static int __must_check begin_operation(struct admin_state *state,
259264

260265
/**
261266
* start_operation() - Start an operation if it may be started given the current state.
262-
* @waiter A completion to notify when the operation is complete.
263-
* @initiator The vdo_admin_initiator_fn to call if the operation may begin; may be NULL.
267+
* @state: The current admin state.
268+
* @operation: The operation to be started.
269+
* @waiter: A completion to notify when the operation is complete; may be NULL.
270+
* @initiator: The vdo_admin_initiator_fn to call if the operation may begin; may be NULL.
264271
*
265272
* Return: true if the operation was started.
266273
*/
@@ -274,10 +281,10 @@ static inline bool __must_check start_operation(struct admin_state *state,
274281

275282
/**
276283
* check_code() - Check the result of a state validation.
277-
* @valid true if the code is of an appropriate type.
278-
* @code The code which failed to be of the correct type.
279-
* @what What the code failed to be, for logging.
280-
* @waiter The completion to notify of the error; may be NULL.
284+
* @valid: True if the code is of an appropriate type.
285+
* @code: The code which failed to be of the correct type.
286+
* @what: What the code failed to be, for logging.
287+
* @waiter: The completion to notify of the error; may be NULL.
281288
*
282289
* If the result failed, log an invalid state error and, if there is a waiter, notify it.
283290
*
@@ -301,7 +308,8 @@ static bool check_code(bool valid, const struct admin_state_code *code, const ch
301308

302309
/**
303310
* assert_vdo_drain_operation() - Check that an operation is a drain.
304-
* @waiter The completion to finish with an error if the operation is not a drain.
311+
* @operation: The operation to check.
312+
* @waiter: The completion to finish with an error if the operation is not a drain.
305313
*
306314
* Return: true if the specified operation is a drain.
307315
*/
@@ -313,9 +321,10 @@ static bool __must_check assert_vdo_drain_operation(const struct admin_state_cod
313321

314322
/**
315323
* vdo_start_draining() - Initiate a drain operation if the current state permits it.
316-
* @operation The type of drain to initiate.
317-
* @waiter The completion to notify when the drain is complete.
318-
* @initiator The vdo_admin_initiator_fn to call if the operation may begin; may be NULL.
324+
* @state: The current admin state.
325+
* @operation: The type of drain to initiate.
326+
* @waiter: The completion to notify when the drain is complete.
327+
* @initiator: The vdo_admin_initiator_fn to call if the operation may begin; may be NULL.
319328
*
320329
* Return: true if the drain was initiated, if not the waiter will be notified.
321330
*/
@@ -345,6 +354,7 @@ bool vdo_start_draining(struct admin_state *state,
345354

346355
/**
347356
* vdo_finish_draining() - Finish a drain operation if one was in progress.
357+
* @state: The current admin state.
348358
*
349359
* Return: true if the state was draining; will notify the waiter if so.
350360
*/
@@ -355,6 +365,8 @@ bool vdo_finish_draining(struct admin_state *state)
355365

356366
/**
357367
* vdo_finish_draining_with_result() - Finish a drain operation with a status code.
368+
* @state: The current admin state.
369+
* @result: The result of the drain operation.
358370
*
359371
* Return: true if the state was draining; will notify the waiter if so.
360372
*/
@@ -365,7 +377,8 @@ bool vdo_finish_draining_with_result(struct admin_state *state, int result)
365377

366378
/**
367379
* vdo_assert_load_operation() - Check that an operation is a load.
368-
* @waiter The completion to finish with an error if the operation is not a load.
380+
* @operation: The operation to check.
381+
* @waiter: The completion to finish with an error if the operation is not a load.
369382
*
370383
* Return: true if the specified operation is a load.
371384
*/
@@ -377,9 +390,10 @@ bool vdo_assert_load_operation(const struct admin_state_code *operation,
377390

378391
/**
379392
* vdo_start_loading() - Initiate a load operation if the current state permits it.
380-
* @operation The type of load to initiate.
381-
* @waiter The completion to notify when the load is complete (may be NULL).
382-
* @initiator The vdo_admin_initiator_fn to call if the operation may begin; may be NULL.
393+
* @state: The current admin state.
394+
* @operation: The type of load to initiate.
395+
* @waiter: The completion to notify when the load is complete; may be NULL.
396+
* @initiator: The vdo_admin_initiator_fn to call if the operation may begin; may be NULL.
383397
*
384398
* Return: true if the load was initiated, if not the waiter will be notified.
385399
*/
@@ -393,6 +407,7 @@ bool vdo_start_loading(struct admin_state *state,
393407

394408
/**
395409
* vdo_finish_loading() - Finish a load operation if one was in progress.
410+
* @state: The current admin state.
396411
*
397412
* Return: true if the state was loading; will notify the waiter if so.
398413
*/
@@ -403,7 +418,8 @@ bool vdo_finish_loading(struct admin_state *state)
403418

404419
/**
405420
* vdo_finish_loading_with_result() - Finish a load operation with a status code.
406-
* @result The result of the load operation.
421+
* @state: The current admin state.
422+
* @result: The result of the load operation.
407423
*
408424
* Return: true if the state was loading; will notify the waiter if so.
409425
*/
@@ -414,7 +430,8 @@ bool vdo_finish_loading_with_result(struct admin_state *state, int result)
414430

415431
/**
416432
* assert_vdo_resume_operation() - Check whether an admin_state_code is a resume operation.
417-
* @waiter The completion to notify if the operation is not a resume operation; may be NULL.
433+
* @operation: The operation to check.
434+
* @waiter: The completion to notify if the operation is not a resume operation; may be NULL.
418435
*
419436
* Return: true if the code is a resume operation.
420437
*/
@@ -427,9 +444,10 @@ static bool __must_check assert_vdo_resume_operation(const struct admin_state_co
427444

428445
/**
429446
* vdo_start_resuming() - Initiate a resume operation if the current state permits it.
430-
* @operation The type of resume to start.
431-
* @waiter The completion to notify when the resume is complete (may be NULL).
432-
* @initiator The vdo_admin_initiator_fn to call if the operation may begin; may be NULL.
447+
* @state: The current admin state.
448+
* @operation: The type of resume to start.
449+
* @waiter: The completion to notify when the resume is complete; may be NULL.
450+
* @initiator: The vdo_admin_initiator_fn to call if the operation may begin; may be NULL.
433451
*
434452
* Return: true if the resume was initiated, if not the waiter will be notified.
435453
*/
@@ -443,6 +461,7 @@ bool vdo_start_resuming(struct admin_state *state,
443461

444462
/**
445463
* vdo_finish_resuming() - Finish a resume operation if one was in progress.
464+
* @state: The current admin state.
446465
*
447466
* Return: true if the state was resuming; will notify the waiter if so.
448467
*/
@@ -453,7 +472,8 @@ bool vdo_finish_resuming(struct admin_state *state)
453472

454473
/**
455474
* vdo_finish_resuming_with_result() - Finish a resume operation with a status code.
456-
* @result The result of the resume operation.
475+
* @state: The current admin state.
476+
* @result: The result of the resume operation.
457477
*
458478
* Return: true if the state was resuming; will notify the waiter if so.
459479
*/
@@ -465,6 +485,7 @@ bool vdo_finish_resuming_with_result(struct admin_state *state, int result)
465485
/**
466486
* vdo_resume_if_quiescent() - Change the state to normal operation if the current state is
467487
* quiescent.
488+
* @state: The current admin state.
468489
*
469490
* Return: VDO_SUCCESS if the state resumed, VDO_INVALID_ADMIN_STATE otherwise.
470491
*/
@@ -479,6 +500,8 @@ int vdo_resume_if_quiescent(struct admin_state *state)
479500

480501
/**
481502
* vdo_start_operation() - Attempt to start an operation.
503+
* @state: The current admin state.
504+
* @operation: The operation to attempt to start.
482505
*
483506
* Return: VDO_SUCCESS if the operation was started, VDO_INVALID_ADMIN_STATE if not
484507
*/
@@ -490,8 +513,10 @@ int vdo_start_operation(struct admin_state *state,
490513

491514
/**
492515
* vdo_start_operation_with_waiter() - Attempt to start an operation.
493-
* @waiter the completion to notify when the operation completes or fails to start; may be NULL.
494-
* @initiator The vdo_admin_initiator_fn to call if the operation may begin; may be NULL.
516+
* @state: The current admin state.
517+
* @operation: The operation to attempt to start.
518+
* @waiter: The completion to notify when the operation completes or fails to start; may be NULL.
519+
* @initiator: The vdo_admin_initiator_fn to call if the operation may begin; may be NULL.
495520
*
496521
* Return: VDO_SUCCESS if the operation was started, VDO_INVALID_ADMIN_STATE if not
497522
*/

0 commit comments

Comments
 (0)