[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <bb8a3194-4e4a-0ab4-8b8a-6f1c2255f14f@collabora.com>
Date: Tue, 30 Jul 2019 12:16:23 +0200
From: Enric Balletbo i Serra <enric.balletbo@...labora.com>
To: Tzung-Bi Shih <tzungbi@...gle.com>, bleung@...omium.org,
groeck@...omium.org
Cc: linux-kernel@...r.kernel.org, cychiang@...gle.com,
dgreid@...gle.com, Raul E Rangel <rrangel@...omium.org>
Subject: Re: [PATCH v3] platform/chrome: cros_ec_trace: update generating
script
Hi Tzung-Bi,
cc'ing Raul for if he has comments
On 29/7/19 16:39, Tzung-Bi Shih wrote:
> To remove ", \" from the last line.
>
I'm overall fine with the patch itself but I'd prefer a better description here.
Thanks,
~ Enric
> Signed-off-by: Tzung-Bi Shih <tzungbi@...gle.com>
> ---
> Changes from v1:
> - simpler awk code
> Changes from v2:
> - use c style comments instead of c++ style
> - use '@' delimiter in sed instead of '/' to avoid unintentional end of
> comment "*/"
>
> drivers/platform/chrome/cros_ec_trace.c | 17 +++++++++++++++--
> 1 file changed, 15 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/platform/chrome/cros_ec_trace.c b/drivers/platform/chrome/cros_ec_trace.c
> index 0a76412095a9..f6034b774f9a 100644
> --- a/drivers/platform/chrome/cros_ec_trace.c
> +++ b/drivers/platform/chrome/cros_ec_trace.c
> @@ -5,8 +5,21 @@
>
> #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
> +/*
> + * Generate the list using the following script:
> + * sed -n 's@...efine \(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), \
>
Powered by blists - more mailing lists