aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorAntonio Borneo <borneo.antonio@gmail.com>2022-06-11 22:41:17 +0200
committerAntonio Borneo <borneo.antonio@gmail.com>2022-09-18 08:17:23 +0000
commit9c6c5b61b3c78a9f78152be6d403d9e3b76ef6f9 (patch)
tree9daa85dc88c23a1f8be269737754a4b6c21b2a38 /tools
parent85a918b44d4f297e0dd30fc5bf6e798c991ddc6c (diff)
downloadriscv-openocd-9c6c5b61b3c78a9f78152be6d403d9e3b76ef6f9.zip
riscv-openocd-9c6c5b61b3c78a9f78152be6d403d9e3b76ef6f9.tar.gz
riscv-openocd-9c6c5b61b3c78a9f78152be6d403d9e3b76ef6f9.tar.bz2
checkpatch: add variable $OpenOCD
The script checkpatch.pl require some adaptation for OpenOCD that cannot be achieved through the config file .checkpatch.conf; the script's code has to be modified. To merge new version of the script from Linux kernel it becomes relevant highlighting the changes, while minimizing the diff wrt the initial script. Add the perl variable '$OpenOCD' and suggest how to highlight changes. Change-Id: Ia8d26426850008f0465858a1d84cc774bc1146ed Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7021 Tested-by: jenkins
Diffstat (limited to 'tools')
-rwxr-xr-xtools/scripts/checkpatch.pl13
1 files changed, 13 insertions, 0 deletions
diff --git a/tools/scripts/checkpatch.pl b/tools/scripts/checkpatch.pl
index 79e759a..edbd464 100755
--- a/tools/scripts/checkpatch.pl
+++ b/tools/scripts/checkpatch.pl
@@ -22,6 +22,19 @@ my $V = '0.32';
use Getopt::Long qw(:config no_auto_abbrev);
+# ATTENTION: easily track modification to this script for OpenOCD.
+# When possible, don't modify the existing code, don't change its indentation,
+# but remove it enclosing it within:
+#
+# if (!$OpenOCD) {
+# original_code;
+# } # !$OpenOCD
+#
+# Mark every addition within comments
+# # OpenOCD specific: Begin[: additional comment]
+# # OpenOCD specific: End
+my $OpenOCD = 1;
+
my $quiet = 0;
my $verbose = 0;
my %verbose_messages = ();