[l1k:smsc95xx_5.17 209/887] drivers/dma/bcm2835-dma.c:1104:5: warning: no previous prototype for 'bcm2711_dma40_memcpy_init'

From: kernel test robot
Date: Fri Apr 08 2022 - 09:18:36 EST


tree: https://github.com/l1k/linux smsc95xx_5.17
head: 05d68ced287b30f62f18f95b5476135ef669804a
commit: 92eab2543e8b86cf7660e0cc70d5aee4313cbe58 [209/887] bcm2835-dma: Add proper 40-bit DMA support
config: arm-multi_v7_defconfig (https://download.01.org/0day-ci/archive/20220408/202204082125.AHZubaGl-lkp@xxxxxxxxx/config)
compiler: arm-linux-gnueabi-gcc (GCC) 11.2.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/l1k/linux/commit/92eab2543e8b86cf7660e0cc70d5aee4313cbe58
git remote add l1k https://github.com/l1k/linux
git fetch --no-tags l1k smsc95xx_5.17
git checkout 92eab2543e8b86cf7660e0cc70d5aee4313cbe58
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arm SHELL=/bin/bash drivers/dma/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

>> drivers/dma/bcm2835-dma.c:1104:5: warning: no previous prototype for 'bcm2711_dma40_memcpy_init' [-Wmissing-prototypes]
1104 | int bcm2711_dma40_memcpy_init(void)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/dma/bcm2835-dma.c:1119:6: warning: no previous prototype for 'bcm2711_dma40_memcpy' [-Wmissing-prototypes]
1119 | void bcm2711_dma40_memcpy(dma_addr_t dst, dma_addr_t src, size_t size)
| ^~~~~~~~~~~~~~~~~~~~


vim +/bcm2711_dma40_memcpy_init +1104 drivers/dma/bcm2835-dma.c

1103
> 1104 int bcm2711_dma40_memcpy_init(void)
1105 {
1106 if (!memcpy_parent)
1107 return -EPROBE_DEFER;
1108
1109 if (!memcpy_chan)
1110 return -EINVAL;
1111
1112 if (!memcpy_scb)
1113 return -ENOMEM;
1114
1115 return 0;
1116 }
1117 EXPORT_SYMBOL(bcm2711_dma40_memcpy_init);
1118
> 1119 void bcm2711_dma40_memcpy(dma_addr_t dst, dma_addr_t src, size_t size)
1120 {
1121 struct bcm2711_dma40_scb *scb = memcpy_scb;
1122 unsigned long flags;
1123
1124 if (!scb) {
1125 pr_err("bcm2711_dma40_memcpy not initialised!\n");
1126 return;
1127 }
1128
1129 spin_lock_irqsave(&memcpy_lock, flags);
1130
1131 scb->ti = 0;
1132 scb->src = lower_32_bits(src);
1133 scb->srci = upper_32_bits(src) | BCM2711_DMA40_MEMCPY_XFER_INFO;
1134 scb->dst = lower_32_bits(dst);
1135 scb->dsti = upper_32_bits(dst) | BCM2711_DMA40_MEMCPY_XFER_INFO;
1136 scb->len = size;
1137 scb->next_cb = 0;
1138
1139 writel((u32)(memcpy_scb_dma >> 5), memcpy_chan + BCM2711_DMA40_CB);
1140 writel(BCM2711_DMA40_MEMCPY_FLAGS + BCM2711_DMA40_ACTIVE,
1141 memcpy_chan + BCM2711_DMA40_CS);
1142
1143 /* Poll for completion */
1144 while (!(readl(memcpy_chan + BCM2711_DMA40_CS) & BCM2711_DMA40_END))
1145 cpu_relax();
1146
1147 writel(BCM2711_DMA40_END, memcpy_chan + BCM2711_DMA40_CS);
1148
1149 spin_unlock_irqrestore(&memcpy_lock, flags);
1150 }
1151 EXPORT_SYMBOL(bcm2711_dma40_memcpy);
1152

--
0-DAY CI Kernel Test Service
https://01.org/lkp