]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
powerpc/kexec/core: use big-endian types for crash variables
authorSourabh Jain <sourabhjain@linux.ibm.com>
Wed, 24 Dec 2025 15:12:57 +0000 (20:42 +0530)
committerMadhavan Srinivasan <maddy@linux.ibm.com>
Wed, 4 Mar 2026 05:38:57 +0000 (11:08 +0530)
commit20197b967a6a29dab81495f25a988515bda84cfe
treea9ff7e05844a00502d289802b54841f2fe97aded
parent6fc5d63c6ff5fe5e5beea3e7fe2ca3058351ae99
powerpc/kexec/core: use big-endian types for crash variables

Use explicit word-sized big-endian types for kexec and crash related
variables. This makes the endianness unambiguous and avoids type
mismatches that trigger sparse warnings.

The change addresses sparse warnings like below (seen on both 32-bit
and 64-bit builds):

CHECK   ../arch/powerpc/kexec/core.c
sparse:    expected unsigned int static [addressable] [toplevel] [usertype] crashk_base
sparse:    got restricted __be32 [usertype]
sparse: warning: incorrect type in assignment (different base types)
sparse:    expected unsigned int static [addressable] [toplevel] [usertype] crashk_size
sparse:    got restricted __be32 [usertype]
sparse: warning: incorrect type in assignment (different base types)
sparse:    expected unsigned long long static [addressable] [toplevel] mem_limit
sparse:    got restricted __be32 [usertype]
sparse: warning: incorrect type in assignment (different base types)
sparse:    expected unsigned int static [addressable] [toplevel] [usertype] kernel_end
sparse:    got restricted __be32 [usertype]

No functional change intended.

Fixes: ea961a828fe7 ("powerpc: Fix endian issues in kexec and crash dump code")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202512221405.VHPKPjnp-lkp@intel.com/
Signed-off-by: Sourabh Jain <sourabhjain@linux.ibm.com>
Tested-by: Venkat Rao Bagalkote <venkat88@linux.ibm.com>
Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Link: https://patch.msgid.link/20251224151257.28672-1-sourabhjain@linux.ibm.com
arch/powerpc/kexec/core.c