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>
Cc: bleung@chromium.org, groeck@chromium.org, rrangel@chromium.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Jimmy Cheng-Yi Chiang <cychiang@google.com>,
	Dylan Reid <dgreid@google.com>
Subject: Re: [PATCH v4] platform/chrome: cros_ec_trace: update generating script
Date: Thu, 1 Aug 2019 15:30:53 +0200	[thread overview]
Message-ID: <89aac768-b096-c51c-2ec7-5c135b089a31@collabora.com> (raw)
In-Reply-To: <CA+Px+wU=V0cGZeAxoqSJeVTLcO+v9=tPQKxKBTp-npsgqXo3yQ@mail.gmail.com>

Hi Tzung-Bi,

On 1/8/19 15:04, Tzung-Bi Shih wrote:
> On Thu, Aug 1, 2019 at 6:59 PM Enric Balletbo i Serra
> <enric.balletbo@collabora.com> wrote:
>>
>> Hi Tzung-Bi
>>
>> On 30/7/19 16:07, Tzung-Bi Shih wrote:
>>> Hi Enric,
>>>
>>> I found it is error-prone to replace the EC_CMDS after updated.
>>> Perhaps, we should introduce an intermediate file "cros_ec_trace.inc".
>>
>> I am not sure I get you here, a .inc? could you explain a bit more?
>>
> Manually generate .inc for all EC host commands:
> sed ... include/linux/mfd/cros_ec_commands.h | awk ...
>> drivers/platform/chrome/cros_ec_trace.inc
> 
> In cros_ec_trace.c:
> #include "cros_ec_trace.inc"
> 

Got it. I don't think this is a "kernel" way to do it. Also, I don't see a big
value on doing this.

> cros_ec_trace.inc:
> #ifndef EC_CMDS
> #define EC_CMDS \
>     ...
> #endif
> 
> Override the whole file instead of replacing part of file to prevent
> cut-and-paste error.
> 

The way I see all this is that bulk updates of that file "shouldn't be allowed"
or are not preferable. Ideally, _we_ (the maintainers), should take care on have
cros_ec_commands and cros_ec_trace sync. For that, when someone sends a patch
that touches the cros_ec_commands _we_ (them maintainers) should tell him to
update also the cros_ec_trace file in the same patchset, and the script, is
simply a helper to do that.

Note that the cros_ec_trace needs an update to match current cros_ec_commands
but I'm waiting to do the sync because we have a patchset that moves the
cros_ec_commands.h file from include/linux/mfd to include/linux/platform_data.
Once moved I'll sync the cros_ec_trace file with current cros_ec_commands

Note also that actually, we want:

- cros_ec_commands (kernel) sync with ec_commands (EC firmware)
- cros_ec_commands (kernel) sync with cros_ec_trace (kernel)

Hopefully we will have all sync soon.

Thanks,
~ Enric

  reply	other threads:[~2019-08-01 13:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-30 13:47 Tzung-Bi Shih
2019-07-30 14:07 ` Tzung-Bi Shih
2019-08-01 10:59   ` Enric Balletbo i Serra
2019-08-01 13:04     ` Tzung-Bi Shih
2019-08-01 13:30       ` Enric Balletbo i Serra [this message]
2019-08-01 14:50         ` Raul Rangel
     [not found]           ` <CA+Px+wUzyFB6vRM91PTFkY_fBfp2xybegy34rbW_D9zzNX6-8Q@mail.gmail.com>
2019-08-29 13:42             ` Enric Balletbo i Serra
2019-08-29 13:51               ` Enric Balletbo Serra

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=89aac768-b096-c51c-2ec7-5c135b089a31@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®