Skip to content

Commit a68d3cb

Browse files
rddunlapgregkh
authored andcommitted
memstick: core: fix kernel-doc notation
Use the correct kernel-doc format for function parameters (':' instead of '-') to eliminate kernel-doc warnings. Add some "Returns:" notations to functions. memstick.c:206: warning: Function parameter or struct member 'host' not described in 'memstick_detect_change' memstick.c:222: warning: Function parameter or struct member 'host' not described in 'memstick_next_req' memstick.c:222: warning: Function parameter or struct member 'mrq' not described in 'memstick_next_req' memstick.c:248: warning: Function parameter or struct member 'host' not described in 'memstick_new_req' memstick.c:265: warning: Function parameter or struct member 'mrq' not described in 'memstick_init_req_sg' memstick.c:265: warning: Function parameter or struct member 'tpc' not described in 'memstick_init_req_sg' memstick.c:265: warning: Function parameter or struct member 'sg' not described in 'memstick_init_req_sg' memstick.c:295: warning: Function parameter or struct member 'mrq' not described in 'memstick_init_req' memstick.c:295: warning: Function parameter or struct member 'tpc' not described in 'memstick_init_req' memstick.c:295: warning: Function parameter or struct member 'buf' not described in 'memstick_init_req' memstick.c:295: warning: Function parameter or struct member 'length' not described in 'memstick_init_req' memstick.c:366: warning: Function parameter or struct member 'card' not described in 'memstick_set_rw_addr' memstick.c:513: warning: Function parameter or struct member 'host' not described in 'memstick_add_host' memstick.c:549: warning: Function parameter or struct member 'host' not described in 'memstick_remove_host' memstick.c:571: warning: Function parameter or struct member 'host' not described in 'memstick_free_host' memstick.c:582: warning: Function parameter or struct member 'host' not described in 'memstick_suspend_host' memstick.c:594: warning: Function parameter or struct member 'host' not described in 'memstick_resume_host' Signed-off-by: Randy Dunlap <[email protected]> Cc: Maxim Levitsky <[email protected]> Cc: Alex Dubov <[email protected]> Cc: Ulf Hansson <[email protected]> Cc: [email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 73656a6 commit a68d3cb

File tree

1 file changed

+27
-19
lines changed

1 file changed

+27
-19
lines changed

drivers/memstick/core/memstick.c

Lines changed: 27 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ static int memstick_dummy_check(struct memstick_dev *card)
200200

201201
/**
202202
* memstick_detect_change - schedule media detection on memstick host
203-
* @host - host to use
203+
* @host: host to use
204204
*/
205205
void memstick_detect_change(struct memstick_host *host)
206206
{
@@ -210,13 +210,15 @@ EXPORT_SYMBOL(memstick_detect_change);
210210

211211
/**
212212
* memstick_next_req - called by host driver to obtain next request to process
213-
* @host - host to use
214-
* @mrq - pointer to stick the request to
213+
* @host: host to use
214+
* @mrq: pointer to stick the request to
215215
*
216216
* Host calls this function from idle state (*mrq == NULL) or after finishing
217217
* previous request (*mrq should point to it). If previous request was
218-
* unsuccessful, it is retried for predetermined number of times. Return value
219-
* of 0 means that new request was assigned to the host.
218+
* unsuccessful, it is retried for predetermined number of times.
219+
*
220+
* Returns: value of 0 means that new request was assigned to the host.
221+
* Otherwise a negative error code is returned.
220222
*/
221223
int memstick_next_req(struct memstick_host *host, struct memstick_request **mrq)
222224
{
@@ -242,7 +244,7 @@ EXPORT_SYMBOL(memstick_next_req);
242244

243245
/**
244246
* memstick_new_req - notify the host that some requests are pending
245-
* @host - host to use
247+
* @host: host to use
246248
*/
247249
void memstick_new_req(struct memstick_host *host)
248250
{
@@ -256,9 +258,9 @@ EXPORT_SYMBOL(memstick_new_req);
256258

257259
/**
258260
* memstick_init_req_sg - set request fields needed for bulk data transfer
259-
* @mrq - request to use
260-
* @tpc - memstick Transport Protocol Command
261-
* @sg - TPC argument
261+
* @mrq: request to use
262+
* @tpc: memstick Transport Protocol Command
263+
* @sg: TPC argument
262264
*/
263265
void memstick_init_req_sg(struct memstick_request *mrq, unsigned char tpc,
264266
const struct scatterlist *sg)
@@ -281,10 +283,10 @@ EXPORT_SYMBOL(memstick_init_req_sg);
281283

282284
/**
283285
* memstick_init_req - set request fields needed for short data transfer
284-
* @mrq - request to use
285-
* @tpc - memstick Transport Protocol Command
286-
* @buf - TPC argument buffer
287-
* @length - TPC argument size
286+
* @mrq: request to use
287+
* @tpc: memstick Transport Protocol Command
288+
* @buf: TPC argument buffer
289+
* @length: TPC argument size
288290
*
289291
* The intended use of this function (transfer of data items several bytes
290292
* in size) allows us to just copy the value between request structure and
@@ -360,7 +362,9 @@ static int h_memstick_set_rw_addr(struct memstick_dev *card,
360362
/**
361363
* memstick_set_rw_addr - issue SET_RW_REG_ADDR request and wait for it to
362364
* complete
363-
* @card - media device to use
365+
* @card: media device to use
366+
*
367+
* Returns: error setting for the current request
364368
*/
365369
int memstick_set_rw_addr(struct memstick_dev *card)
366370
{
@@ -487,6 +491,8 @@ static void memstick_check(struct work_struct *work)
487491
* memstick_alloc_host - allocate a memstick_host structure
488492
* @extra: size of the user private data to allocate
489493
* @dev: parent device of the host
494+
*
495+
* Returns: %NULL on failure or the allocated &memstick_host pointer on success
490496
*/
491497
struct memstick_host *memstick_alloc_host(unsigned int extra,
492498
struct device *dev)
@@ -507,7 +513,9 @@ EXPORT_SYMBOL(memstick_alloc_host);
507513

508514
/**
509515
* memstick_add_host - start request processing on memstick host
510-
* @host - host to use
516+
* @host: host to use
517+
*
518+
* Returns: %0 on success or a negative error code on failure
511519
*/
512520
int memstick_add_host(struct memstick_host *host)
513521
{
@@ -543,7 +551,7 @@ EXPORT_SYMBOL(memstick_add_host);
543551

544552
/**
545553
* memstick_remove_host - stop request processing on memstick host
546-
* @host - host to use
554+
* @host: host to use
547555
*/
548556
void memstick_remove_host(struct memstick_host *host)
549557
{
@@ -565,7 +573,7 @@ EXPORT_SYMBOL(memstick_remove_host);
565573

566574
/**
567575
* memstick_free_host - free memstick host
568-
* @host - host to use
576+
* @host: host to use
569577
*/
570578
void memstick_free_host(struct memstick_host *host)
571579
{
@@ -576,7 +584,7 @@ EXPORT_SYMBOL(memstick_free_host);
576584

577585
/**
578586
* memstick_suspend_host - notify bus driver of host suspension
579-
* @host - host to use
587+
* @host: host to use
580588
*/
581589
void memstick_suspend_host(struct memstick_host *host)
582590
{
@@ -588,7 +596,7 @@ EXPORT_SYMBOL(memstick_suspend_host);
588596

589597
/**
590598
* memstick_resume_host - notify bus driver of host resumption
591-
* @host - host to use
599+
* @host: host to use
592600
*/
593601
void memstick_resume_host(struct memstick_host *host)
594602
{

0 commit comments

Comments
 (0)