[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: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
  • Date: Wed, 27 Sep 2023 08:10:19 +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=KWCdekwgOyw2pnoC9bNUzUiBI411Sa8DBtQeBo/38i8=; b=J5tI6/lsC4YEI4wEkRChVM4lKjDsmnFwgrNJSkIjmMjVpMadN87xuJWnlhsUzcyk1GY0bMxxo9wzLTlfWvKAIohlGgGtyu1SOt7pgSpLivvZgu94fuUa8bIF5pnDB7z84ouiPn7OxjaU6fQnfabdU+yC3hcljperiO5dpI72gEspu37PmkNwTQ2u17nZGifZNGIUfENgY2hNWLyzeCQvT8VrOS1QupGVv6Vogsxh4wre8zKu75OOr8drT0LLyRx7Jh9PAcO6Zhwc/MqaxvNXK9+k36nvPV1Yz1rn4l5XsinV7MuLRp1NZO6doA7uBcMVAFCxhELk5TFK8qv4AxIOaw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iljvADfzsmQGBDnEA55HHJwUZEAoN4Fa2E8Rvhc/CqDLtinurhCVSPlaV6pAiFcAx+fz/KvNZKmG+TjQBUQArNkcA+f8pCWhIG3EBFiNpt5fvL6V03ZiaWkhJVnTnoJD7xPh1HpIHTpykG0Uqgo6O3ZxMZYif2CO1NyGvJditGQPJJO4YEDdYBdX6FBIlHB/E9Ob15WmovWG4py5oGzrzOBorQo54OT0QzLBNdYAmTX1O7lbhg1QWFaB6krPVaJrZgA9dZkO/Y788mKuwuoP/JDQHHSJ/4OfQwFqcb0Rl5+Rt9RLQhKCYpjCS6R9CLTa2rcRwFnkqiNpbgr8J2VqNg==
  • 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 Grall <julien@xxxxxxx>, "george.dunlap@xxxxxxxxxx" <george.dunlap@xxxxxxxxxx>, "roberto.bagnara@xxxxxxxxxxx" <roberto.bagnara@xxxxxxxxxxx>, "nicola.vetrini@xxxxxxxxxxx" <nicola.vetrini@xxxxxxxxxxx>, Stefano Stabellini <stefano.stabellini@xxxxxxx>
  • Delivery-date: Wed, 27 Sep 2023 08:10:53 +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: AQHZ4pLyktuvAHNnhUGsSPCCOW2ABbAubugA
  • Thread-topic: [PATCH v3] docs/misra: add 14.3

Hi Stefano,

> On 8 Sep 2023, at 22:27, Stefano Stabellini <sstabellini@xxxxxxxxxx> 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>

I am still not quite sure if we should accept a rule if we are deviating
on so much cases but as we can revisit anyway:

Acked-by: Bertrand Marquis <bertrand.marquis@xxxxxxx>

Cheers
Bertrand

> ---
> 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®.