diff mbox series

[4/6] checkpatch.pl: Warn if the flattree API is used

Message ID 20200522163226.4.I9b1fe1832d69d57d69c33ccbecfe2aa4e1966fa3@changeid
State Accepted
Commit 7fc7d241169d26ec79a86bfcab0e966c778defe7
Delegated to: Tom Rini
Headers show
Series checkpatch.pl: Add features to help improve U-Boot code | expand

Commit Message

Simon Glass May 22, 2020, 10:32 p.m. UTC
We want people to use the livetree API, so request it.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 scripts/checkpatch.pl | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Tom Rini June 4, 2020, 11:39 p.m. UTC | #1
On Fri, May 22, 2020 at 04:32:38PM -0600, Simon Glass wrote:

> We want people to use the livetree API, so request it.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 9dc42520e2d..e3a2a289aea 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2247,6 +2247,12 @@  sub u_boot_line {
 		WARN("NEW_UCLASS",
 		     "Possible new uclass - make sure to add a sandbox driver, plus a test in test/dm/<name>.c\n" . $herecurr);
 	}
+
+	# try to get people to use the livetree API
+	if ($line =~ /^\+.*fdtdec_/) {
+		WARN("LIVETREE",
+		     "Use the livetree API (dev_read_...)\n" . $herecurr);
+	}
 }
 
 sub process {