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

Re: [PATCH v3] docs/misra: add 14.3


  • To: Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • From: Henry Wang <Henry.Wang@xxxxxxx>
  • Date: Wed, 27 Sep 2023 23:56:47 +0000
  • Accept-language: zh-CN, 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=ZtCkp7ugLd4B/i5tixAu80fbaUEAWEUh/fHUs/BFhYc=; b=TwOUgBa6w/lzZ4afgOayLKvNQt0SOAqpCxSmeUQuZzNeMYfIXc4cp35Pwe1JiNAWGWcykveI+m3QA0zaSdoy0MzyRFsfBK5JneZSopln1VDpkYbehBHhSOgTTkp8C+/HFLcGZWspXz9oNPMVsiPZnkhSyAq0KjSmxHXPaY2aAYMpifAnOb2I9g+gA2/i8FxA+e5FOb+AgNMS5XuCu2A9aNn/QvmmYWmP9/e6UHlgbB7fZ0pN9+jEewUOZzcG4jrsWJP3dVBgyQBKbcSrqWhbIi6zep6lWszQdh+uD9DtVc8QlE94Q2RtqsE+bdJg0cyLMDv1JkUKHoJ+plde+BvSqQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=d4qgoDKE4/Visj0j7e1V9GE1kWf1XrEJayxrTzxpH7Uhrni8eZv1Q3bnOlWZoL7rmjLTMzouFXJ9WTotciWCsS1n0Sx21V5wA8/RSpZbO7LyOzL0citaL6N/vEyKicZFvGWa1ow4DPcXkmS4vxw9xubklarBbmpWGseCYiq83d8nUOXUzL3dU4SlZDVzEZw4spZ38jgKBkseu2UcRCJbiXIxhmPIpqxJrLK9iAQznpx1SKNCPr9Zn/CoVyJQo+FYkattm9tubnsPtaM1KliuMn4TWtB3xxGjUOUmygMJ6bLVyIVhW3fYsNsNdIhkCKhnq74X4kZfvtq1SG7X8mwviQ==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, "julien@xxxxxxx" <julien@xxxxxxx>, "george.dunlap@xxxxxxxxxx" <george.dunlap@xxxxxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, "roberto.bagnara@xxxxxxxxxxx" <roberto.bagnara@xxxxxxxxxxx>, "nicola.vetrini@xxxxxxxxxxx" <nicola.vetrini@xxxxxxxxxxx>, Stefano Stabellini <stefano.stabellini@xxxxxxx>
  • Delivery-date: Wed, 27 Sep 2023 23:57:51 +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: AQHZ4pLvPiwH8j4chkujiNUVRiOVPbAvdj0AgAAAPYCAAADfAA==
  • Thread-topic: [PATCH v3] docs/misra: add 14.3

Hi Stefano,

> On Sep 28, 2023, at 07:53, Stefano Stabellini <sstabellini@xxxxxxxxxx> wrote:
> 
> Actually adding Henry
> 
> On Wed, 27 Sep 2023, Stefano Stabellini wrote:
>> Hi Henry,
>> 
>> This patch is now acked. Should it go in 4.18?

Sure, a doc change should be harmless so:

Release-acked-by: Henry Wang <Henry.Wang@xxxxxxx>

Kind regards,
Henry


>> 
>> In terms of risk of breaking, it is zero as nothing builds or runs based
>> on this document.
>> 
>> At the same time, the benefit is also low because the main value of this
>> document is for future coding changes that would be too late now for
>> 4.18. So the benefits of committing it now are ease of keeping track of
>> the change and positive PR when we make the 4.18 release and we talk
>> about the total number of MISRA C rules we adopted.
>> 
>> 
>> 
>> On Fri, 8 Sep 2023, Stefano Stabellini wrote:
>>> From: Stefano Stabellini <stefano.stabellini@xxxxxxx>
>>> 
>>> Add 14.3, with project-wide deviations.
>>> 
>>> Also take the opportunity to clarify that parameters of function pointer
>>> types are expected to have names (Rule 8.2).
>>> 
>>> Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxx>
>>> ---
>>> Changes in v3:
>>> - add ,
>>> - add switch(sizeof(...)) and switch(offsetof(...))
>>> ---
>>> docs/misra/rules.rst | 15 ++++++++++++++-
>>> 1 file changed, 14 insertions(+), 1 deletion(-)
>>> 
>>> diff --git a/docs/misra/rules.rst b/docs/misra/rules.rst
>>> index 34916e266a..ac76e20a9c 100644
>>> --- a/docs/misra/rules.rst
>>> +++ b/docs/misra/rules.rst
>>> @@ -234,7 +234,8 @@ maintainers if you want to suggest a change.
>>>    * - `Rule 8.2 
>>> <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_08_02.c>`_
>>>      - Required
>>>      - Function types shall be in prototype form with named parameters
>>> -     -
>>> +     - Clarification: both function and function pointers types shall
>>> +       have named parameters.
>>> 
>>>    * - `Rule 8.3 
>>> <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_08_03.c>`_
>>>      - Required
>>> @@ -385,6 +386,18 @@ maintainers if you want to suggest a change.
>>>      - A loop counter shall not have essentially floating type
>>>      -
>>> 
>>> +   * - `Rule 14.3 
>>> <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_14_03.c>`_
>>> +     - Required
>>> +     - Controlling expressions shall not be invariant
>>> +     - Due to the extensive usage of IS_ENABLED, sizeof compile-time
>>> +       checks, and other constructs that are detected as errors by MISRA
>>> +       C scanners, managing the configuration of a MISRA C scanner for
>>> +       this rule would be unmanageable. Thus, this rule is adopted with
>>> +       a project-wide deviation on if, ?:, switch(sizeof(...)), and
>>> +       switch(offsetof(...)) statements.
>>> +
>>> +       while(0) and while(1) and alike are allowed.
>>> +
>>>    * - `Rule 16.7 
>>> <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_16_07.c>`_
>>>      - Required
>>>      - A switch-expression shall not have essentially Boolean type
>>> -- 
>>> 2.25.1
>>> 
>> 




 


Rackspace

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