[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: Xenia Ragiadakou <burzalodowa@xxxxxxxxx>
- From: Luca Fancellu <Luca.Fancellu@xxxxxxx>
- Date: Mon, 4 Jul 2022 08:25:43 +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=dSGkZuZWUzelbyoh0bkhI+vSmzyC5A19iqWkuxoyJuk=; b=h2sqnjlWntJc8+DtG0BxXK7DSzbB1Y+pfntGa8PDqhHkjsi5FwX1oTmkqI4Jdm7q+0gUtTRmOm5SeAz9C/EV0T71s/mf+qX3GxWe2MOBqPjnlST28ZCNoUXmN02NQvyJiBU/T8kWkoot+zT5XSYN1/cntroPGKRcZH7Ys92xRZUiEgeucP41bmuaCYaRzMSFMy5XsJdBeohqDSZEImWUbGuMQZS+TA4RXZ2M3+pZ6vK3o6ubr0fBlJfiHuP7tDp4x90gGCvTEv0Ro5T+NSlnaprV9rUusLLUaKyTNOdtsW2Yl3SWiECMKLNwiZyrCsouaaovr8z+mIEOL77BTTzpcg==
- 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=dSGkZuZWUzelbyoh0bkhI+vSmzyC5A19iqWkuxoyJuk=; b=R8/BFvVCHHA2de4+HDRCEavCS7zeMpM03SifJR2N55cdKudrT1Av7YdUJhbRN2HJJ/0JwISvZGAucn4zzuHTpRjrtalVgYiF3I9NsiWZgAqH7GuYL6zu0wheChDMvEso6KVClx3HQPx8b1MGERxCZNJS4p3ef64nbt/MK2iirh+11tMJ6ctKl5pRWiuSL6fR7IrQO1/Vw4WJshIhp49oGYdxVrnS2YzVoewvEn9HQU9Su74kuGERNFmlM/oSGiMmUORQgVQcN6bROCZa2Qc2aVbmB/EAY6Bs8YASaqkmHlplFl57hvivgsoriAQjasBrBhoFPqk2RCDiHGTxBo+7fQ==
- Arc-seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=NH2gG/T/sWSwR6mQBi74JpD+9iq+p1EDoeOfDkHmKQ7EK51HxdouTJUL9Mb9r2RSkqaV1lwADmblGY40TehORECoCqfaxaFkPFQBNmjrs+zm8oXe7R9upJRIBy1MJN6MMphL/iLANruJlxGiQpdJ/cMyy0qscYj68E1w0ndGr9cu9WgfJ7QAq/bORnc81lvUpb7rcCZZ9S2vHwpraAs3KERc4/Obc3bXMMqwISCuVYb8Bdafe3UAu/8ZCMniuBe47wLRJBZ17pOsgAZ+6EWh0AjsIKAqYGaZkuJ2A5W+eJekQ/tFmpWqjoRbog9cFmK0EIC4G0Qn5lPsRgdLN4Lovw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TcX9oOWRJItCeEEBp7q81h8UniWEE1rKuy2Q43coGTLLMq8dF+zQQKPFJi5WT3RfTwpvN5RdRtZLCeRwf9xX9M9STeZT1QFnUJRKa/U62dSpNSCb3IBofQVc6m77WNlEJ8RteAh40iaNB89/9gfCS4eUCooYck4EtqUJcqcSAU+94eYvvVh7iRgYaQZ6uJNJExYLcb+jZv8mG2t+1wHfD/nTMhLQHZ4ecpVedOOTy1ZckuaIgyKdbeabXbT15VKCOi0st+2Jr1havbiPiHNzjBp0NMEEkVkoVmReMXnnbJswvYPAoG85qLfzAJnN0I3RR2lIkMGLKHV+Uhu89yy1mw==
- 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>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
- Delivery-date: Mon, 04 Jul 2022 08:26:00 +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/kAgAAEvQCAAAI0gIAABXOA
- Thread-topic: [PATCH] xen/arm: traps: fix MISRA C 2012 Rule 8.7 violation
> On 4 Jul 2022, at 09:06, Xenia Ragiadakou <burzalodowa@xxxxxxxxx> wrote:
>
>
>
> On 7/4/22 10:58, Luca Fancellu wrote:
>>>> I am not 100% sure about this patch.
>>>> I think show_stack() should be declared the same way as show_registers().
>>>> So either both of them will be declared with external linkage or both of
>>>> them
>>>> will be declared with internal linkage.
>>>
>>> I think that those 2 should be declared with external linkage with a comment
>>> explaining why they are. For me those are useful when developing or
>>> debugging
>>> and I sometime call those to force dumping the status.
>>> So I would vote to keep the external linkage.
>>>
>>>> I decided to declare both of them static because they are referenced only
>>>> in
>>>> traps.c but I could have, also, add the declaration of show_stack() in
>>>> asm/processor.h header instead. Rule 8.7 is advisory.
>>>
>>> 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.
>
>>> Cheers
>>> Bertrand
>
> --
> Xenia
|