tree:
https://github.com/0day-ci/linux/commits/UPDATE-20200920-025817/Jonathan-...
head: 6a6ef0b16bd098b9a4950b5d17fa46bda1edea31
commit: 6a6ef0b16bd098b9a4950b5d17fa46bda1edea31 [1/1] dmaengine: qcom: Add ADM driver
config: arc-allyesconfig (attached as .config)
compiler: arceb-elf-gcc (GCC) 9.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
git checkout 6a6ef0b16bd098b9a4950b5d17fa46bda1edea31
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
drivers/dma/qcom/qcom_adm.c: In function 'adm_process_fc_descriptors':
> drivers/dma/qcom/qcom_adm.c:240:7: error: assignment to 'u32
*' {aka 'unsigned int *'} from incompatible pointer type 'phys_addr_t
*' {aka 'long long unsigned int *'} [-Werror=incompatible-pointer-types]
240 | src = &achan->slave.src_addr;
| ^
drivers/dma/qcom/qcom_adm.c:246:7: error: assignment to 'u32 *' {aka
'unsigned int *'} from incompatible pointer type 'phys_addr_t *' {aka
'long long unsigned int *'} [-Werror=incompatible-pointer-types]
246 | dst = &achan->slave.dst_addr;
| ^
drivers/dma/qcom/qcom_adm.c: In function 'adm_process_non_fc_descriptors':
drivers/dma/qcom/qcom_adm.c:304:7: error: assignment to 'u32 *' {aka
'unsigned int *'} from incompatible pointer type 'phys_addr_t *' {aka
'long long unsigned int *'} [-Werror=incompatible-pointer-types]
304 | src = &achan->slave.src_addr;
| ^
drivers/dma/qcom/qcom_adm.c:308:7: error: assignment to 'u32 *' {aka
'unsigned int *'} from incompatible pointer type 'phys_addr_t *' {aka
'long long unsigned int *'} [-Werror=incompatible-pointer-types]
308 | dst = &achan->slave.dst_addr;
| ^
cc1: some warnings being treated as errors
#
https://github.com/0day-ci/linux/commit/6a6ef0b16bd098b9a4950b5d17fa46bda...
git remote add linux-review
https://github.com/0day-ci/linux
git fetch --no-tags linux-review
UPDATE-20200920-025817/Jonathan-McDowell/dmaengine-qcom-Add-ADM-driver/20200916-144457
git checkout 6a6ef0b16bd098b9a4950b5d17fa46bda1edea31
vim +240 drivers/dma/qcom/qcom_adm.c
213
214 /**
215 * adm_process_fc_descriptors - Process descriptors for flow controlled xfers
216 *
217 * @achan: ADM channel
218 * @desc: Descriptor memory pointer
219 * @sg: Scatterlist entry
220 * @crci: CRCI value
221 * @burst: Burst size of transaction
222 * @direction: DMA transfer direction
223 */
224 static void *adm_process_fc_descriptors(struct adm_chan *achan, void *desc,
225 struct scatterlist *sg, u32 crci,
226 u32 burst,
227 enum dma_transfer_direction direction)
228 {
229 struct adm_desc_hw_box *box_desc = NULL;
230 struct adm_desc_hw_single *single_desc;
231 u32 remainder = sg_dma_len(sg);
232 u32 rows, row_offset, crci_cmd;
233 u32 mem_addr = sg_dma_address(sg);
234 u32 *incr_addr = &mem_addr;
235 u32 *src, *dst;
236
237 if (direction == DMA_DEV_TO_MEM) {
238 crci_cmd = ADM_CMD_SRC_CRCI(crci);
239 row_offset = burst;
240 src = &achan->slave.src_addr;
241 dst =
&mem_addr;
242 } else {
243 crci_cmd = ADM_CMD_DST_CRCI(crci);
244 row_offset = burst << 16;
245 src = &mem_addr;
246 dst = &achan->slave.dst_addr;
247 }
248
249 while (remainder >= burst) {
250 box_desc = desc;
251 box_desc->cmd = ADM_CMD_TYPE_BOX | crci_cmd;
252 box_desc->row_offset = row_offset;
253 box_desc->src_addr = *src;
254 box_desc->dst_addr = *dst;
255
256 rows = remainder / burst;
257 rows = min_t(u32, rows, ADM_MAX_ROWS);
258 box_desc->num_rows = rows << 16 | rows;
259 box_desc->row_len = burst << 16 | burst;
260
261 *incr_addr += burst * rows;
262 remainder -= burst * rows;
263 desc += sizeof(*box_desc);
264 }
265
266 /* if leftover bytes, do one single descriptor */
267 if (remainder) {
268 single_desc = desc;
269 single_desc->cmd = ADM_CMD_TYPE_SINGLE | crci_cmd;
270 single_desc->len = remainder;
271 single_desc->src_addr = *src;
272 single_desc->dst_addr = *dst;
273 desc += sizeof(*single_desc);
274
275 if (sg_is_last(sg))
276 single_desc->cmd |= ADM_CMD_LC;
277 } else {
278 if (box_desc && sg_is_last(sg))
279 box_desc->cmd |= ADM_CMD_LC;
280 }
281
282 return desc;
283 }
284
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org