Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
* [jcmvbkbc-xtensa:xtensa-6.13-esp32 20/53] drivers/misc/esp32-ipc.c:152:13: warning: cast to 'void *' from smaller integer type 'u32' (aka 'unsigned int')
@ 2025-02-03 17:47 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-02-03 17:47 UTC (permalink / raw)
  To: Max Filippov; +Cc: llvm, oe-kbuild-all

tree:   https://github.com/jcmvbkbc/linux-xtensa xtensa-6.13-esp32
head:   f4a6cef2509c4e81637b6d5d6f0c27966895985a
commit: ff5d67ac76ee59b6351fd6f70df8d0178ef4f72a [20/53] misc/esp32-ipc: introduce generic IPC for ESP32
config: riscv-defconfig (https://download.01.org/0day-ci/archive/20250204/202502040118.QjCwAnwW-lkp@intel.com/config)
compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250204/202502040118.QjCwAnwW-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/202502040118.QjCwAnwW-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/misc/esp32-ipc.c:152:13: warning: cast to 'void *' from smaller integer type 'u32' (aka 'unsigned int') [-Wint-to-void-pointer-cast]
     152 |         hw->hw_q = (void *)readl(p);
         |                    ^~~~~~~~~~~~~~~~
   1 warning generated.


vim +152 drivers/misc/esp32-ipc.c

   144	
   145	static int init_hw(struct platform_device *pdev, struct esp32_ipc *hw)
   146	{
   147		void __iomem *p;
   148	
   149		p = devm_of_iomap(&pdev->dev, pdev->dev.of_node, 0, NULL);
   150		if (IS_ERR(p))
   151			return PTR_ERR(p);
 > 152		hw->hw_q = (void *)readl(p);
   153		devm_iounmap(&pdev->dev, p);
   154	
   155		hw->regs = devm_of_iomap(&pdev->dev, pdev->dev.of_node, 1, NULL);
   156		if (IS_ERR(hw->regs))
   157			return PTR_ERR(hw->regs);
   158	
   159		dev_dbg(&pdev->dev, "%s: regs = %p, queues = %p\n",
   160			__func__, hw->regs, hw->hw_q);
   161		if (hw->hw_q) {
   162			u32 i;
   163	
   164			for (i = 0; i < 2; ++i) {
   165				dev_dbg(&pdev->dev, "%s: queue %d: offset = %d, mask = %x\n",
   166					__func__, i,
   167					hw->hw_q[i].offset,
   168					hw->hw_q[i].mask);
   169			}
   170		} else {
   171			return -ENODEV;
   172		}
   173	
   174		hw->irq = platform_get_irq(pdev, 0);
   175		if (hw->irq >= 0) {
   176			int ret;
   177	
   178			ret = devm_request_threaded_irq(&pdev->dev, hw->irq,
   179							esp32_ipc_irq_handler,
   180							esp32_ipc_thread_handler,
   181							IRQF_SHARED, pdev->name, hw);
   182			if (ret < 0) {
   183				dev_err(&pdev->dev, "request_irq %d failed\n", hw->irq);
   184				return ret;
   185			}
   186		} else {
   187			dev_err(&pdev->dev, "missing IRQ property\n");
   188			return -ENODEV;
   189		}
   190	
   191		return 0;
   192	}
   193	

-- 
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-02-03 17:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-03 17:47 [jcmvbkbc-xtensa:xtensa-6.13-esp32 20/53] drivers/misc/esp32-ipc.c:152:13: warning: cast to 'void *' from smaller integer type 'u32' (aka 'unsigned int') 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