Re: [PATCH] soc: loongson: loongson2_pm: Fix build warnings for 32BIT

From: Arnd Bergmann

Date: Mon Oct 19 2026 - 18:19:28 EST


On Mon, Oct 19, 2026, at 16:42, Huacai Chen wrote:
> Since loongson_sysconf.suspend_addr is unsigned long, use "unsigned
> long" instead of "u64" for casting, so as to avoid build warnings for
> 32BIT:
>
> 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);
> |
>
> Cc: stable@xxxxxxxxxxxxxxx
> Fixes: 3d9aba6618d1 ("LoongArch: Adjust build infrastructure for
> 32BIT/64BIT")
> Closes:
> https://lore.kernel.org/oe-kbuild-all/202610190549.WM2PO3vO-lkp@xxxxxxxxx/
> Reported-by: kernel test robot <lkp@xxxxxxxxx>
> Signed-off-by: Huacai Chen <chenhuacai@xxxxxxxxxxx>

Reviewed-by: Arnd Bergmann <arnd@xxxxxxxx>

Feel free to pick that up through the loongarch tree, or send it to
soc@xxxxxxxxxxxxxxx if you prefer us to pick it up through the soc tree.

Arnd