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

Re: [XEN PATCH v2 00/10] address violations of MISRA C:2012 Directive 4.10


  • To: Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 26 Oct 2023 09:07:10 +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=GBRVz6NEhbBr4JvDnQvORl+zXPCbp9Jtnxwu6amglvI=; b=ALnzgBQERiX2Syo16i1QzZj9T5A99ctO1k4jW87KrrGNUp2hsRybC0m8NsHAPpPzjrOpQIqQ+3jM3Dsz+EAxi1v4PI1zX2MtWrFSargZvIPMA0wpQ9qCvHUhNMt2+eia3TylBi/fRMD/LQMIwPkDBPFvkfqpZsPqRXtDRyH97nAniq3bqoniD/pEug8MJOyt6FmjOE6zgG6HFuSZJ32O7bvOJETegAZSCGMtLp9HOq5bR7ZIKPS1ME3HPrvbJTCEj4l1TwqreEgWRqwGQDonUDVYrADEiH71eqHK8wi9X0qvvGrQDuPtGHft54vYjL5aA0UbIW4KJVVS/XXziFPzbQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FKm6SHmFajk4NlGOUZVURElxWvS+2hV1qYDmb6IP5NlGrkNgbcZmReXUqv1c3dI7wZ//ampFDrcWLGYGtIUPud3fvTpJ45XBFPXk03M7pHdexkDzSj5OUZ1khpRb4RPntScnxV35dGt30213s1VobzO2LY0N6uF/xUflHAndNZTShSmuyAIQj+9bEgGr2MIHODfme/skvowtZy9HrwXgOvr/KQoU7B52OXxqsnu+t+vQMrvz6d+ANxEwLO25qiCNbWEhHLxE+urBRwq9qrYmYKTobuuSWasDMOV6uBma2z1DxZTFkodS4VKkr1LLMzc29+VKBO37HcnoZur+YsJ2sg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Stefano Stabellini <stefano.stabellini@xxxxxxx>, Simone Ballarin <simone.ballarin@xxxxxxxxxxx>, consulting@xxxxxxxxxxx, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Doug Goldstein <cardoe@xxxxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx, Julien Grall <julien@xxxxxxx>
  • Delivery-date: Thu, 26 Oct 2023 07:07:26 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 25.10.2023 23:12, Stefano Stabellini wrote:
> On Wed, 25 Oct 2023, Julien Grall wrote:
>> On 25/10/2023 17:01, Jan Beulich wrote:
>>> On 25.10.2023 17:58, Julien Grall wrote:
>>>> On 25/10/2023 09:18, Jan Beulich wrote:
>>>>> On 24.10.2023 21:59, Stefano Stabellini wrote:
>>>>>> If I understood correctly I am fine with that. To make sure we are all
>>>>>> on the same page, can you provide a couple of samples?
>>>>>
>>>>> Taking the earlier example, instead of DRIVERS_PASSTHROUGH_VTD_DMAR_H it
>>>>> would then be VTD_DMAR_H. arch/x86/pv/mm.h would use PV_MM_H, but then
>>>>> you can already see that a hypothetical arch/x86/mm.h would use
>>>>> X86_MM_H,
>>>>> thus colliding with what your proposal would also yield for
>>>>> arch/x86/include/asm/mm.h. So maybe private header guards should come
>>>>> with e.g. a trailing underscore? Or double underscores as component
>>>>> separators, where .../include/... use only single underscores? Or
>>>>> headers in arch/*/include/asm/ use ASM_<name>_H (i.e. not making the
>>>>> architecture explicit in the guard name, on the grounds that headers
>>>>> from multiple architectures shouldn't be included at the same time)?
>>>> Thanks for providing some details.  The proposal for private headers
>>>> make sense. For arch/.../include/asm/ headers, I would strongly prefer
>>>> if we use prefix them with ASM_*.
>>>>
>>>> As a side note, I am guessing for asm-generic, we would want to use
>>>> ASM_GENERIC_* for the guard prefix. Is that correct?
>>>
>>> That was an assumption I was working from, yes. Could also be just
>>> GENERIC_ afaic.
>>
>> Thanks for the confirmation. I am fine with either GENERIC_ or ASM_GENERIC_.
> 
> OK. So in summary:
> - arch/.../include/asm/ headers would use ASM_<filename>_H
> - private headers would use <dir>_<filename>_H
> - asm-generic headers would use ASM_GENERIC_<filename>_H
> 
> If that's agreed, we can move forward with the patch following this
> scheme.

FTAOD - just as long as <dir> is clarified to mean only the leaf-most
directory component (assuming we're still talking about the most
recently proposed scheme and we deem the risk of collisions low enough
there).

Jan



 


Rackspace

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