Ryusuke Konishi 3fb2a8306a compat.h: map kernel-style endian macros to suppress sparse warnings
Running Sparse on nilfs-utils generates warnings in
"include/linux/nilfs2_ondisk.h" because standard user-space
environments lack the restricted type definitions for double-
underscored kernel macros (e.g., __le32_to_cpu).

Alias these kernel macros to the local versions in compat.h that
carry the necessary __force cast attributes.

Reorder header includes to ensure compat.h is parsed before
nilfs2_ondisk.h so that the aliases take effect during static
analysis.

Additionally, pre-include <asm/byteorder.h> in compat.h to prevent
macro redefinition warnings caused by the include order change.

Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
2026-01-10 11:56:01 +09:00
..