* [PATCH v2] platform/chrome: cros_ec_trace: update generating script
@ 2019-07-23 13:33 Tzung-Bi Shih
2019-07-29 12:51 ` Enric Balletbo i Serra
0 siblings, 1 reply; 2+ messages in thread
From: Tzung-Bi Shih @ 2019-07-23 13:33 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>
---
Changes from v1:
- simpler awk code
drivers/platform/chrome/cros_ec_trace.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/drivers/platform/chrome/cros_ec_trace.c b/drivers/platform/chrome/cros_ec_trace.c
index 0a76412095a9..667460952dad 100644
--- a/drivers/platform/chrome/cros_ec_trace.c
+++ b/drivers/platform/chrome/cros_ec_trace.c
@@ -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), \
--
2.22.0.657.g960e92d24f-goog
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] platform/chrome: cros_ec_trace: update generating script
2019-07-23 13:33 [PATCH v2] platform/chrome: cros_ec_trace: update generating script Tzung-Bi Shih
@ 2019-07-29 12:51 ` Enric Balletbo i Serra
0 siblings, 0 replies; 2+ messages in thread
From: Enric Balletbo i Serra @ 2019-07-29 12:51 UTC (permalink / raw)
To: Tzung-Bi Shih, bleung, groeck; +Cc: linux-kernel, cychiang, dgreid
Hi Tzung-Bi
On 23/7/19 15:33, Tzung-Bi Shih wrote:
> To remove ", \" from the last line.
>
> Signed-off-by: Tzung-Bi Shih <tzungbi@google.com>
> ---
> Changes from v1:
> - simpler awk code
>
> drivers/platform/chrome/cros_ec_trace.c | 13 ++++++++++++-
> 1 file changed, 12 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/platform/chrome/cros_ec_trace.c b/drivers/platform/chrome/cros_ec_trace.c
> index 0a76412095a9..667460952dad 100644
> --- a/drivers/platform/chrome/cros_ec_trace.c
> +++ b/drivers/platform/chrome/cros_ec_trace.c
> @@ -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
> +// 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), \
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-07-29 12:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-23 13:33 [PATCH v2] platform/chrome: cros_ec_trace: update generating script Tzung-Bi Shih
2019-07-29 12:51 ` Enric Balletbo i Serra
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).