Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
* Re: [PATCH 4/4] dma: dw-axi-dmac: Add support for dma-bit-mask property
       [not found] <a10c000b7c8301018eb2b0a20fbf2d2d10e74a02.1747367749.git.adrianhoyin.ng@altera.com>
@ 2025-05-16 17:47 ` kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-05-16 17:47 UTC (permalink / raw)
  To: adrianhoyin.ng, dinguyen, robh, krzk+dt, conor+dt,
	Eugeniy.Paltsev, vkoul, dmaengine, devicetree
  Cc: llvm, oe-kbuild-all, adrianhoyin.ng, Matthew Gerlach

Hi,

kernel test robot noticed the following build errors:

[auto build test ERROR on robh/for-next]
[also build test ERROR on vkoul-dmaengine/next mtd/mtd/next mtd/mtd/fixes linus/master v6.15-rc6]
[cannot apply to next-20250516]
[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#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/adrianhoyin-ng-altera-com/dt-bindings-dma-snps-dw-axi-dmac-Add-iommus-dma-coherent-and-dma-bit-mask-quirk/20250516-120810
base:   https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
patch link:    https://lore.kernel.org/r/a10c000b7c8301018eb2b0a20fbf2d2d10e74a02.1747367749.git.adrianhoyin.ng%40altera.com
patch subject: [PATCH 4/4] dma: dw-axi-dmac: Add support for dma-bit-mask property
config: arm-randconfig-001-20250517 (https://download.01.org/0day-ci/archive/20250517/202505170130.I0p9B66f-lkp@intel.com/config)
compiler: clang version 21.0.0git (https://github.com/llvm/llvm-project f819f46284f2a79790038e1f6649172789734ae8)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250517/202505170130.I0p9B66f-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/202505170130.I0p9B66f-lkp@intel.com/

All error/warnings (new ones prefixed by >>):

>> drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:275:33: error: use of undeclared identifier 'dev'
     275 |         ret = device_property_read_u32(dev, "snps,dma-bit-mask", &tmp);
         |                                        ^
   drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:277:46: warning: shift count >= width of type [-Wshift-count-overflow]
     277 |                 ret = dma_set_mask_and_coherent(chip->dev, DMA_BIT_MASK(64));
         |                                                            ^~~~~~~~~~~~~~~~
   include/linux/dma-mapping.h:73:54: note: expanded from macro 'DMA_BIT_MASK'
      73 | #define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
         |                                                      ^ ~~~
>> drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:279:23: warning: shift count >= width of type [-Wshift-count-overflow]
     279 |                 if (tmp == 0 || tmp << 32 || tmp > 64)
         |                                     ^  ~~
   2 warnings and 1 error generated.


vim +/dev +275 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c

   264	
   265	static void axi_dma_hw_init(struct axi_dma_chip *chip)
   266	{
   267		int ret;
   268		u32 i, tmp;
   269	
   270		for (i = 0; i < chip->dw->hdata->nr_channels; i++) {
   271			axi_chan_irq_disable(&chip->dw->chan[i], DWAXIDMAC_IRQ_ALL);
   272			axi_chan_disable(&chip->dw->chan[i]);
   273		}
   274	
 > 275		ret = device_property_read_u32(dev, "snps,dma-bit-mask", &tmp);
   276		if (ret)
   277			ret = dma_set_mask_and_coherent(chip->dev, DMA_BIT_MASK(64));
   278		else {
 > 279			if (tmp == 0 || tmp << 32 || tmp > 64)
   280				dev_err(chip->dev, "Invalid dma bit mask\n");
   281	
   282			ret = dma_set_mask_and_coherent(chip->dev, DMA_BIT_MASK(tmp));
   283		}
   284	
   285		if (ret)
   286			dev_warn(chip->dev, "Unable to set coherent mask\n");
   287	}
   288	

-- 
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:[~2025-05-16 17:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <a10c000b7c8301018eb2b0a20fbf2d2d10e74a02.1747367749.git.adrianhoyin.ng@altera.com>
2025-05-16 17:47 ` [PATCH 4/4] dma: dw-axi-dmac: Add support for dma-bit-mask property kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox