Skip to content

Commit

Permalink
drivers: dma: dma_dw_common: Improve context information in log prints
Browse files Browse the repository at this point in the history
The LOG_* macros already print the module name and the function, printting
again the __func__ have no additional benefit.

The debug prints lack context which can be used to identify the channel
which the message was printed for.
For example:
<inf> dma_dw_common: dw_dma_stop: dw_dma_stop: dma 0 channel drain time out

when multiple channels from multiple controllers are used we don't know
the exact channel that has been stopped:
<inf> dma_dw_common: dw_dma_stop: dma@7c000: channel 0 drain time out
<inf> dma_dw_common: dw_dma_stop: dma@7d000: channel 0 drain time out

Convert all LOG prints to add usable context to them and use the following
pattern wherever it is possible:
dma_dw_common: <function name>: <DMA device name>: message
for example:
<inf> dma_dw_common: dw_dma_stop: dma@7c000: channel 0 config

The parameter list of dw_dma_avail_data_size() and dw_dma_free_data_size()
extended to pass the dev pointer.

Signed-off-by: Peter Ujfalusi <[email protected]>
  • Loading branch information
ujfalusi authored and fabiobaltieri committed Feb 26, 2024
1 parent 8392683 commit 852f2ed
Showing 1 changed file with 70 additions and 71 deletions.
Loading

0 comments on commit 852f2ed

Please sign in to comment.