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

Re: [PATCH] docs/misra: add Rule 9.3


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Luca Fancellu <Luca.Fancellu@xxxxxxx>
  • Date: Wed, 12 Jul 2023 09:26: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=yRt9e1uXosEYbKTEU+cTJMbucibKq6c3u0VLjz6C7O8=; b=R7Lh6V6XBDMpeoTGNVmNLboanKCHfbppRMn3STdud1CqBgWMnqLB9MRs3bfaOggiNUC551vctMB9j0+WCfPGnH8kuZlsvAQ/Aat55SE67kbwOWaXwEes96dZNDyxN3a/tfWyVYgQTy2ctc+e45hidANuHA8vTR1GTrv+9yTiMyGfKW5ul56IeC54SdHD3rKNm3uohP+1xQwE71reEEy8VAUm9mScQ+AVxriixry74z5x13KNEeFh1ucL1Jg4KVaw0tQxPKXS+cXmshLbPiHRU/SB8dRvsxtMJT46xGieVkzzMzqafMsXXhu5MLLaX0d71TPonYlYcN9ttSDRBMyzgg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TStLri7e7q/fn+2mnMyBWUJPy0jc2M5JFWPdSxjG2GZEfyYQE6SBSEJBAgiTapREOe4BFlxn0WBaffMz98ORu55w3M55lOVSQu6opUeTPDTWXAT/9tAkDzImzVPdJi9GJhvGpGQldSMy0WM1gfoInFbLKeEGgLLx9dpy/MQa5gbsJWwe1dkY7MFoFRkq9QLzlmQPNfUT4adLDOe6x4DJeb/D7QFYQoZF8+5JbCeBHUQWyMi24c+nYx0mUqxHNPEWc9zaUivkYxAtR/gpGDRwnRervHojHB6dAr3ibVwSE+fo1yTfEUN4Q4kDtyfq2mlLKUADldPG/w1//ZEUagCpcA==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "andrew.cooper3@xxxxxxxxxx" <andrew.cooper3@xxxxxxxxxx>, "roger.pau@xxxxxxxxxx" <roger.pau@xxxxxxxxxx>, "julien@xxxxxxx" <julien@xxxxxxx>, "george.dunlap@xxxxxxxxxx" <george.dunlap@xxxxxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Stefano Stabellini <stefano.stabellini@xxxxxxx>
  • Delivery-date: Wed, 12 Jul 2023 09:26:37 +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: AQHZtDVnm2uoBPIrqkmByEz++gKzmq+1yx6AgAARUgCAAADeAA==
  • Thread-topic: [PATCH] docs/misra: add Rule 9.3


> On 12 Jul 2023, at 10:22, Jan Beulich <jbeulich@xxxxxxxx> wrote:
> 
> On 12.07.2023 10:21, Luca Fancellu wrote:
>>> On 11 Jul 2023, at 21:21, Stefano Stabellini <sstabellini@xxxxxxxxxx> wrote:
>>> 
>>> From: Stefano Stabellini <stefano.stabellini@xxxxxxx>
>>> 
>>> Specify that {} is allowed for zero-initialization.
>>> 
>>> Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxx>
>> 
>> Reviewed-by: Luca Fancellu <luca.fancellu@xxxxxxx>
> 
> Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
> 
>>> --- a/docs/misra/rules.rst
>>> +++ b/docs/misra/rules.rst
>>> @@ -284,6 +284,11 @@ maintainers if you want to suggest a change.
>>>       braces
>>>     -
>>> 
>>> +   * - `Rule 9.3 
>>> <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_09_03.c>`_
>>> +     - Required
>>> +     - Arrays shall not be partially initialized
>>> +     - {} is also allowed to specify explicit zero-initialization
>> 
>> Not related to this patch, but how is the coding style for this? Is it {} 
>> without spaces or { } with one space?
>> It’s not specified in the coding style
> 
> In the absence of anything written down, I'm inclined to infer both
> forms are acceptable.

:) I see, that’s what I was worried, anyway you are right! 
I have a WIP for clang format that would generate some discussion, but at least 
I hope it will clarify many of these small
things that make our codebase less uniform, making us write down some rules 

> 
> Jan


 


Rackspace

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