From patchwork Fri May 22 22:32:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 246333 List-Id: U-Boot discussion From: sjg at chromium.org (Simon Glass) Date: Fri, 22 May 2020 16:32:38 -0600 Subject: [PATCH 4/6] checkpatch.pl: Warn if the flattree API is used In-Reply-To: <20200522223240.187032-1-sjg@chromium.org> References: <20200522223240.187032-1-sjg@chromium.org> Message-ID: <20200522163226.4.I9b1fe1832d69d57d69c33ccbecfe2aa4e1966fa3@changeid> We want people to use the livetree API, so request it. Signed-off-by: Simon Glass --- scripts/checkpatch.pl | 6 ++++++ 1 file changed, 6 insertions(+) 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/.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 {