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 <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20200429122151.50989-2-andriy.shevchenko@linux.intel.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
This commit is contained in:
parent
833d88f3fd
commit
9872e23d68
@ -147,9 +147,9 @@ static inline void dmaengine_debug_unregister(struct dma_device *dma_dev) { }
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* dev_to_dma_chan - convert a device pointer to its sysfs container object
|
* dev_to_dma_chan - convert a device pointer to its sysfs container object
|
||||||
* @dev - device node
|
* @dev: device node
|
||||||
*
|
*
|
||||||
* Must be called under dma_list_mutex
|
* Must be called under dma_list_mutex.
|
||||||
*/
|
*/
|
||||||
static struct dma_chan *dev_to_dma_chan(struct device *dev)
|
static struct dma_chan *dev_to_dma_chan(struct device *dev)
|
||||||
{
|
{
|
||||||
@ -249,22 +249,18 @@ static struct class dma_devclass = {
|
|||||||
|
|
||||||
/* --- client and device registration --- */
|
/* --- client and device registration --- */
|
||||||
|
|
||||||
/**
|
/* enable iteration over all operation types */
|
||||||
* dma_cap_mask_all - enable iteration over all operation types
|
|
||||||
*/
|
|
||||||
static dma_cap_mask_t dma_cap_mask_all;
|
static dma_cap_mask_t dma_cap_mask_all;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* dma_chan_tbl_ent - tracks channel allocations per core/operation
|
* struct dma_chan_tbl_ent - tracks channel allocations per core/operation
|
||||||
* @chan - associated channel for this entry
|
* @chan: associated channel for this entry
|
||||||
*/
|
*/
|
||||||
struct dma_chan_tbl_ent {
|
struct dma_chan_tbl_ent {
|
||||||
struct dma_chan *chan;
|
struct dma_chan *chan;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/* percpu lookup table for memory-to-memory offload providers */
|
||||||
* channel_table - percpu lookup table for memory-to-memory offload providers
|
|
||||||
*/
|
|
||||||
static struct dma_chan_tbl_ent __percpu *channel_table[DMA_TX_TYPE_END];
|
static struct dma_chan_tbl_ent __percpu *channel_table[DMA_TX_TYPE_END];
|
||||||
|
|
||||||
static int __init dma_channel_table_init(void)
|
static int __init dma_channel_table_init(void)
|
||||||
@ -301,8 +297,11 @@ static int __init dma_channel_table_init(void)
|
|||||||
arch_initcall(dma_channel_table_init);
|
arch_initcall(dma_channel_table_init);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* dma_chan_is_local - returns true if the channel is in the same numa-node as
|
* dma_chan_is_local - checks if the channel is in the same NUMA-node as the CPU
|
||||||
* the cpu
|
* @chan: DMA channel to test
|
||||||
|
* @cpu: CPU index which the channel should be close to
|
||||||
|
*
|
||||||
|
* Returns true if the channel is in the same NUMA-node as the CPU.
|
||||||
*/
|
*/
|
||||||
static bool dma_chan_is_local(struct dma_chan *chan, int cpu)
|
static bool dma_chan_is_local(struct dma_chan *chan, int cpu)
|
||||||
{
|
{
|
||||||
@ -312,14 +311,14 @@ static bool dma_chan_is_local(struct dma_chan *chan, int cpu)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* min_chan - returns the channel with min count and in the same numa-node as
|
* min_chan - finds the channel with min count and in the same NUMA-node as the CPU
|
||||||
* the cpu
|
* @cap: capability to match
|
||||||
* @cap: capability to match
|
* @cpu: CPU index which the channel should be close to
|
||||||
* @cpu: cpu index which the channel should be close to
|
|
||||||
*
|
*
|
||||||
* If some channels are close to the given cpu, the one with the lowest
|
* If some channels are close to the given CPU, the one with the lowest
|
||||||
* reference count is returned. Otherwise, cpu is ignored and only the
|
* reference count is returned. Otherwise, CPU is ignored and only the
|
||||||
* reference count is taken into account.
|
* reference count is taken into account.
|
||||||
|
*
|
||||||
* Must be called under dma_list_mutex.
|
* Must be called under dma_list_mutex.
|
||||||
*/
|
*/
|
||||||
static struct dma_chan *min_chan(enum dma_transaction_type cap, int cpu)
|
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)
|
|||||||
/**
|
/**
|
||||||
* dma_channel_rebalance - redistribute the available channels
|
* dma_channel_rebalance - redistribute the available channels
|
||||||
*
|
*
|
||||||
* Optimize for cpu isolation (each cpu gets a dedicated channel for an
|
* Optimize for CPU isolation (each CPU gets a dedicated channel for an
|
||||||
* operation type) in the SMP case, and operation isolation (avoid
|
* operation type) in the SMP case, and operation isolation (avoid
|
||||||
* multi-tasking channels) in the non-SMP case. Must be called under
|
* multi-tasking channels) in the non-SMP case.
|
||||||
* dma_list_mutex.
|
*
|
||||||
|
* Must be called under dma_list_mutex.
|
||||||
*/
|
*/
|
||||||
static void dma_channel_rebalance(void)
|
static void dma_channel_rebalance(void)
|
||||||
{
|
{
|
||||||
@ -410,9 +410,9 @@ static struct module *dma_chan_to_owner(struct dma_chan *chan)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* balance_ref_count - catch up the channel reference count
|
* balance_ref_count - catch up the channel reference count
|
||||||
* @chan - channel to balance ->client_count versus dmaengine_ref_count
|
* @chan: channel to balance ->client_count versus dmaengine_ref_count
|
||||||
*
|
*
|
||||||
* balance_ref_count must be called under dma_list_mutex
|
* Must be called under dma_list_mutex.
|
||||||
*/
|
*/
|
||||||
static void balance_ref_count(struct dma_chan *chan)
|
static void balance_ref_count(struct dma_chan *chan)
|
||||||
{
|
{
|
||||||
@ -442,10 +442,10 @@ static void dma_device_put(struct dma_device *device)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* dma_chan_get - try to grab a dma channel's parent driver module
|
* dma_chan_get - try to grab a DMA channel's parent driver module
|
||||||
* @chan - channel to grab
|
* @chan: channel to grab
|
||||||
*
|
*
|
||||||
* Must be called under dma_list_mutex
|
* Must be called under dma_list_mutex.
|
||||||
*/
|
*/
|
||||||
static int dma_chan_get(struct dma_chan *chan)
|
static int dma_chan_get(struct dma_chan *chan)
|
||||||
{
|
{
|
||||||
@ -489,10 +489,10 @@ module_put_out:
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* dma_chan_put - drop a reference to a dma channel's parent driver module
|
* dma_chan_put - drop a reference to a DMA channel's parent driver module
|
||||||
* @chan - channel to release
|
* @chan: channel to release
|
||||||
*
|
*
|
||||||
* Must be called under dma_list_mutex
|
* Must be called under dma_list_mutex.
|
||||||
*/
|
*/
|
||||||
static void dma_chan_put(struct dma_chan *chan)
|
static void dma_chan_put(struct dma_chan *chan)
|
||||||
{
|
{
|
||||||
@ -543,7 +543,7 @@ EXPORT_SYMBOL(dma_sync_wait);
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* dma_find_channel - find a channel to carry out the operation
|
* dma_find_channel - find a channel to carry out the operation
|
||||||
* @tx_type: transaction type
|
* @tx_type: transaction type
|
||||||
*/
|
*/
|
||||||
struct dma_chan *dma_find_channel(enum dma_transaction_type tx_type)
|
struct dma_chan *dma_find_channel(enum dma_transaction_type tx_type)
|
||||||
{
|
{
|
||||||
@ -683,7 +683,7 @@ static struct dma_chan *find_candidate(struct dma_device *device,
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* dma_get_slave_channel - try to get specific channel exclusively
|
* dma_get_slave_channel - try to get specific channel exclusively
|
||||||
* @chan: target channel
|
* @chan: target channel
|
||||||
*/
|
*/
|
||||||
struct dma_chan *dma_get_slave_channel(struct dma_chan *chan)
|
struct dma_chan *dma_get_slave_channel(struct dma_chan *chan)
|
||||||
{
|
{
|
||||||
@ -737,10 +737,10 @@ EXPORT_SYMBOL_GPL(dma_get_any_slave_channel);
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* __dma_request_channel - try to allocate an exclusive channel
|
* __dma_request_channel - try to allocate an exclusive channel
|
||||||
* @mask: capabilities that the channel must satisfy
|
* @mask: capabilities that the channel must satisfy
|
||||||
* @fn: optional callback to disposition available channels
|
* @fn: optional callback to disposition available channels
|
||||||
* @fn_param: opaque parameter to pass to dma_filter_fn
|
* @fn_param: opaque parameter to pass to dma_filter_fn()
|
||||||
* @np: device node to look for DMA channels
|
* @np: device node to look for DMA channels
|
||||||
*
|
*
|
||||||
* Returns pointer to appropriate DMA channel on success or NULL.
|
* Returns pointer to appropriate DMA channel on success or NULL.
|
||||||
*/
|
*/
|
||||||
@ -883,7 +883,7 @@ EXPORT_SYMBOL_GPL(dma_request_slave_channel);
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* dma_request_chan_by_mask - allocate a channel satisfying certain capabilities
|
* dma_request_chan_by_mask - allocate a channel satisfying certain capabilities
|
||||||
* @mask: capabilities that the channel must satisfy
|
* @mask: capabilities that the channel must satisfy
|
||||||
*
|
*
|
||||||
* Returns pointer to appropriate DMA channel on success or an error pointer.
|
* Returns pointer to appropriate DMA channel on success or an error pointer.
|
||||||
*/
|
*/
|
||||||
@ -974,7 +974,7 @@ void dmaengine_get(void)
|
|||||||
EXPORT_SYMBOL(dmaengine_get);
|
EXPORT_SYMBOL(dmaengine_get);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* dmaengine_put - let dma drivers be removed when ref_count == 0
|
* dmaengine_put - let DMA drivers be removed when ref_count == 0
|
||||||
*/
|
*/
|
||||||
void dmaengine_put(void)
|
void dmaengine_put(void)
|
||||||
{
|
{
|
||||||
@ -1146,7 +1146,7 @@ EXPORT_SYMBOL_GPL(dma_async_device_channel_unregister);
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* dma_async_device_register - registers DMA devices found
|
* dma_async_device_register - registers DMA devices found
|
||||||
* @device: &dma_device
|
* @device: pointer to &struct dma_device
|
||||||
*
|
*
|
||||||
* After calling this routine the structure should not be freed except in the
|
* After calling this routine the structure should not be freed except in the
|
||||||
* device_release() callback which will be called after
|
* device_release() callback which will be called after
|
||||||
@ -1315,7 +1315,7 @@ EXPORT_SYMBOL(dma_async_device_register);
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* dma_async_device_unregister - unregister a DMA device
|
* dma_async_device_unregister - unregister a DMA device
|
||||||
* @device: &dma_device
|
* @device: pointer to &struct dma_device
|
||||||
*
|
*
|
||||||
* This routine is called by dma driver exit routines, dmaengine holds module
|
* This routine is called by dma driver exit routines, dmaengine holds module
|
||||||
* references to prevent it being called while channels are in use.
|
* 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)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* dmaenginem_async_device_register - registers DMA devices found
|
* dmaenginem_async_device_register - registers DMA devices found
|
||||||
* @device: &dma_device
|
* @device: pointer to &struct dma_device
|
||||||
*
|
*
|
||||||
* The operation is managed and will be undone on driver detach.
|
* The operation is managed and will be undone on driver detach.
|
||||||
*/
|
*/
|
||||||
@ -1588,8 +1588,9 @@ int dmaengine_desc_set_metadata_len(struct dma_async_tx_descriptor *desc,
|
|||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(dmaengine_desc_set_metadata_len);
|
EXPORT_SYMBOL_GPL(dmaengine_desc_set_metadata_len);
|
||||||
|
|
||||||
/* dma_wait_for_async_tx - spin wait for a transaction to complete
|
/**
|
||||||
* @tx: in-flight transaction to wait on
|
* dma_wait_for_async_tx - spin wait for a transaction to complete
|
||||||
|
* @tx: in-flight transaction to wait on
|
||||||
*/
|
*/
|
||||||
enum dma_status
|
enum dma_status
|
||||||
dma_wait_for_async_tx(struct dma_async_tx_descriptor *tx)
|
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)
|
|||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(dma_wait_for_async_tx);
|
EXPORT_SYMBOL_GPL(dma_wait_for_async_tx);
|
||||||
|
|
||||||
/* dma_run_dependencies - helper routine for dma drivers to process
|
/**
|
||||||
* (start) dependent operations on their target channel
|
* dma_run_dependencies - process dependent operations on the target channel
|
||||||
* @tx: transaction with dependencies
|
* @tx: transaction with dependencies
|
||||||
|
*
|
||||||
|
* Helper routine for DMA drivers to process (start) dependent operations
|
||||||
|
* on their target channel.
|
||||||
*/
|
*/
|
||||||
void dma_run_dependencies(struct dma_async_tx_descriptor *tx)
|
void dma_run_dependencies(struct dma_async_tx_descriptor *tx)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user