dmaengine: xilinx: Add empty device_config function
Subsystems (2)
PATCH 1/1 dmaengine: xilinx: Add empty device_config function
Various DMA users call the dmaengine_slave_config() and expect it to succeed, but that can only succeed if .device_config is implemented. Add empty device_config function rather than patching all the places which use dmaengine_slave_config().
--- drivers/dma/xilinx/xilinx_dma.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)
drivers/dma/xilinx/xilinx_dma.c +12 -0
@@ -1658,6 +1658,17 @@ static void xilinx_dma_issue_pending(struct dma_chan *dchan)spin_unlock_irqrestore (&chan->lock, flags); } +/** +* xilinx_dma_issue_pending - Configure the DMA channel +* @dchan: DMA channel +* @config: channel configuration +*/ +static int xilinx_dma_device_config (struct dma_chan *dchan, +struct dma_slave_config *config) +{ +return 0 ; +} +/** * xilinx_dma_complete_descriptor - Mark the active descriptor as complete * @chan : xilinx DMA channel
@@ -3096,6 +3107,7 @@ static int xilinx_dma_probe(struct platform_device *pdev) xdev->common.device_synchronize = xilinx_dma_synchronize; xdev->common.device_tx_status = xilinx_dma_tx_status; xdev->common.device_issue_pending = xilinx_dma_issue_pending; + xdev->common.device_config = xilinx_dma_device_config;if (xdev->dma_config->dmatype ==XDMA_TYPE_AXIDMA ) {dma_cap_set (DMA_CYCLIC , xdev->common.cap_mask); xdev->common.device_prep_slave_sg = xilinx_dma_prep_slave_sg;
Signature · 1 line
2.30.2
Vinod Koul
maintainerQuoted 4 lines · Marek Vasut
Various DMA users call the
dmaengine_slave_config()and expect it to succeed, but that can only succeed if .device_config is implemented. Add emptydevice_configfunction rather than patching all the places which usedmaengine_slave_config().
.device_config is optional, Yes the dmaengine_slave_config() will check and return error...
I think it would make sense to handle this in caller... (ignore ENOSYS..) rather than add a dummy one
Quoted 6 lines
Signed-off-by Marek Vasut <[email protected]>Cc Akinobu Mita <[email protected]>Cc Kedareswara rao Appana <[email protected]>Cc Michal Simek <[email protected]>Cc Vinod Koul <[email protected]>
ummm..? you really need to update this :)
Quoted 36 lines
--- drivers/dma/xilinx/xilinx_dma.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)drivers/dma/xilinx/xilinx_dma.c +12
-0@@ -1658,6 +1658,17 @@ static void xilinx_dma_issue_pending(struct dma_chan *dchan)spin_unlock_irqrestore (&chan->lock, flags); } +/** +* xilinx_dma_issue_pending - Configure the DMA channel +* @dchan: DMA channel +* @config: channel configuration +*/ +static int xilinx_dma_device_config (struct dma_chan *dchan, +struct dma_slave_config *config) +{ +return 0 ; +} +/** * xilinx_dma_complete_descriptor - Mark the active descriptor as complete * @chan : xilinx DMA channel @@ -3096,6 +3107,7 @@ static int xilinx_dma_probe(struct platform_device *pdev) xdev->common.device_synchronize = xilinx_dma_synchronize; xdev->common.device_tx_status = xilinx_dma_tx_status; xdev->common.device_issue_pending = xilinx_dma_issue_pending; + xdev->common.device_config = xilinx_dma_device_config;if (xdev->dma_config->dmatype ==XDMA_TYPE_AXIDMA ) {dma_cap_set (DMA_CYCLIC , xdev->common.cap_mask); xdev->common.device_prep_slave_sg = xilinx_dma_prep_slave_sg;Signature · 1 line
2.30.2
Signature · 1 line
~Vinod
Quoted 11 lines · Vinod Koul
Quoted 4 lines · Marek Vasut
Various DMA users call the
dmaengine_slave_config()and expect it to succeed, but that can only succeed if .device_config is implemented. Add emptydevice_configfunction rather than patching all the places which usedmaengine_slave_config()..device_config is optional, Yes the
dmaengine_slave_config()will check and return error...I think it would make sense to handle this in caller... (ignore ENOSYS..) rather than add a dummy one
That's what I was trying to avoid -- patching all the places in kernel which might fail. Why handle it in caller ?
Quoted 7 lines
Quoted 5 lines
Signed-off-by Marek Vasut <[email protected]>Cc Akinobu Mita <[email protected]>Cc Kedareswara rao Appana <[email protected]>Cc Michal Simek <[email protected]>Cc Vinod Koul <[email protected]>ummm..? you really need to update this :)
I had the patch around for a while indeed, it fell through the cracks.
Vinod Koul
maintainerQuoted 7 lines · Marek Vasut
Quoted 6 lines · Vinod Koul
Quoted 4 lines · Marek Vasut
Various DMA users call the
dmaengine_slave_config()and expect it to succeed, but that can only succeed if .device_config is implemented. Add emptydevice_configfunction rather than patching all the places which usedmaengine_slave_config().
Quoted 8 lines
Quoted 5 lines
.device_config is optional, Yes the
dmaengine_slave_config()will check and return error...I think it would make sense to handle this in caller... (ignore ENOSYS..) rather than add a dummy one
That's what I was trying to avoid -- patching all the places in kernel which might fail. Why handle it in caller ?
And how many places would that be..? The xilinx driver using xilinx dma right>
Quoted 9 lines
Quoted 7 lines
Quoted 5 lines
Signed-off-by Marek Vasut <[email protected]>Cc Akinobu Mita <[email protected]>Cc Kedareswara rao Appana <[email protected]>Cc Michal Simek <[email protected]>Cc Vinod Koul <[email protected]>ummm..? you really need to update this :)
I had the patch around for a while indeed, it fell through the cracks.
This has to be more than 3 yrs old then!
Signature · 1 line
~Vinod
Quoted 11 lines · Vinod Koul
Quoted 10 lines · Marek Vasut
Quoted 9 lines · Vinod Koul
Quoted 4 lines · Marek Vasut
Various DMA users call the
dmaengine_slave_config()and expect it to succeed, but that can only succeed if .device_config is implemented. Add emptydevice_configfunction rather than patching all the places which usedmaengine_slave_config()..device_config is optional, Yes the
dmaengine_slave_config()will check and return error...
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
I think it would make sense to handle this in caller... (ignore ENOSYS..) rather than add a dummy one
That's what I was trying to avoid -- patching all the places in kernel which might fail. Why handle it in caller ?
And how many places would that be..? The xilinx driver using xilinx dma right>
git grep indicates around 170 matches on dmaengine_slave_config. In my case, it is generic PCM DMA in sound/soc/soc-generic-dmaengine-pcm.c .
Quoted 11 lines
Quoted 9 lines
Quoted 7 lines
Quoted 5 lines
Signed-off-by Marek Vasut <[email protected]>Cc Akinobu Mita <[email protected]>Cc Kedareswara rao Appana <[email protected]>Cc Michal Simek <[email protected]>Cc Vinod Koul <[email protected]>ummm..? you really need to update this :)
I had the patch around for a while indeed, it fell through the cracks.
This has to be more than 3 yrs old then!
Four
kernel test robot
build botI love your patch! Perhaps something to improve:
Hi Marek,
I love your patch! Perhaps something to improve:
[auto build test WARNING on v5.14-rc1]
[also build test WARNING on next-20210716]
[cannot apply to xlnx/master]
[If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Marek-Vasut/dmaengine-xilinx-Add-empty-device_config-function/20210718-111119 base: e73f0f0ee7541171d89f2e2491130c7771ba58d3 config: arm-defconfig (attached as .config) compiler: arm-linux-gnueabi-gcc (GCC) 10.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/89cc716182246c22a6c7bdb666952b3cec945a0a
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Marek-Vasut/dmaengine-xilinx-Add-empty-device_config-function/20210718-111119 git checkout 89cc716182246c22a6c7bdb666952b3cec945a0a
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross O=build_dir ARCH=arm SHELL=/bin/bash drivers/dma/xilinx/
If you fix the issue, kindly add following tag as appropriate
All warnings (new ones prefixed by >>):
drivers/dma/xilinx/xilinx_dma.c:800: warning: expecting prototype for xilinx_dma_tx_descriptor(). Prototype was for xilinx_dma_alloc_tx_descriptor() instead
>> drivers/dma/xilinx/xilinx_dma.c:1659: warning: expecting prototype for xilinx_dma_issue_pending(). Prototype was for xilinx_dma_device_config() instead
drivers/dma/xilinx/xilinx_dma.c:2489: warning: expecting prototype for xilinx_dma_channel_set_config(). Prototype was for xilinx_vdma_channel_set_config() instead
vim +1659 drivers/dma/xilinx/xilinx_dma.c
1651
1652 /**
1653 * xilinx_dma_issue_pending - Configure the DMA channel
1654 * @dchan: DMA channel
1655 * @config: channel configuration
1656 */
1657 static int xilinx_dma_device_config(struct dma_chan *dchan,
1658 struct dma_slave_config *config)
> 1659 { 1660 return 0;
1661 }
1662
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
Vinod Koul
maintainerQuoted 15 lines · Marek Vasut
Quoted 14 lines · Vinod Koul
Quoted 13 lines · Marek Vasut
Quoted 11 lines · Vinod Koul
Quoted 4 lines · Marek Vasut
Various DMA users call the
dmaengine_slave_config()and expect it to succeed, but that can only succeed if .device_config is implemented. Add emptydevice_configfunction rather than patching all the places which usedmaengine_slave_config()..device_config is optional, Yes the
dmaengine_slave_config()will check and return error...I think it would make sense to handle this in caller... (ignore ENOSYS..) rather than add a dummy one
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
That's what I was trying to avoid -- patching all the places in kernel which might fail. Why handle it in caller ?
And how many places would that be..? The xilinx driver using xilinx dma right>
git grep indicates around 170 matches on
dmaengine_slave_config. In my case, it is generic PCM DMA insound/soc/soc-generic-dmaengine-pcm.c.
Okay lets have this. Looks like kbuild-bot is not happy, can you fix that and send update
Signature · 1 line
~Vinod