Message ID | 7996a8bb62e62076d48bdf289e37352bb5e43b52.1688032865.git.nicola.vetrini@bugseng.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | fix violations of MISRA C:2012 Rule 3.1 | expand |
> On 29 Jun 2023, at 11:06, Nicola Vetrini <nicola.vetrini@bugseng.com> wrote: > > In the files `xen/arch/arm/include/asm/arm(32|64)/flushtlb.h' there are a > few occurrences of nested '//' character sequences inside C-style comment > blocks, which violate Rule 3.1. The patch aims to resolve those by changing > the inner comments to arm asm comments, delimited by ';' instead. > > Signed-off-by: Nicola Vetrini <nicola.vetrini@bugseng.com> Can I suggest another commit title: “xen/arm: tlbflush: fix violations of MISRA C:2012 Rule 3.1" Sometimes when I am not sure on how to deal with prefixes, I check to the git history of the line I am changing, for these lines there was a commit from Julien using these prefixes. I’m using vs code with GitLens extension, that ease a lot this kind of checks. Apart from that, the changes looks good to me: Reviewed-by: Luca Fancellu <luca.fancellu@arm.com>
On 29/06/23 16:41, Luca Fancellu wrote: > > >> On 29 Jun 2023, at 11:06, Nicola Vetrini <nicola.vetrini@bugseng.com> wrote: >> >> In the files `xen/arch/arm/include/asm/arm(32|64)/flushtlb.h' there are a >> few occurrences of nested '//' character sequences inside C-style comment >> blocks, which violate Rule 3.1. The patch aims to resolve those by changing >> the inner comments to arm asm comments, delimited by ';' instead. >> >> Signed-off-by: Nicola Vetrini <nicola.vetrini@bugseng.com> > > Can I suggest another commit title: > “xen/arm: tlbflush: fix violations of MISRA C:2012 Rule 3.1" > > Sometimes when I am not sure on how to deal with prefixes, I check to the git > history of the line I am changing, for these lines there was a commit from > Julien using these prefixes. I’m using vs code with GitLens extension, that > ease a lot this kind of checks. > > Apart from that, the changes looks good to me: > > Reviewed-by: Luca Fancellu <luca.fancellu@arm.com> > Thanks for the suggestion, I'll use it from now on
On Thu, 29 Jun 2023, Luca Fancellu wrote: > > On 29 Jun 2023, at 11:06, Nicola Vetrini <nicola.vetrini@bugseng.com> wrote: > > > > In the files `xen/arch/arm/include/asm/arm(32|64)/flushtlb.h' there are a > > few occurrences of nested '//' character sequences inside C-style comment > > blocks, which violate Rule 3.1. The patch aims to resolve those by changing > > the inner comments to arm asm comments, delimited by ';' instead. > > > > Signed-off-by: Nicola Vetrini <nicola.vetrini@bugseng.com> > > Can I suggest another commit title: > “xen/arm: tlbflush: fix violations of MISRA C:2012 Rule 3.1" > > Sometimes when I am not sure on how to deal with prefixes, I check to the git > history of the line I am changing, for these lines there was a commit from > Julien using these prefixes. I’m using vs code with GitLens extension, that > ease a lot this kind of checks. > > Apart from that, the changes looks good to me: > > Reviewed-by: Luca Fancellu <luca.fancellu@arm.com> With Luca's suggestion (can be done on commit): Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Hi, On 29/06/2023 20:11, Stefano Stabellini wrote: > On Thu, 29 Jun 2023, Luca Fancellu wrote: >>> On 29 Jun 2023, at 11:06, Nicola Vetrini <nicola.vetrini@bugseng.com> wrote: >>> >>> In the files `xen/arch/arm/include/asm/arm(32|64)/flushtlb.h' there are a >>> few occurrences of nested '//' character sequences inside C-style comment >>> blocks, which violate Rule 3.1. The patch aims to resolve those by changing >>> the inner comments to arm asm comments, delimited by ';' instead. >>> >>> Signed-off-by: Nicola Vetrini <nicola.vetrini@bugseng.com> >> >> Can I suggest another commit title: >> “xen/arm: tlbflush: fix violations of MISRA C:2012 Rule 3.1" >> >> Sometimes when I am not sure on how to deal with prefixes, I check to the git >> history of the line I am changing, for these lines there was a commit from >> Julien using these prefixes. I’m using vs code with GitLens extension, that >> ease a lot this kind of checks. >> >> Apart from that, the changes looks good to me: >> >> Reviewed-by: Luca Fancellu <luca.fancellu@arm.com> > > With Luca's suggestion (can be done on commit): > > Reviewed-by: Stefano Stabellini <sstabellini@kernel.org> I have committed this patch. Patch #2 requires an ack from Rahul/Bertrand. Cheers,
diff --git a/xen/arch/arm/include/asm/arm32/flushtlb.h b/xen/arch/arm/include/asm/arm32/flushtlb.h index 22ee3b317b..61c25a3189 100644 --- a/xen/arch/arm/include/asm/arm32/flushtlb.h +++ b/xen/arch/arm/include/asm/arm32/flushtlb.h @@ -4,10 +4,10 @@ /* * Every invalidation operation use the following patterns: * - * DSB ISHST // Ensure prior page-tables updates have completed - * TLBI... // Invalidate the TLB - * DSB ISH // Ensure the TLB invalidation has completed - * ISB // See explanation below + * DSB ISHST ; Ensure prior page-tables updates have completed + * TLBI... ; Invalidate the TLB + * DSB ISH ; Ensure the TLB invalidation has completed + * ISB ; See explanation below * * For Xen page-tables the ISB will discard any instructions fetched * from the old mappings. diff --git a/xen/arch/arm/include/asm/arm64/flushtlb.h b/xen/arch/arm/include/asm/arm64/flushtlb.h index 56c6fc763b..45642201d1 100644 --- a/xen/arch/arm/include/asm/arm64/flushtlb.h +++ b/xen/arch/arm/include/asm/arm64/flushtlb.h @@ -4,10 +4,10 @@ /* * Every invalidation operation use the following patterns: * - * DSB ISHST // Ensure prior page-tables updates have completed - * TLBI... // Invalidate the TLB - * DSB ISH // Ensure the TLB invalidation has completed - * ISB // See explanation below + * DSB ISHST ; Ensure prior page-tables updates have completed + * TLBI... ; Invalidate the TLB + * DSB ISH ; Ensure the TLB invalidation has completed + * ISB ; See explanation below * * ARM64_WORKAROUND_REPEAT_TLBI: * Modification of the translation table for a virtual address might lead to
In the files `xen/arch/arm/include/asm/arm(32|64)/flushtlb.h' there are a few occurrences of nested '//' character sequences inside C-style comment blocks, which violate Rule 3.1. The patch aims to resolve those by changing the inner comments to arm asm comments, delimited by ';' instead. Signed-off-by: Nicola Vetrini <nicola.vetrini@bugseng.com> --- Changes: - Resending the patch with the right maintainers in CC. Changes in V2: - Split the patch into a series and reworked the fix. - Apply the fix to the arm32 `flushtlb.h' file, for consistency Changes in V3: - Switched to arm asm comment in `arm(32|64)/flushtlb.h' --- xen/arch/arm/include/asm/arm32/flushtlb.h | 8 ++++---- xen/arch/arm/include/asm/arm64/flushtlb.h | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-)