mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* drivers/soc/loongson/loongson2_pm.c:178:49: warning: cast from pointer to integer of different size
@ 2026-10-18 21:32 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-10-18 21:32 UTC (permalink / raw)
  To: Huacai Chen; +Cc: oe-kbuild-all, linux-kernel, Arnd Bergmann, Jiaxun Yang

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   f909e534f5e34feb2ea2701d54df63e21aa506fc
commit: 3d9aba6618d115750729bba2d1f8af180bd7d3bd LoongArch: Adjust build infrastructure for 32BIT/64BIT
date:   6 months ago
config: loongarch-randconfig-1001-20261019 (https://download.01.org/0day-ci/archive/20261019/202610190549.WM2PO3vO-lkp@intel.com/config)
compiler: loongarch64-linux-gcc (GCC) 16.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261019/202610190549.WM2PO3vO-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
| Fixes: 3d9aba6618d1 ("LoongArch: Adjust build infrastructure for 32BIT/64BIT")
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202610190549.WM2PO3vO-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/soc/loongson/loongson2_pm.c: In function 'loongson2_pm_probe':
>> drivers/soc/loongson/loongson2_pm.c:178:49: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
     178 |                 loongson_sysconf.suspend_addr = (u64)phys_to_virt(suspend_addr);
         |                                                 ^


vim +178 drivers/soc/loongson/loongson2_pm.c

67694c076bd7d6b Yinbo Zhu   2023-08-03  162  
67694c076bd7d6b Yinbo Zhu   2023-08-03  163  static int loongson2_pm_probe(struct platform_device *pdev)
67694c076bd7d6b Yinbo Zhu   2023-08-03  164  {
67694c076bd7d6b Yinbo Zhu   2023-08-03  165  	int irq, retval;
67694c076bd7d6b Yinbo Zhu   2023-08-03  166  	u64 suspend_addr;
67694c076bd7d6b Yinbo Zhu   2023-08-03  167  	struct device *dev = &pdev->dev;
67694c076bd7d6b Yinbo Zhu   2023-08-03  168  
67694c076bd7d6b Yinbo Zhu   2023-08-03  169  	loongson2_pm.base = devm_platform_ioremap_resource(pdev, 0);
67694c076bd7d6b Yinbo Zhu   2023-08-03  170  	if (IS_ERR(loongson2_pm.base))
67694c076bd7d6b Yinbo Zhu   2023-08-03  171  		return PTR_ERR(loongson2_pm.base);
67694c076bd7d6b Yinbo Zhu   2023-08-03  172  
67694c076bd7d6b Yinbo Zhu   2023-08-03  173  	irq = platform_get_irq(pdev, 0);
67694c076bd7d6b Yinbo Zhu   2023-08-03  174  	if (irq < 0)
67694c076bd7d6b Yinbo Zhu   2023-08-03  175  		return irq;
67694c076bd7d6b Yinbo Zhu   2023-08-03  176  
67694c076bd7d6b Yinbo Zhu   2023-08-03  177  	if (!device_property_read_u64(dev, "loongson,suspend-address", &suspend_addr))
67694c076bd7d6b Yinbo Zhu   2023-08-03 @178  		loongson_sysconf.suspend_addr = (u64)phys_to_virt(suspend_addr);
67694c076bd7d6b Yinbo Zhu   2023-08-03  179  	else
67694c076bd7d6b Yinbo Zhu   2023-08-03  180  		dev_err(dev, "No loongson,suspend-address, could not support S3!\n");
67694c076bd7d6b Yinbo Zhu   2023-08-03  181  
67694c076bd7d6b Yinbo Zhu   2023-08-03  182  	if (loongson2_power_button_init(dev, irq))
67694c076bd7d6b Yinbo Zhu   2023-08-03  183  		return -EINVAL;
67694c076bd7d6b Yinbo Zhu   2023-08-03  184  
67694c076bd7d6b Yinbo Zhu   2023-08-03  185  	retval = devm_request_irq(&pdev->dev, irq, loongson2_pm_irq_handler,
67694c076bd7d6b Yinbo Zhu   2023-08-03  186  				  IRQF_SHARED, "pm_irq", &loongson2_pm);
67694c076bd7d6b Yinbo Zhu   2023-08-03  187  	if (retval)
67694c076bd7d6b Yinbo Zhu   2023-08-03  188  		return retval;
67694c076bd7d6b Yinbo Zhu   2023-08-03  189  
67694c076bd7d6b Yinbo Zhu   2023-08-03  190  	loongson2_pm_irq_enable();
67694c076bd7d6b Yinbo Zhu   2023-08-03  191  	loongson2_pm_status_clear();
67694c076bd7d6b Yinbo Zhu   2023-08-03  192  
67694c076bd7d6b Yinbo Zhu   2023-08-03  193  	if (loongson_sysconf.suspend_addr)
67694c076bd7d6b Yinbo Zhu   2023-08-03  194  		suspend_set_ops(&loongson2_suspend_ops);
67694c076bd7d6b Yinbo Zhu   2023-08-03  195  
a2fd542287d02d3 Binbin Zhou 2023-08-31  196  	/* Populate children */
a2fd542287d02d3 Binbin Zhou 2023-08-31  197  	retval = devm_of_platform_populate(dev);
a2fd542287d02d3 Binbin Zhou 2023-08-31  198  	if (retval)
a2fd542287d02d3 Binbin Zhou 2023-08-31  199  		dev_err(dev, "Error populating children, reboot and poweroff might not work properly\n");
a2fd542287d02d3 Binbin Zhou 2023-08-31  200  
67694c076bd7d6b Yinbo Zhu   2023-08-03  201  	return 0;
67694c076bd7d6b Yinbo Zhu   2023-08-03  202  }
67694c076bd7d6b Yinbo Zhu   2023-08-03  203  

:::::: The code at line 178 was first introduced by commit
:::::: 67694c076bd7d6b8b73c59d4881822f0493caf35 soc: loongson2_pm: add power management support

:::::: TO: Yinbo Zhu <zhuyinbo@loongson.cn>
:::::: CC: Arnd Bergmann <arnd@arndb.de>

--
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-18 21:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-18 21:32 drivers/soc/loongson/loongson2_pm.c:178:49: warning: cast from pointer to integer of different size 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

all inboxes | Powered by JetHome®