[PATCH v2] misra: increase identifiers length to 63

Stefano Stabellini posted 1 patch 2 weeks, 6 days ago
Patches applied successfully (tree, apply log)
git fetch https://gitlab.com/xen-project/patchew/xen tags/patchew/alpine.DEB.2.22.394.2411181552510.1160299@ubuntu-linux-20-04-desktop
docs/misra/rules.rst | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
[PATCH v2] misra: increase identifiers length to 63
Posted by Stefano Stabellini 2 weeks, 6 days ago
Currently the identifiers characters limit is arbitrarily set to 40. It
causes a few violations as we have some identifiers longer than 40.

Increase the limit to another rather arbitrary limit of 63. Thanks to
this change, we remove a few violations, getting us one step closer to
marking Rules 5.2 and 5.4 as clean.

The ECLAIR configuration is already using 63, so this change matches
the rules.rst documentation with the ECLAIR behavior.

Signed-off-by: Stefano Stabellini <stefano.stabellini@amd.com>
---
Changes in v2:
- use 63 instead of 64
- drop unneeded change to ECLAIR config

 docs/misra/rules.rst | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/docs/misra/rules.rst b/docs/misra/rules.rst
index 4a144da8d6..3ed5801bff 100644
--- a/docs/misra/rules.rst
+++ b/docs/misra/rules.rst
@@ -154,7 +154,7 @@ maintainers if you want to suggest a change.
    * - `Rule 5.1 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_05_01_2.c>`_
      - Required
      - External identifiers shall be distinct
-     - The Xen characters limit for identifiers is 40. Public headers
+     - The Xen characters limit for identifiers is 63. Public headers
        (xen/include/public/) are allowed to retain longer identifiers
        for backward compatibility.
 
@@ -162,7 +162,7 @@ maintainers if you want to suggest a change.
      - Required
      - Identifiers declared in the same scope and name space shall be
        distinct
-     - The Xen characters limit for identifiers is 40. Public headers
+     - The Xen characters limit for identifiers is 63. Public headers
        (xen/include/public/) are allowed to retain longer identifiers
        for backward compatibility.
 
@@ -177,7 +177,7 @@ maintainers if you want to suggest a change.
    * - `Rule 5.4 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_05_04.c>`_
      - Required
      - Macro identifiers shall be distinct
-     - The Xen characters limit for macro identifiers is 40. Public
+     - The Xen characters limit for macro identifiers is 63. Public
        headers (xen/include/public/) are allowed to retain longer
        identifiers for backward compatibility.
 
-- 
2.25.1
Re: [PATCH v2] misra: increase identifiers length to 63
Posted by Jan Beulich 2 weeks, 5 days ago
On 19.11.2024 00:54, Stefano Stabellini wrote:
> Currently the identifiers characters limit is arbitrarily set to 40. It
> causes a few violations as we have some identifiers longer than 40.
> 
> Increase the limit to another rather arbitrary limit of 63. Thanks to
> this change, we remove a few violations, getting us one step closer to
> marking Rules 5.2 and 5.4 as clean.
> 
> The ECLAIR configuration is already using 63, so this change matches
> the rules.rst documentation with the ECLAIR behavior.
> 
> Signed-off-by: Stefano Stabellini <stefano.stabellini@amd.com>

Acked-by: Jan Beulich <jbeulich@suse.com>

I wonder though if the subject wouldn't better express that right now
Eclair config and doc are out of sync. E.g. "align doc with Eclair
config for ..."

Jan
Re: [PATCH v2] misra: increase identifiers length to 63
Posted by Nicola Vetrini 2 weeks, 5 days ago
On 2024-11-19 00:54, Stefano Stabellini wrote:
> Currently the identifiers characters limit is arbitrarily set to 40. It
> causes a few violations as we have some identifiers longer than 40.
> 
> Increase the limit to another rather arbitrary limit of 63. Thanks to
> this change, we remove a few violations, getting us one step closer to
> marking Rules 5.2 and 5.4 as clean.
> 
> The ECLAIR configuration is already using 63, so this change matches
> the rules.rst documentation with the ECLAIR behavior.
> 
> Signed-off-by: Stefano Stabellini <stefano.stabellini@amd.com>
Reviewed-by: Nicola Vetrini <nicola.vetrini@bugseng.com>
> ---
> Changes in v2:
> - use 63 instead of 64
> - drop unneeded change to ECLAIR config
> 
>  docs/misra/rules.rst | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/docs/misra/rules.rst b/docs/misra/rules.rst
> index 4a144da8d6..3ed5801bff 100644
> --- a/docs/misra/rules.rst
> +++ b/docs/misra/rules.rst
> @@ -154,7 +154,7 @@ maintainers if you want to suggest a change.
>     * - `Rule 5.1 
> <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_05_01_2.c>`_
>       - Required
>       - External identifiers shall be distinct
> -     - The Xen characters limit for identifiers is 40. Public headers
> +     - The Xen characters limit for identifiers is 63. Public headers
>         (xen/include/public/) are allowed to retain longer identifiers
>         for backward compatibility.
> 
> @@ -162,7 +162,7 @@ maintainers if you want to suggest a change.
>       - Required
>       - Identifiers declared in the same scope and name space shall be
>         distinct
> -     - The Xen characters limit for identifiers is 40. Public headers
> +     - The Xen characters limit for identifiers is 63. Public headers
>         (xen/include/public/) are allowed to retain longer identifiers
>         for backward compatibility.
> 
> @@ -177,7 +177,7 @@ maintainers if you want to suggest a change.
>     * - `Rule 5.4 
> <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_05_04.c>`_
>       - Required
>       - Macro identifiers shall be distinct
> -     - The Xen characters limit for macro identifiers is 40. Public
> +     - The Xen characters limit for macro identifiers is 63. Public
>         headers (xen/include/public/) are allowed to retain longer
>         identifiers for backward compatibility.

-- 
Nicola Vetrini, BSc
Software Engineer, BUGSENG srl (https://bugseng.com)