All of lore.kernel.org
 help / color / mirror / Atom feed
* [jcmvbkbc-xtensa:xtensa-6.7-rc1-esp32 11/44] drivers/misc/esp32-ipc.c:151:13: warning: cast to 'void *' from smaller integer type 'unsigned int'
@ 2023-11-25 16:48 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-11-25 16:48 UTC (permalink / raw)
  To: Max Filippov; +Cc: llvm, oe-kbuild-all

tree:   https://github.com/jcmvbkbc/linux-xtensa xtensa-6.7-rc1-esp32
head:   29146ecac0ff1d907be16ff18d485a34985f6bf3
commit: ddc8ee92ef8113ef5f3baf89492755b82c9f7121 [11/44] misc/esp32-ipc: introduce generic IPC for ESP32
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20231125/202311252357.HFUjhapv-lkp@intel.com/config)
compiler: clang version 16.0.4 (https://github.com/llvm/llvm-project.git ae42196bc493ffe877a7e3dff8be32035dea4d07)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231125/202311252357.HFUjhapv-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/202311252357.HFUjhapv-lkp@intel.com/

All warnings (new ones prefixed by >>):

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


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

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

-- 
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:[~2023-11-25 16:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-25 16:48 [jcmvbkbc-xtensa:xtensa-6.7-rc1-esp32 11/44] drivers/misc/esp32-ipc.c:151:13: warning: cast to 'void *' from smaller integer type 'unsigned int' 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.