Skip to contentSkip to conversation

checkpatch.pl: Make fdt / initrd relocation disabling an error

PATCH New Tom Rini 1 participant 2 messages Aug 20, 2020 – Aug 28, 2020 Checkpatch

lore
Share & tools
lore

Tom Rini

author
#0 lore raw

PATCH 1/1 checkpatch.pl: Make fdt / initrd relocation disabling an error

Entirely disabling relocation of the device tree or initrd is almost never the right answer. Doing this by default leads to hard to diagnose run-time failures.

---
 scripts/checkpatch.pl | 6 ++++++
 1 file changed, 6 insertions(+)
scripts/checkpatch.pl +6 -0
index 3932362dbafd..4bed2b0cdc7c 100755
@@ -2359,6 +2359,12 @@ sub u_boot_line {
 		ERROR("BARRED_INCLUDE_IN_HDR",
 		      "Avoid including common.h and dm.h in header files\n" . $herecurr);
 	}
+
+	# Do not disable fdt / initrd relocation
+	if ($rawline =~ /.*(fdt|initrd)_high=0xffffffff/) {
+		ERROR("DISABLE_FDT_OR_INITRD_RELOC",
+		     "fdt or initrd relocation disabled at boot time\n" . $herecurr);
+	}
 }
 
 sub process {
Signature · 1 line
2.17.1
author
#1 lore raw

PATCH 1/1 checkpatch.pl: Make fdt / initrd relocation disabling an error

Quoted 5 lines · Tom Rini

Entirely disabling relocation of the device tree or initrd is almost never the right answer. Doing this by default leads to hard to diagnose run-time failures.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200828/46efe055/attachment.sig>