@@ -147,9 +147,9 @@ static inline void dmaengine_debug_unregister(struct dma_device *dma_dev) { }
147
147
148
148
/**
149
149
* dev_to_dma_chan - convert a device pointer to its sysfs container object
150
- * @dev - device node
150
+ * @dev: device node
151
151
*
152
- * Must be called under dma_list_mutex
152
+ * Must be called under dma_list_mutex.
153
153
*/
154
154
static struct dma_chan * dev_to_dma_chan (struct device * dev )
155
155
{
@@ -249,22 +249,18 @@ static struct class dma_devclass = {
249
249
250
250
/* --- client and device registration --- */
251
251
252
- /**
253
- * dma_cap_mask_all - enable iteration over all operation types
254
- */
252
+ /* enable iteration over all operation types */
255
253
static dma_cap_mask_t dma_cap_mask_all ;
256
254
257
255
/**
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
260
258
*/
261
259
struct dma_chan_tbl_ent {
262
260
struct dma_chan * chan ;
263
261
};
264
262
265
- /**
266
- * channel_table - percpu lookup table for memory-to-memory offload providers
267
- */
263
+ /* percpu lookup table for memory-to-memory offload providers */
268
264
static struct dma_chan_tbl_ent __percpu * channel_table [DMA_TX_TYPE_END ];
269
265
270
266
static int __init dma_channel_table_init (void )
@@ -301,8 +297,11 @@ static int __init dma_channel_table_init(void)
301
297
arch_initcall (dma_channel_table_init );
302
298
303
299
/**
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.
306
305
*/
307
306
static bool dma_chan_is_local (struct dma_chan * chan , int cpu )
308
307
{
@@ -312,14 +311,14 @@ static bool dma_chan_is_local(struct dma_chan *chan, int cpu)
312
311
}
313
312
314
313
/**
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
319
317
*
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
322
320
* reference count is taken into account.
321
+ *
323
322
* Must be called under dma_list_mutex.
324
323
*/
325
324
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)
357
356
/**
358
357
* dma_channel_rebalance - redistribute the available channels
359
358
*
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.
364
364
*/
365
365
static void dma_channel_rebalance (void )
366
366
{
@@ -410,9 +410,9 @@ static struct module *dma_chan_to_owner(struct dma_chan *chan)
410
410
411
411
/**
412
412
* 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
414
414
*
415
- * balance_ref_count must be called under dma_list_mutex
415
+ * Must be called under dma_list_mutex.
416
416
*/
417
417
static void balance_ref_count (struct dma_chan * chan )
418
418
{
@@ -442,10 +442,10 @@ static void dma_device_put(struct dma_device *device)
442
442
}
443
443
444
444
/**
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
447
447
*
448
- * Must be called under dma_list_mutex
448
+ * Must be called under dma_list_mutex.
449
449
*/
450
450
static int dma_chan_get (struct dma_chan * chan )
451
451
{
@@ -489,10 +489,10 @@ static int dma_chan_get(struct dma_chan *chan)
489
489
}
490
490
491
491
/**
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
494
494
*
495
- * Must be called under dma_list_mutex
495
+ * Must be called under dma_list_mutex.
496
496
*/
497
497
static void dma_chan_put (struct dma_chan * chan )
498
498
{
@@ -543,7 +543,7 @@ EXPORT_SYMBOL(dma_sync_wait);
543
543
544
544
/**
545
545
* dma_find_channel - find a channel to carry out the operation
546
- * @tx_type: transaction type
546
+ * @tx_type: transaction type
547
547
*/
548
548
struct dma_chan * dma_find_channel (enum dma_transaction_type tx_type )
549
549
{
@@ -683,7 +683,7 @@ static struct dma_chan *find_candidate(struct dma_device *device,
683
683
684
684
/**
685
685
* dma_get_slave_channel - try to get specific channel exclusively
686
- * @chan: target channel
686
+ * @chan: target channel
687
687
*/
688
688
struct dma_chan * dma_get_slave_channel (struct dma_chan * chan )
689
689
{
@@ -737,10 +737,10 @@ EXPORT_SYMBOL_GPL(dma_get_any_slave_channel);
737
737
738
738
/**
739
739
* __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
744
744
*
745
745
* Returns pointer to appropriate DMA channel on success or NULL.
746
746
*/
@@ -883,7 +883,7 @@ EXPORT_SYMBOL_GPL(dma_request_slave_channel);
883
883
884
884
/**
885
885
* 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
887
887
*
888
888
* Returns pointer to appropriate DMA channel on success or an error pointer.
889
889
*/
@@ -974,7 +974,7 @@ void dmaengine_get(void)
974
974
EXPORT_SYMBOL (dmaengine_get );
975
975
976
976
/**
977
- * dmaengine_put - let dma drivers be removed when ref_count == 0
977
+ * dmaengine_put - let DMA drivers be removed when ref_count == 0
978
978
*/
979
979
void dmaengine_put (void )
980
980
{
@@ -1146,7 +1146,7 @@ EXPORT_SYMBOL_GPL(dma_async_device_channel_unregister);
1146
1146
1147
1147
/**
1148
1148
* dma_async_device_register - registers DMA devices found
1149
- * @device: & dma_device
1149
+ * @device: pointer to &struct dma_device
1150
1150
*
1151
1151
* After calling this routine the structure should not be freed except in the
1152
1152
* device_release() callback which will be called after
@@ -1315,7 +1315,7 @@ EXPORT_SYMBOL(dma_async_device_register);
1315
1315
1316
1316
/**
1317
1317
* dma_async_device_unregister - unregister a DMA device
1318
- * @device: & dma_device
1318
+ * @device: pointer to &struct dma_device
1319
1319
*
1320
1320
* This routine is called by dma driver exit routines, dmaengine holds module
1321
1321
* 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)
1351
1351
1352
1352
/**
1353
1353
* dmaenginem_async_device_register - registers DMA devices found
1354
- * @device: & dma_device
1354
+ * @device: pointer to &struct dma_device
1355
1355
*
1356
1356
* The operation is managed and will be undone on driver detach.
1357
1357
*/
@@ -1588,8 +1588,9 @@ int dmaengine_desc_set_metadata_len(struct dma_async_tx_descriptor *desc,
1588
1588
}
1589
1589
EXPORT_SYMBOL_GPL (dmaengine_desc_set_metadata_len );
1590
1590
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
1593
1594
*/
1594
1595
enum dma_status
1595
1596
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)
1612
1613
}
1613
1614
EXPORT_SYMBOL_GPL (dma_wait_for_async_tx );
1614
1615
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.
1618
1622
*/
1619
1623
void dma_run_dependencies (struct dma_async_tx_descriptor * tx )
1620
1624
{
0 commit comments