Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AA441C2BB85 for ; Thu, 16 Apr 2020 14:34:39 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 869C921927 for ; Thu, 16 Apr 2020 14:34:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 869C921927 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1jP5aw-0008M7-0a; Thu, 16 Apr 2020 14:34:22 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1jP5au-0008M2-Pd for xen-devel@lists.xenproject.org; Thu, 16 Apr 2020 14:34:20 +0000 X-Inumbo-ID: 5b52c8a6-7fef-11ea-8ba5-12813bfff9fa Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 5b52c8a6-7fef-11ea-8ba5-12813bfff9fa; Thu, 16 Apr 2020 14:34:20 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 264B4ACB1; Thu, 16 Apr 2020 14:34:18 +0000 (UTC) Subject: Re: [XEN PATCH v4 18/18] build, include: rework compat-build-header.py To: Anthony PERARD References: <20200331103102.1105674-1-anthony.perard@citrix.com> <20200331103102.1105674-19-anthony.perard@citrix.com> <7bd39b51-5dee-40f5-1524-f36aad6b7d06@suse.com> <20200416141752.GK4088@perard.uk.xensource.com> From: Jan Beulich Message-ID: Date: Thu, 16 Apr 2020 16:34:16 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <20200416141752.GK4088@perard.uk.xensource.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Stefano Stabellini , Julien Grall , Wei Liu , Andrew Cooper , Ian Jackson , George Dunlap , xen-devel@lists.xenproject.org Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" On 16.04.2020 16:17, Anthony PERARD wrote: > On Wed, Apr 08, 2020 at 03:56:02PM +0200, Jan Beulich wrote: >> On 31.03.2020 12:31, Anthony PERARD wrote: >>> Replace a mix of shell script and python script by all python script. >>> >>> Remove the unnecessary "grep -v '^# [0-9]'". It is to hide the >>> linemarkers generated by the preprocessor. But adding -P inhibit there >>> generation, thus the grep isn't needed anymore. >>> >>> gcc -E -P and clang -E -P have different behavior. While both don't >>> generates linemarkers, gcc also removes all empty lines while clang >>> keep them all. We don't need those empty lines, so we don't generates >>> them in the final compat/%.h headers. (This replace `uniq` which was >>> only de-duplicating empty line.) >>> >>> The only changes in the final generated headers it that they don't >>> have empty lines anymore. >> >> Making them harder to read? While typically no-one needs to look at >> their contents, in case of problems it helps if generated files are >> half way accessible to a human as well. > > I do think they are still readable. Those empty lines don't add much. > There are so many of them that a `uniq` is needed... > > For example, with dm_op.h, we have this: Let me take a different example, grant_table.h: Not all of the blank lines it has are useful, but I think the file would suffer if all of them got removed. Jan