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

Re: [XEN PATCH 4/8] xen/arm: address MISRA C:2012 Rule 8.4


  • To: Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>
  • From: Luca Fancellu <Luca.Fancellu@xxxxxxx>
  • Date: Wed, 9 Aug 2023 12:51:06 +0000
  • Accept-language: en-GB, en-US
  • 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=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=K5NAvYB686LIK+svT2xjiSytdBeT8WGVqQ5/TmHumMk=; b=DVKMr2Y4AAmBYO6jN29yGSCdgzin2fF+9wCNVhsZ62mYepYD4SD8AvQfp7ERNz6CKTNVmu9gJGSanP6kM5l13oEEaR3GzYaXwlRyhMm1NNNHo2qhe4//kWTWCyRZpI6nFiC4d2yv0ismtiYpxwMkZVEqPBHlZL3XsAjrYA67h+GIr00W5kzz4XiCxcv+UK8qZOecj73yvLXMjRP1/MynIT/xmVxhhdCkQ7c4IiLao7vocrmZx76bQNkzyIzaCYnAJZ2zPRpH+WIyID/qx883JDHgxPwXSrQxeFRxlvvvJPx7BKXv6ftEZIJrOj/1arwWaEcHwFUfGp2dsIyQR9+vAA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fAZ3hsti0/CYYuhz+v0WOMAZhMc7G1TBBIYpogwU5zrqvrG8iJ3wvEWHG1We+lXoSAhkA4I8WmIkdNJ1oOegHzg1UAGH+5S9AYuEAQkFsdkEXq5o4J/PVfoFoKd8p+KzxqWD/hSuwaxCD33RcZAGtlbPrue4Gc/hC9sNE5rUXDBc/ze1pF7ZjIOZT8ZcZ0K1+gZuVAIbeUL8NPl2FeaV5TYWSfSbUBXbEuHnG8IhOnJKBFXkEq/Ty4q/t3LNjLFF8tnJvswK7onRUPM/XlIC0jufBvNiN5Xu0lUMXAI9lqI9HyyHpME4BWO7zaQ0OeJFfcgkRMVoGWCJEXw39ugkCg==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: Jan Beulich <jbeulich@xxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, "michal.orzel@xxxxxxx" <michal.orzel@xxxxxxx>, "xenia.ragiadakou@xxxxxxx" <xenia.ragiadakou@xxxxxxx>, Ayan Kumar Halder <ayan.kumar.halder@xxxxxxx>, "consulting@xxxxxxxxxxx" <consulting@xxxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Wed, 09 Aug 2023 12:56:52 +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: AQHZyrEaGXA3hK6V6kyURalgDFtEka/h6KeAgAACPIA=
  • Thread-topic: [XEN PATCH 4/8] xen/arm: address MISRA C:2012 Rule 8.4


> On 9 Aug 2023, at 13:42, Jan Beulich <jbeulich@xxxxxxxx> wrote:
> 
> On 09.08.2023 13:02, Nicola Vetrini wrote:
>> 'xen/hypercall.h' is included in 'xen/arch/arm/setup.c' to allow
>> the declaration of 'arch_get_xen_caps' to be visible when
>> defining the function.
>> 
>> The header 'xen/delay.h' is included in 'xen/arch/arm/time.c'
>> to allow the declaration of 'udelay' to be visible.
>> 
>> At the same time, a declaration for 'get_sec' is added in
>> 'xen/include/xen/time.h' to be available for every call site
>> (in particular cper.h).
>> 
>> Signed-off-by: Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>
>> ---
>> xen/arch/arm/setup.c   | 1 +
>> xen/arch/arm/time.c    | 1 +
>> xen/include/xen/cper.h | 3 +--
>> xen/include/xen/time.h | 1 +
>> 4 files changed, 4 insertions(+), 2 deletions(-)
> 
> I would have almost put this off as Arm-only, but then saw this diffstat.
> How come you consider cper.h Arm-related? This is used only by APEI source
> files, which in turn are used only by x86 afaics. So I think you want to
> split off the movement of the get_sec() declaration.
> 
> As to title and description (perhaps affecting more than just this patch):
> Failing to have declarations in scope where definitions appear is an at
> least latent bug. We fix these as we find them anyway, so Misra is
> secondary here. Hence I'd like to suggest that you declare any such
> change as an actual bugfix, ideally including a Fixes: tag.

To prevent back and forth I would suggest also to have a look in 
sending-patches.pandoc,
### Fixes section, on the expected syntax for the tag

> It is of
> course fine to mention that this then also addresses Misra rule 8.4.
> 
> Jan
> 




 


Rackspace

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