From: kernel test robot <lkp@intel.com>
To: Huacai Chen <chenhuacai@loongson.cn>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
Arnd Bergmann <arnd@arndb.de>,
Jiaxun Yang <jiaxun.yang@flygoat.com>
Subject: drivers/soc/loongson/loongson2_pm.c:178:49: warning: cast from pointer to integer of different size
Date: Mon, 19 Oct 2026 05:32:15 +0800 [thread overview]
Message-ID: <202610190549.WM2PO3vO-lkp@intel.com> (raw)
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
reply other threads:[~2026-10-18 21:32 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202610190549.WM2PO3vO-lkp@intel.com \
--to=lkp@intel.com \
--cc=arnd@arndb.de \
--cc=chenhuacai@loongson.cn \
--cc=jiaxun.yang@flygoat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.