aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2023-06-08 14:11:51 -0700
committerJakub Kicinski <kuba@kernel.org>2023-06-09 14:40:31 -0700
commit820343ccbb2e11a6579a33a856dcc2a10bb3c7a6 (patch)
tree76765c0dd3bbd4557eb0dd79ffa98eb6302750a2
parenttools: ynl: regen: cleanup user space header includes (diff)
downloadlinux-rng-820343ccbb2e11a6579a33a856dcc2a10bb3c7a6.tar.xz
linux-rng-820343ccbb2e11a6579a33a856dcc2a10bb3c7a6.zip
tools: ynl-gen: complete the C keyword list
C keywords need to be avoided when naming things. Complete the list (ethtool has at least one thing called "auto"). Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-rwxr-xr-xtools/net/ynl/ynl-gen-c.py35
1 files changed, 34 insertions, 1 deletions
diff --git a/tools/net/ynl/ynl-gen-c.py b/tools/net/ynl/ynl-gen-c.py
index e1b86b1fba66..9b6ff256f80e 100755
--- a/tools/net/ynl/ynl-gen-c.py
+++ b/tools/net/ynl/ynl-gen-c.py
@@ -1172,7 +1172,40 @@ op_mode_to_wrapper = {
}
_C_KW = {
- 'do'
+ 'auto',
+ 'bool',
+ 'break',
+ 'case',
+ 'char',
+ 'const',
+ 'continue',
+ 'default',
+ 'do',
+ 'double',
+ 'else',
+ 'enum',
+ 'extern',
+ 'float',
+ 'for',
+ 'goto',
+ 'if',
+ 'inline',
+ 'int',
+ 'long',
+ 'register',
+ 'return',
+ 'short',
+ 'signed',
+ 'sizeof',
+ 'static',
+ 'struct',
+ 'switch',
+ 'typedef',
+ 'union',
+ 'unsigned',
+ 'void',
+ 'volatile',
+ 'while'
}