[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: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
- From: Luca Fancellu <Luca.Fancellu@xxxxxxx>
- Date: Mon, 4 Jul 2022 07:58:19 +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=y8iN7FG7QqIPSNaC7tk21q2PP6kF+jvvb+UHhnPZMsc=; b=IcrPlGxtnShEIfkFOfVfQOzucX0ePTSkywvazD+Ox83CwWb8tPB6uJrsUaZZc1DwCQUC2rNmY7doYD+FfzDx8aAn05h9Ata8lBu6ZJ/BL4OE7uoW71sZflLBERi7mRa79CDvwvDm1xWCelMrX9RHZ5CkfCk6J7ngswIU0AnyaHSUnxeru8TBddccPG4o53okym8vJFs1wKdCIftu/vIZecrY8ws15K/pTmmxvD0t7dj9plOYHlMswSioKS9izNxc3jrxcCZ+uxDsbhdGyRH7Rw18Gwjh+d1QyBSeQ+tB7gmts97xg3v6bhBnpjMeFIUmjusCK3TB7Eo5UdMtuTVkWA==
- 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=y8iN7FG7QqIPSNaC7tk21q2PP6kF+jvvb+UHhnPZMsc=; b=BBarIyztV+nyZkO7Y8gtV9ZjSCnwSiBTBSRTi/FsZJdCzCB2c14NbpA1hGiUg+ZxTO5XA6xfGH1otQMdfpAEu+PaxifEAK/PZ1zgoZnKDUAS8/dwUVfnFvX0zx9pYJVMWUCr3YWJPdFmY2wGLoES7EQNWqRTspWXdIgn7zXDV4Zsv7UnhKBc9dDkZpTcvGTYUWjALT9TiIuyCctABsrgPEQCkq3XBuV32hZxS8N7ksJxpg+x8pc1XmoukUmdMKTJ9OIhss8MhDCp83k5KQ225x9WvbczV6R1xVkvpSZE3aoiUsaEWCVl3sBT5h8FmjzkOLRfLee1175H74dymvF7vw==
- Arc-seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=LIa7S44yQK5Ap2umPmNN1hZiCCmEZvE7YOfyeSggrNwjRYbLz9GzLCWrSlBC6IBL3r3No8/cl5YTMoryhYEbbBTSEeZBGqGT6gQZOWDCeie2Tk9KiSe5u9uT3nzfMciEEEXtCVU8LFy1/KUGuxV6LK0TksXEpp78e3jdN1907t0J/SWj9H5qJrrsMxhRQ1LBPMVyyx6ZCD+4rjvfodf8F2HcIjfSYEtIsGE4IgwDAaeypiRn2F/on18sSubRoB0yUBtTGKRKXcF/vB4xXDrEjXzupN1wcFVxQBuoSUxZ7EGw8SNWclNT4Diag0aKQSDbSFHZW0PlLVrZLqT7xhenog==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XNiT8BDuaxJeqngfI6qdkPr58XXsZW03b15rtmFLnoIJWB6ffzJ6ndJefr4/6JXd+UumzeRdeKOg7lwsepEyi4dboRjMiQr0MXDpB3MP5wuTP8Xr06Ac7LmiynksLboKZfSk7uMA4EXubSLsNmvepypI38LHZK8Buz7fyjxVNoj8Y89GBcl2otDv9abxttOlSlwXgQS+fe1RBG3gBmeTNxCq5GZvY69RUC/2fERz22oQpyOPP94LN9eIH5HMgeCjKzxDwKv6Yx/lSZlT2x3yHuVKQ53An2X/1BFnj2PwabA1QLbCibM2Ipdy5C+WwA0ir4RUMPi2kIhIROfwS/CN6Q==
- Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
- Cc: Xenia Ragiadakou <burzalodowa@xxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
- Delivery-date: Mon, 04 Jul 2022 07:58:42 +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/kAgAAEvQA=
- Thread-topic: [PATCH] xen/arm: traps: fix MISRA C 2012 Rule 8.7 violation
>> 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.
> Cheers
> Bertrand
|