[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] xen/arm: traps: fix MISRA C 2012 Rule 8.7 violation
- To: Julien Grall <julien@xxxxxxx>
- From: Luca Fancellu <Luca.Fancellu@xxxxxxx>
- Date: Mon, 4 Jul 2022 08:54:04 +0000
- Accept-language: en-GB, en-US
- Arc-authentication-results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com])
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
- Arc-message-signature: i=2; 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=Ffi6JJLQ5BF3CUzzlUVg3HLCClMSucEA7cdEB5BKdZc=; b=j/vWycgmyU4iVYqEhvoj4JPpVwCKk5QbcWvO9WicL3xiNAgukwDGcLgi+cQIm4scHbQd0jig45s4Y7Sas05xtWziqRU56rjjmr0LW98q/zTL5kVZYOm4yHUOyYbMQaVz8jL4GBv2lN7FwRw6LQntJ8hXYreXTntJATuAuYRnG02Ix9TBDNVLBIRUg0Sm/yfjoXMCBEXqR04txJ4Xepd7k4vTfcCbsh62QLbMiE6fik8ESZKCpmazItAK4+4PU7po56Z3WwS6G7Cz3EeO+rlubdks76BnJbUwoHDaM+ipPCD6joovsdgN8BvgmDB/85f9vGzUXNh96ifSYhQk+0cVuw==
- 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=Ffi6JJLQ5BF3CUzzlUVg3HLCClMSucEA7cdEB5BKdZc=; b=aefJk4T0AZgjNW4T39ul9yxBGR27w9LifWsjErwzKgHrYdwIML1uMManQsEXNDe7tgNjwliK4hckEq8DQ4Nv/aszvHH6mW01UI48lGu9E4+5oIInjQr8yt1+fQtRf10ZxU5WLVBduN7Rz6g0a7CDSwAAbLCkCUbZ7Zbg90ZP+3xoLSigMOEYn2Kj6gb5StglxYXvYW6NDswR7R1O6QAP7WXrXOkgjg4Nv/pmyx++pqsaf55bb7AeR3byvJdPXk3Z/Zx6ZRg5cfkskGLwvttRxTsgj7usyE1UgQUzSKXRzOiT/orJKRIa2ubYutumcKUYRNojwQCPRbLc2PXS75kUBw==
- Arc-seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=R5EuJMPXHSDJg+dakPHU+VVHA+wrmuxsF+z4FAEWhnJCL8XrYVHt4FkFpUeeZxaoX06TkKkSSDzWago5U4mD6rekOJzqoBJiwVadIF3WYhvNyVD1glrULMBgx/ql9SgpMfFnSBjCK7p36a+asGGfS7y4bESkvYvKmBwAn36HuZ+qrEtAyGuQr4HkGQIC1zf8K2cMeSKHcL8s1HquJu0kH+ZD0kWpVAMyKci0LqLMRGtcJy+G4OTwaIeV7qpt1t9FbL5oVB65rXQ6aRx5kZf0HSRyeJKEzDAJBLxH/Y948nZe9vRDRb2h6nwi+lZI1ryBrETrjw+qAFXGyMnUm66XKw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=g63tzO12k0PAJyJGS/YFlgHnN/1wQRs53dWphSu6xPXJ6ymEEwioCReDrjknRgA/Mlm/88wn4ZJKZVKF2xDNi3wTjIQ9r80kRrh/d+HLOhJuPoPr5FQgQG6M8AnMUxrzNkWIKecri0bsBOjyuz1ubu07br29FghUsqaSPf/0geFuD0aD3ZObrHNaZxzBJzg5m+0rmuPK/FsMauavEZQfEfQazloNSFJGcyM3esMKOmfS0lPa/LCRE3FWRWPAcvItBgvfVr8//wO0RY3R8RRUdR2XvjUynwqvdagEg2B7WNUNGlaoyPAXuoYgGGEgwxZlTqzKK47OMbavS0kJ54zniw==
- Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
- Cc: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Xenia Ragiadakou <burzalodowa@xxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
- Delivery-date: Mon, 04 Jul 2022 08:54:23 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Nodisclaimer: true
- Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
- Thread-index: AQHYj3bsMO2Y3PSLZ0WCUDTYt37uBq1t0/kAgAAEvQCAAAI0gIAABXOAgAAAxoCAAACbgIAABosA
- Thread-topic: [PATCH] xen/arm: traps: fix MISRA C 2012 Rule 8.7 violation
>>>>>>
>>>>>> As said I would vote for external linkage here but would be nice to have
>>>>>> other
>>>>>> developers view on this.
>>>>>>
>>>>> In addition to this, if we don’t want to provide a justification for
>>>>> those, since they seems to me
>>>>> code related to debugging they can be removed from “production” code in
>>>>> some way.
>>>>
>>>> Rule 8.7 is advisory, so I think that formal justification of deviations
>>>> is not necessary.
>>>
>>> Yes that is true, in that case we would only need to document it without a
>>> formal justification, however
>>> if the codebase doesn’t include them (because not in production code) I
>>> guess the problem doesn’t exist.
>> Having the production code using static and the non production using
>> external linkage would be kind of weird here.
>> I think having them always with external linkage with a justification is the
>> cleanest way.
>
> +1 this is what I was going to answer :).
>
Yes probably I didn’t explained very well, I’m in favour for external linkage,
hence we are going to have an advisory to
document.
I was just thinking if we need to document that *if* the codebase doesn’t
include them, which is a comment not related
to this patch so apologies for the noise on that.
> Cheers,
>
> --
> Julien Grall
|