[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC PATCH 1/5] [WIP]misra: add entries to the excluded list


  • To: Luca Fancellu <Luca.Fancellu@xxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 31 Jul 2023 17:20:21 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=6YEX4x3csvhwU9a1JvGEy2rXbRl8myJVdp7sXTKYJxs=; b=RVv9SwYD98jZkLvlV5tLsvK0vB4XGBLzvJlduKWYvS1bn1bKLaylUyC9kbA4ppLecbx0XBefhFsI/0gE+Ufjafo5bL6o47kTfzqf6AtOWSDOlIlmCiGznBdgViSaeC0IDa1fpNESQobGAEgerrliLakltXEZh5vwdxCa35CX4lit6X/xTe3B1nU63oMKceI7WMNKe8BIoWxsfejOgy4cj8nS8RnCwsanXfk93Pqy/SS0Toka2zAIlck4shEh4XmBfOF+MJm8p7tfujkr2ttSkSEEKXbysr5JzFd6U0XEMTfF262sVCoLZysiacOG7E/NPrPj16Mt9Wvo8QY8ca7EAw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ths20cYQQygn15LBRACcgM3fE0Adz6lOt++g9hWbiXHvxst5gkOP3Q4Dn5qhcIC8bBcNoyB8O93Lyt5wG4sBvswLh2dusfPdLq3/rdHN/TxHZoii4e58/7gxeTd8mFyHQyELuWU8X5Ca5M2G/Smi87IwFvBz5024m0wcqE6xF0smHxele+ksRZWNyUXYyVeJYaL1UD1PivL8gCzh+2E/pxLCD1tbQIsVWrH+w6E+YoGsFSshboJDc/rICpHTSuqLLhRUqZBrpLzYy1XwMzXyqhpTr1bv3zc4Ztf+UCmjdZHnlB5CcOX/xAwJsFV/dOBmFPd0FZqdtRuEi1EsanWL0g==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Wei Chen <Wei.Chen@xxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Mon, 31 Jul 2023 15:20:34 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 31.07.2023 17:11, Luca Fancellu wrote:
>>> +        {
>>> +            "rel_path": "arch/x86/include/asm/bug.h",
>>> +            "comment": "Includes mostly assembly macro"
>>> +        },
>>
>> Mind me asking why assembly macros wouldn't want maintaining in proper
>> style?
> 
> From what I know (experts on CF correct me if I am wrong) clang-format is 
> meant to format only some languages
> (C/C++/...) and assembly is not one of them, so what is happening is that 
> most of the time clang-format breaks
> it, in fact we are formatting only .c and .h, but since we have some headers 
> with assembly macros, I’ve seen some issues
> that ranges from really ugly formatting to build break.
> 
> One thing we could do, is to export the headers that contain only assembly 
> stuffs in dedicate headers (<header>_asm.h ?)
> so that we could easily use a name regex to exclude "*_asm.h” from 
> clang-format? And also these headers could #error if
> included when __ASSEMBLY__ is not defined?

In principle this may be a route to go (naming aside), but first of all
I wonder what "assembler macros" are to you: We use both C macros and
true assembler macros in assembly code. The former I would hope formatting
tools don't have an issue with.

Jan



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.