diff options
author | Gwendal Grignou <gwendal@chromium.org> | 2020-03-04 10:18:48 -0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-03-09 23:39:42 +0000 |
commit | bcce68baec74578d49d0ef899088d466ae91dcbb (patch) | |
tree | c5fa686ed866da64dd556a8054b5ffd4a5c7b20a /util | |
parent | a00ace498da24a9288fd39f9728c8fd80cd54336 (diff) | |
download | chrome-ec-bcce68baec74578d49d0ef899088d466ae91dcbb.tar.gz |
util/make_linux_ec_commands_h: Transform UINTxx_MAX into Uxx_MAX
To match kernel defines, transform UINT32_MAX and friends into
U32_MAX and friends.
BUG=chromium:945948
BRANCH=none
TEST=compile.
Check changes with linux-next/master cros_ec_commands.h.
Change-Id: Id965a192f2e32b0f57983c69d51d7c07c4f5b4ef
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2087845
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Diffstat (limited to 'util')
-rwxr-xr-x | util/make_linux_ec_commands_h.sh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/util/make_linux_ec_commands_h.sh b/util/make_linux_ec_commands_h.sh index c5c3cf6c68..4deeaeef32 100755 --- a/util/make_linux_ec_commands_h.sh +++ b/util/make_linux_ec_commands_h.sh @@ -66,6 +66,11 @@ EOF # Change header guards sed -i "s/__CROS_EC_EC_COMMANDS_H/__CROS_EC_COMMANDS_H/" "${tmp}" +# Convert UINT32_MAX into U32_MAX (and friends). +sed -i "s/UINT\([0-9]\{1,2\}\)_MAX/U\1_MAX/" "${tmp}" +sed -i "s/INT\([0-9]\{1,2\}\)_MAX/S\1_MAX/" "${tmp}" +sed -i "s/INT\([0-9]\{1,2\}\)_MIN/S\1_MIN/" "${tmp}" + # Remove non kernel code to prevent checkpatch warnings and simplify the .h. unifdef -x2 -m -UCONFIG_HOSTCMD_ALIGNED -U__ACPI__ -D__KERNEL__ -U__cplusplus \ -UCHROMIUM_EC "${tmp}" |