Skip to content

Commit 9872e23

Browse files
andy-shevvinodkoul
authored andcommitted
dmaengine: Fix doc strings to satisfy validation script
The validation kernel doc script complains about undescribed function parameters .../dmaengine.c:155: warning: Function parameter or member 'dev' not descr ibed in 'dev_to_dma_chan' .../dmaengine.c:251: warning: cannot understand function prototype: 'dma_cap_mask_t dma_cap_mask_all; ' .../dmaengine.c:257: warning: cannot understand function prototype: 'struct dma_chan_tbl_ent ' .../dmaengine.c:264: warning: cannot understand function prototype: 'struct dma_chan_tbl_ent __percpu *channel_table[DMA_TX_TYPE_END]; ' .../dmaengine.c:304: warning: Function parameter or member 'chan' not described in 'dma_chan_is_local' .../dmaengine.c:304: warning: Function parameter or member 'cpu' not described in 'dma_chan_is_local' .../dmaengine.c:414: warning: Function parameter or member 'chan' not described in 'balance_ref_count' .../dmaengine.c:447: warning: Function parameter or member 'chan' not described in 'dma_chan_get' .../dmaengine.c:494: warning: Function parameter or member 'chan' not described in 'dma_chan_put' Add descriptions to the function parameters and in some cases update existing text as well. Signed-off-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent 833d88f commit 9872e23

File tree

1 file changed

+50
-46
lines changed

1 file changed

+50
-46
lines changed

drivers/dma/dmaengine.c

Lines changed: 50 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,9 @@ static inline void dmaengine_debug_unregister(struct dma_device *dma_dev) { }
147147

148148
/**
149149
* dev_to_dma_chan - convert a device pointer to its sysfs container object
150-
* @dev - device node
150+
* @dev: device node
151151
*
152-
* Must be called under dma_list_mutex
152+
* Must be called under dma_list_mutex.
153153
*/
154154
static struct dma_chan *dev_to_dma_chan(struct device *dev)
155155
{
@@ -249,22 +249,18 @@ static struct class dma_devclass = {
249249

250250
/* --- client and device registration --- */
251251

252-
/**
253-
* dma_cap_mask_all - enable iteration over all operation types
254-
*/
252+
/* enable iteration over all operation types */
255253
static dma_cap_mask_t dma_cap_mask_all;
256254

257255
/**
258-
* dma_chan_tbl_ent - tracks channel allocations per core/operation
259-
* @chan - associated channel for this entry
256+
* struct dma_chan_tbl_ent - tracks channel allocations per core/operation
257+
* @chan: associated channel for this entry
260258
*/
261259
struct dma_chan_tbl_ent {
262260
struct dma_chan *chan;
263261
};
264262

265-
/**
266-
* channel_table - percpu lookup table for memory-to-memory offload providers
267-
*/
263+
/* percpu lookup table for memory-to-memory offload providers */
268264
static struct dma_chan_tbl_ent __percpu *channel_table[DMA_TX_TYPE_END];
269265

270266
static int __init dma_channel_table_init(void)
@@ -301,8 +297,11 @@ static int __init dma_channel_table_init(void)
301297
arch_initcall(dma_channel_table_init);
302298

303299
/**
304-
* dma_chan_is_local - returns true if the channel is in the same numa-node as
305-
* the cpu
300+
* dma_chan_is_local - checks if the channel is in the same NUMA-node as the CPU
301+
* @chan: DMA channel to test
302+
* @cpu: CPU index which the channel should be close to
303+
*
304+
* Returns true if the channel is in the same NUMA-node as the CPU.
306305
*/
307306
static bool dma_chan_is_local(struct dma_chan *chan, int cpu)
308307
{
@@ -312,14 +311,14 @@ static bool dma_chan_is_local(struct dma_chan *chan, int cpu)
312311
}
313312

314313
/**
315-
* min_chan - returns the channel with min count and in the same numa-node as
316-
* the cpu
317-
* @cap: capability to match
318-
* @cpu: cpu index which the channel should be close to
314+
* min_chan - finds the channel with min count and in the same NUMA-node as the CPU
315+
* @cap: capability to match
316+
* @cpu: CPU index which the channel should be close to
319317
*
320-
* If some channels are close to the given cpu, the one with the lowest
321-
* reference count is returned. Otherwise, cpu is ignored and only the
318+
* If some channels are close to the given CPU, the one with the lowest
319+
* reference count is returned. Otherwise, CPU is ignored and only the
322320
* reference count is taken into account.
321+
*
323322
* Must be called under dma_list_mutex.
324323
*/
325324
static struct dma_chan *min_chan(enum dma_transaction_type cap, int cpu)
@@ -357,10 +356,11 @@ static struct dma_chan *min_chan(enum dma_transaction_type cap, int cpu)
357356
/**
358357
* dma_channel_rebalance - redistribute the available channels
359358
*
360-
* Optimize for cpu isolation (each cpu gets a dedicated channel for an
361-
* operation type) in the SMP case, and operation isolation (avoid
362-
* multi-tasking channels) in the non-SMP case. Must be called under
363-
* dma_list_mutex.
359+
* Optimize for CPU isolation (each CPU gets a dedicated channel for an
360+
* operation type) in the SMP case, and operation isolation (avoid
361+
* multi-tasking channels) in the non-SMP case.
362+
*
363+
* Must be called under dma_list_mutex.
364364
*/
365365
static void dma_channel_rebalance(void)
366366
{
@@ -410,9 +410,9 @@ static struct module *dma_chan_to_owner(struct dma_chan *chan)
410410

411411
/**
412412
* balance_ref_count - catch up the channel reference count
413-
* @chan - channel to balance ->client_count versus dmaengine_ref_count
413+
* @chan: channel to balance ->client_count versus dmaengine_ref_count
414414
*
415-
* balance_ref_count must be called under dma_list_mutex
415+
* Must be called under dma_list_mutex.
416416
*/
417417
static void balance_ref_count(struct dma_chan *chan)
418418
{
@@ -442,10 +442,10 @@ static void dma_device_put(struct dma_device *device)
442442
}
443443

444444
/**
445-
* dma_chan_get - try to grab a dma channel's parent driver module
446-
* @chan - channel to grab
445+
* dma_chan_get - try to grab a DMA channel's parent driver module
446+
* @chan: channel to grab
447447
*
448-
* Must be called under dma_list_mutex
448+
* Must be called under dma_list_mutex.
449449
*/
450450
static int dma_chan_get(struct dma_chan *chan)
451451
{
@@ -489,10 +489,10 @@ static int dma_chan_get(struct dma_chan *chan)
489489
}
490490

491491
/**
492-
* dma_chan_put - drop a reference to a dma channel's parent driver module
493-
* @chan - channel to release
492+
* dma_chan_put - drop a reference to a DMA channel's parent driver module
493+
* @chan: channel to release
494494
*
495-
* Must be called under dma_list_mutex
495+
* Must be called under dma_list_mutex.
496496
*/
497497
static void dma_chan_put(struct dma_chan *chan)
498498
{
@@ -543,7 +543,7 @@ EXPORT_SYMBOL(dma_sync_wait);
543543

544544
/**
545545
* dma_find_channel - find a channel to carry out the operation
546-
* @tx_type: transaction type
546+
* @tx_type: transaction type
547547
*/
548548
struct dma_chan *dma_find_channel(enum dma_transaction_type tx_type)
549549
{
@@ -683,7 +683,7 @@ static struct dma_chan *find_candidate(struct dma_device *device,
683683

684684
/**
685685
* dma_get_slave_channel - try to get specific channel exclusively
686-
* @chan: target channel
686+
* @chan: target channel
687687
*/
688688
struct dma_chan *dma_get_slave_channel(struct dma_chan *chan)
689689
{
@@ -737,10 +737,10 @@ EXPORT_SYMBOL_GPL(dma_get_any_slave_channel);
737737

738738
/**
739739
* __dma_request_channel - try to allocate an exclusive channel
740-
* @mask: capabilities that the channel must satisfy
741-
* @fn: optional callback to disposition available channels
742-
* @fn_param: opaque parameter to pass to dma_filter_fn
743-
* @np: device node to look for DMA channels
740+
* @mask: capabilities that the channel must satisfy
741+
* @fn: optional callback to disposition available channels
742+
* @fn_param: opaque parameter to pass to dma_filter_fn()
743+
* @np: device node to look for DMA channels
744744
*
745745
* Returns pointer to appropriate DMA channel on success or NULL.
746746
*/
@@ -883,7 +883,7 @@ EXPORT_SYMBOL_GPL(dma_request_slave_channel);
883883

884884
/**
885885
* dma_request_chan_by_mask - allocate a channel satisfying certain capabilities
886-
* @mask: capabilities that the channel must satisfy
886+
* @mask: capabilities that the channel must satisfy
887887
*
888888
* Returns pointer to appropriate DMA channel on success or an error pointer.
889889
*/
@@ -974,7 +974,7 @@ void dmaengine_get(void)
974974
EXPORT_SYMBOL(dmaengine_get);
975975

976976
/**
977-
* dmaengine_put - let dma drivers be removed when ref_count == 0
977+
* dmaengine_put - let DMA drivers be removed when ref_count == 0
978978
*/
979979
void dmaengine_put(void)
980980
{
@@ -1146,7 +1146,7 @@ EXPORT_SYMBOL_GPL(dma_async_device_channel_unregister);
11461146

11471147
/**
11481148
* dma_async_device_register - registers DMA devices found
1149-
* @device: &dma_device
1149+
* @device: pointer to &struct dma_device
11501150
*
11511151
* After calling this routine the structure should not be freed except in the
11521152
* device_release() callback which will be called after
@@ -1315,7 +1315,7 @@ EXPORT_SYMBOL(dma_async_device_register);
13151315

13161316
/**
13171317
* dma_async_device_unregister - unregister a DMA device
1318-
* @device: &dma_device
1318+
* @device: pointer to &struct dma_device
13191319
*
13201320
* This routine is called by dma driver exit routines, dmaengine holds module
13211321
* references to prevent it being called while channels are in use.
@@ -1351,7 +1351,7 @@ static void dmam_device_release(struct device *dev, void *res)
13511351

13521352
/**
13531353
* dmaenginem_async_device_register - registers DMA devices found
1354-
* @device: &dma_device
1354+
* @device: pointer to &struct dma_device
13551355
*
13561356
* The operation is managed and will be undone on driver detach.
13571357
*/
@@ -1588,8 +1588,9 @@ int dmaengine_desc_set_metadata_len(struct dma_async_tx_descriptor *desc,
15881588
}
15891589
EXPORT_SYMBOL_GPL(dmaengine_desc_set_metadata_len);
15901590

1591-
/* dma_wait_for_async_tx - spin wait for a transaction to complete
1592-
* @tx: in-flight transaction to wait on
1591+
/**
1592+
* dma_wait_for_async_tx - spin wait for a transaction to complete
1593+
* @tx: in-flight transaction to wait on
15931594
*/
15941595
enum dma_status
15951596
dma_wait_for_async_tx(struct dma_async_tx_descriptor *tx)
@@ -1612,9 +1613,12 @@ dma_wait_for_async_tx(struct dma_async_tx_descriptor *tx)
16121613
}
16131614
EXPORT_SYMBOL_GPL(dma_wait_for_async_tx);
16141615

1615-
/* dma_run_dependencies - helper routine for dma drivers to process
1616-
* (start) dependent operations on their target channel
1617-
* @tx: transaction with dependencies
1616+
/**
1617+
* dma_run_dependencies - process dependent operations on the target channel
1618+
* @tx: transaction with dependencies
1619+
*
1620+
* Helper routine for DMA drivers to process (start) dependent operations
1621+
* on their target channel.
16181622
*/
16191623
void dma_run_dependencies(struct dma_async_tx_descriptor *tx)
16201624
{

0 commit comments

Comments
 (0)