platform/chrome: cros_ec_trace: update generating script
Subsystems (2)
PATCH v2 1/1 platform/chrome: cros_ec_trace: update generating script
To remove ", \" from the last line.
Signed-off-by Tzung-Bi Shih <[email protected]>
---
Changes from v1:
- simpler awk code
drivers/platform/chrome/cros_ec_trace.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-)
drivers/platform/chrome/cros_ec_trace.c +12 -1
@@ -6,7 +6,18 @@#define TRACE_SYMBOL (a) {a, #a}// Generate the list using the following script: -// sed -n 's/^#define \(EC_CMD_[[:alnum:]_]*\)\s.*/\tTRACE_SYMBOL(\1), \\/p' include/linux/mfd/cros_ec_commands.h +// sed -n 's/^#define \(EC_CMD_[[:alnum:]_]*\)\s.*/\tTRACE_SYMBOL(\1), \\/p' \ +// include/linux/mfd/cros_ec_commands.h | awk ' +// { +// if (NR != 1) +// print buf; +// buf = $0; +// } +// END { +// gsub(/, \\/, "", buf); +// print buf; +// } +// ' #define EC_CMDS \ TRACE_SYMBOL(EC_CMD_PROTO_VERSION), \ TRACE_SYMBOL(EC_CMD_HELLO), \
Signature · 1 line
2.22.0.657.g960e92d24f-goog
Hi Tzung-Bi
Quoted 15 lines · Tzung-Bi Shih
To remove ", \" from the last line.
Signed-off-by Tzung-Bi Shih <[email protected]>---
Changes from v1:
- simpler awk codedrivers/platform/chrome/cros_ec_trace.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-)drivers/platform/chrome/cros_ec_trace.c +0
-0
drivers/platform/chrome/cros_ec_trace.c line 9
Quoted 5 lines
drivers/platform/chrome/cros_ec_trace.c +1
-1@@ -6,7 +6,18 @@#define TRACE_SYMBOL (a) {a, #a}// Generate the list using the following script: -// sed -n 's/^#define \(EC_CMD_[[:alnum:]_]*\)\s.*/\tTRACE_SYMBOL(\1), \\/p' include/linux/mfd/cros_ec_commands.h +// sed -n 's/^#define \(EC_CMD_[[:alnum:]_]*\)\s.*/\tTRACE_SYMBOL(\1), \\/p' \
For some reason I accepted the patch using c++ style comments but I shouldn't, while we are here could you update the patch and use c style comments instead, thanks.
~ Enric
Quoted 15 lines
drivers/platform/chrome/cros_ec_trace.c +11
-0+// include/linux/mfd/cros_ec_commands.h | awk ' +// { +// if (NR != 1) +// print buf; +// buf = $0; +// } +// END { +// gsub(/, \\/, "", buf); +// print buf; +// } +// ' #define EC_CMDS \ TRACE_SYMBOL(EC_CMD_PROTO_VERSION), \ TRACE_SYMBOL(EC_CMD_HELLO), \