* [PATCH] platform/chrome: cros_ec_trace: update generating script
@ 2019-07-23 12:04 Tzung-Bi Shih
0 siblings, 0 replies; only message in thread
From: Tzung-Bi Shih @ 2019-07-23 12:04 UTC (permalink / raw)
To: bleung, enric.balletbo, groeck; +Cc: linux-kernel, cychiang, dgreid, tzungbi
To remove ", \" from the last line.
Signed-off-by: Tzung-Bi Shih <tzungbi@google.com>
---
drivers/platform/chrome/cros_ec_trace.c | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/drivers/platform/chrome/cros_ec_trace.c b/drivers/platform/chrome/cros_ec_trace.c
index 0a76412095a9..9b6aba22441f 100644
--- a/drivers/platform/chrome/cros_ec_trace.c
+++ b/drivers/platform/chrome/cros_ec_trace.c
@@ -6,7 +6,23 @@
#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 '
+// BEGIN {
+// on = 0;
+// }
+// {
+// if (on)
+// print buf;
+// else
+// on = 1;
+// buf = $0;
+// }
+// END {
+// gsub(/, \\/, "", buf);
+// print buf;
+// }
+// '
#define EC_CMDS \
TRACE_SYMBOL(EC_CMD_PROTO_VERSION), \
TRACE_SYMBOL(EC_CMD_HELLO), \
--
2.22.0.657.g960e92d24f-goog
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2019-07-23 12:04 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-23 12:04 [PATCH] platform/chrome: cros_ec_trace: update generating script Tzung-Bi Shih
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).