mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Enric Balletbo i Serra <enric.balletbo@collabora.com>
To: Tzung-Bi Shih <tzungbi@google.com>,
	bleung@chromium.org, groeck@chromium.org
Cc: linux-kernel@vger.kernel.org, cychiang@google.com,
	dgreid@google.com, Raul E Rangel <rrangel@chromium.org>
Subject: Re: [PATCH v3] platform/chrome: cros_ec_trace: update generating script
Date: Tue, 30 Jul 2019 12:16:23 +0200	[thread overview]
Message-ID: <bb8a3194-4e4a-0ab4-8b8a-6f1c2255f14f@collabora.com> (raw)
In-Reply-To: <20190729143932.167915-1-tzungbi@google.com>

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@google.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@^#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), \
> 

      reply	other threads:[~2019-07-30 10:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-29 14:39 Tzung-Bi Shih
2019-07-30 10:16 ` Enric Balletbo i Serra [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bb8a3194-4e4a-0ab4-8b8a-6f1c2255f14f@collabora.com \
    --to=enric.balletbo@collabora.com \
    --cc=bleung@chromium.org \
    --cc=cychiang@google.com \
    --cc=dgreid@google.com \
    --cc=groeck@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rrangel@chromium.org \
    --cc=tzungbi@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®