checkpatch: Disallow using __BYTE_ORDER__

The canonical way of determining endianness is now CONFIG_BIG_ENDIAN
instead in Zephyr.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
This commit is contained in:
Carles Cufi 2022-10-26 20:34:15 +02:00 committed by Stephanos Ioannidis
parent 8e4d499fa0
commit 43ae4a7025

View file

@ -6562,6 +6562,12 @@ sub process {
"Use of the '$1' macro makes the build non-deterministic\n" . $herecurr);
}
# check for uses of __BYTE_ORDER__
while ($line =~ /\b(__BYTE_ORDER__)\b/g) {
ERROR("BYTE_ORDER",
"Use of the '$1' macro is disallowed. Use CONFIG_BIG_ENDIAN instead\n" . $herecurr);
}
# check for use of yield()
if ($line =~ /\byield\s*\(\s*\)/) {
WARN("YIELD",