From: Antonio Borneo Date: Mon, 6 May 2019 08:24:52 +0000 (+0200) Subject: checkpatch: add list of typedef used in OpenOCD X-Git-Url: https://git.gag.com/?a=commitdiff_plain;ds=sidebyside;h=b0c36e0457446b76b32ca13db3e51f66b540d159;p=fw%2Fopenocd checkpatch: add list of typedef used in OpenOCD The new checkpatch from Linux kernel does not recognizes the specific types used in OpenOCD, e.g. "fd_set" and "Jim_Obj". As consequence, it consider "fd_set" as the name of a variable, then misinterpret the asterisk for the pointer "fd_set *" as a multiplication, thus suggest to add a space after the asterisk and replace "fd_set *x" with "fd_set * x". Let checkpatch recognize the typedef used in OpenOCD. Change-Id: Ibc295e6a8b47ffa88b50a6d510b7970760e5199d Signed-off-by: Antonio Borneo Reviewed-on: https://review.openocd.org/c/openocd/+/5607 Tested-by: jenkins --- diff --git a/.checkpatch.conf b/.checkpatch.conf index 1ab743e2c..c6e4bbef0 100644 --- a/.checkpatch.conf +++ b/.checkpatch.conf @@ -5,6 +5,8 @@ --show-types --strict +--typedefsfile tools/scripts/typedefs.txt + --ignore AVOID_EXTERNS --ignore BLOCK_COMMENT_STYLE --ignore CAMELCASE diff --git a/tools/scripts/typedefs.txt b/tools/scripts/typedefs.txt new file mode 100644 index 000000000..97f330d9d --- /dev/null +++ b/tools/scripts/typedefs.txt @@ -0,0 +1,8 @@ +# SPDX-License-Identifier: GPL-2.0-or-later + +fd_set +Jim_Cmd +Jim_CmdProc +Jim_DelCmdProc +Jim_Interp +Jim_Obj