* [vkoul-dmaengine:next 90/130] drivers/dma/amlogic-dma.c:324:22: sparse: sparse: invalid assignment: |=
@ 2026-10-06 0:53 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-10-06 0:53 UTC (permalink / raw)
To: Xianwei Zhao; +Cc: oe-kbuild-all, Vinod Koul, Frank Li
tree: https://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine.git next
head: 0ac4a90c4805b41013044fdefff051ae59a54302
commit: b84b5197e344e2d378a9edf5d782b6fbddff8d06 [90/130] dmaengine: amlogic: Add general DMA driver for A9
config: arc-randconfig-r2307-20261006 (https://download.01.org/0day-ci/archive/20261006/202610060235.PuCxWQdk-lkp@intel.com/config)
compiler: arc-linux-gcc (GCC) 12.5.0
sparse: v0.6.5-rc1
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261006/202610060235.PuCxWQdk-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202610060235.PuCxWQdk-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> drivers/dma/amlogic-dma.c:324:22: sparse: sparse: invalid assignment: |=
drivers/dma/amlogic-dma.c:324:22: sparse: left side has type restricted __le32
drivers/dma/amlogic-dma.c:324:22: sparse: right side has type unsigned long
vim +324 drivers/dma/amlogic-dma.c
260
261 static struct dma_async_tx_descriptor *aml_dma_prep_slave_sg
262 (struct dma_chan *chan, struct scatterlist *sgl,
263 unsigned int sg_len, enum dma_transfer_direction direction,
264 unsigned long flags, void *context)
265 {
266 struct aml_dma_chan *aml_chan = to_aml_dma_chan(chan);
267 struct aml_dma_dev *aml_dma = aml_chan->aml_dma;
268 struct aml_dma_desc *aml_desc = NULL;
269 struct aml_dma_sg_link *sg_link = NULL;
270 struct scatterlist *sg = NULL;
271 u64 paddr;
272 u32 link_count, avail;
273 u32 i;
274
275 if (aml_chan->direction != direction) {
276 dev_err(aml_dma->dma_device.dev, "direction not support\n");
277 return NULL;
278 }
279
280 link_count = sg_nents_for_dma(sgl, sg_len, SG_MAX_LEN);
281 if (link_count == 0)
282 return NULL;
283
284 aml_desc = kzalloc_obj(*aml_desc, GFP_NOWAIT);
285 if (!aml_desc)
286 return NULL;
287
288 INIT_WORK(&aml_desc->free_work, aml_dma_free_desc_work);
289 aml_desc->sg_link_size = link_count * sizeof(*sg_link);
290 aml_desc->sg_link = dma_alloc_coherent(aml_dma->dma_device.dev, aml_desc->sg_link_size,
291 &aml_desc->sg_link_phys, GFP_NOWAIT);
292 if (!aml_desc->sg_link) {
293 kfree(aml_desc);
294 return NULL;
295 }
296 aml_desc->dma_device = &aml_dma->dma_device;
297
298 sg_link = aml_desc->sg_link;
299 for_each_sg(sgl, sg, sg_len, i) {
300 avail = sg_dma_len(sg);
301 if (avail == 0)
302 continue;
303 paddr = sg->dma_address;
304 while (avail > SG_MAX_LEN) {
305 /* set dma address and len to sglink*/
306 sg_link->addr_low = cpu_to_le32(lower_32_bits(paddr));
307 sg_link->addr_high = cpu_to_le32(upper_32_bits(paddr));
308 sg_link->ctl = cpu_to_le32(FIELD_PREP(LINK_LEN, SG_MAX_LEN));
309 paddr = paddr + SG_MAX_LEN;
310 avail = avail - SG_MAX_LEN;
311 sg_link++;
312 }
313 /* set dma address and len to sglink*/
314 sg_link->addr_low = cpu_to_le32(lower_32_bits(paddr));
315 sg_link->addr_high = cpu_to_le32(upper_32_bits(paddr));
316 sg_link->ctl = cpu_to_le32(FIELD_PREP(LINK_LEN, avail));
317
318 aml_desc->data_len += sg_dma_len(sg);
319 sg_link++;
320 }
321
322 /* the last sg set eoc flag */
323 sg_link--;
> 324 sg_link->ctl |= LINK_EOC;
325
326 return vchan_tx_prep(&aml_chan->vchan, &aml_desc->vd, flags);
327 }
328
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-10-06 0:54 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-06 0:53 [vkoul-dmaengine:next 90/130] drivers/dma/amlogic-dma.c:324:22: sparse: sparse: invalid assignment: |= kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.