Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp7336459ybi; Thu, 1 Aug 2019 06:44:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqwmIfRXnVG4Z6PMEXl1U/1n5jD5hoAsJRfBNn1etZQzevwbltCMjmmpP/SmarVP+cjc3t2D X-Received: by 2002:a17:902:102c:: with SMTP id b41mr123790106pla.204.1564667050726; Thu, 01 Aug 2019 06:44:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564667050; cv=none; d=google.com; s=arc-20160816; b=KDn1BFLpLP200Oofbpn8D3C2cjgWgSlVpEwPsmKwsL0nhJb+EjpJ4NrzB6z/9HG/l2 B19cjHF8fNuT7gn2K51yphQHDgPHAKrgBr78LNY7UzPaFR8ql3asMajrQMNpiCRrx2rY c+d2PPtr2e+uL7TgM9esLixr518gtArFlS+fyEvPGH/WVO9OmJ6s/hAYdQ3y0dGIJU3M MWOSFJecwfTtwergALVAAKCsqxr853ni4UPZ2LqQezfFukrk4wWVQIWOemIWqTOgxvqn wjguTa5AuQZo09pdCMgSDjU+8gb8IwQLp+dwRSthEMXQOJ+V41+M0EnNGdvx9V5Fj9KB VkbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=ImwJbSSZB+YiKZWOtwo3hMSTMwULVWIQTiB8Utiq+Yg=; b=CTV0UL2HXcZTthj4Ye9hEjx63y8YgbtEUOsslcK3k5f6DaQGesHKpnXx2t+X/Huuc6 vEnSKN/pxS3nnGcVypvqP966TVAYpHcmR9vRNULrAp+1AmOwSKj3nOdhNUDIf1LiA8Vh OHNbTKW+e1w5zDOXvgxNOvCu148zeamVfUmyjQX19wrQhqowve1q/hjwdRvwlxeM2TNR +u+R3YoRz5mgjWRioXnM6vtnDPa15GRJPzMDl4Qlv4dFwul0nOmgEr9JqIPcXcAMXEQJ SliIs7MzO++g+aWG2rDxE+fM0gx44gimb3IWYaFVWiTnxkDXA3rWPPB5s1NginCkak6H rkLQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 6si34442445pla.88.2019.08.01.06.43.55; Thu, 01 Aug 2019 06:44:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731335AbfHANa6 (ORCPT + 99 others); Thu, 1 Aug 2019 09:30:58 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:37742 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731081AbfHANa6 (ORCPT ); Thu, 1 Aug 2019 09:30:58 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: eballetbo) with ESMTPSA id F2BC928C4A8 Subject: Re: [PATCH v4] platform/chrome: cros_ec_trace: update generating script To: Tzung-Bi Shih Cc: bleung@chromium.org, groeck@chromium.org, rrangel@chromium.org, Linux Kernel Mailing List , Jimmy Cheng-Yi Chiang , Dylan Reid References: <20190730134704.44515-1-tzungbi@google.com> <106711f8-117a-d0df-9b66-dc6be6431d07@collabora.com> From: Enric Balletbo i Serra Message-ID: <89aac768-b096-c51c-2ec7-5c135b089a31@collabora.com> Date: Thu, 1 Aug 2019 15:30:53 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > 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