diff options
author | Hendrik Donner <hd@os-cillation.de> | 2025-03-06 21:15:39 +0100 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2025-03-18 08:17:36 -0600 |
commit | 69fb899133b6c374eff11b13482371bec6898a01 (patch) | |
tree | 22d3adc60e67760d849d65c35f99ae3c084e69a6 /scripts | |
parent | 15ba2b7356af035bc7dfd5c279e9658291fc7cf3 (diff) |
checkpatch.pl: Report an error for CONFIG_xPL_BUILD in device trees
The defines for the different build phases shouldn't be used in device
trees, currently they aren't even defined for device tree pre processing,
resulting in build errors.
Link: https://lists.denx.de/pipermail/u-boot/2025-March/582787.html
Signed-off-by: Hendrik Donner <hd@os-cillation.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/checkpatch.pl | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index f9f8891c0c4..414019c5b89 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -2692,6 +2692,12 @@ sub u_boot_line { ERROR("PRE_SCHEMA", "Driver model schema uses 'bootph-...' tags now\n" . $herecurr); } + + # Do not allow CONFIG_xPL_BUILD in device trees + if ($realfile =~ /\.dtsi?$/ && $line =~ /^\+.*CONFIG_(X|S|T|V)PL_BUILD.*/) { + ERROR("CONFIG_xPL_BUILD", + "Do not use CONFIG_xPL_BUILD in device trees\n" . $herecurr); + } } sub exclude_global_initialisers { |