mbox series

[XEN,0/5] address violations of MISRA C rules

Message ID cover.1717236930.git.nicola.vetrini@bugseng.com (mailing list archive)
Headers show
Series address violations of MISRA C rules | expand

Message

Nicola Vetrini June 1, 2024, 10:16 a.m. UTC
Patches 1 to 4 address violations of MISRA C Rule 20.12 by deviating certain
uses of some macros, while the last patch addresses some regressions introduced
by the latest bitops series

Nicola Vetrini (5):
  xen/domain: deviate violation of MISRA C Rule 20.12
  x86/domain: deviate violation of MISRA C Rule 20.12
  x86: deviate violation of MISRA C Rule 20.12
  automation/eclair_analysis: address remaining violations of MISRA C
    Rule 20.12
  xen: fix MISRA regressions on rule 20.9 and 20.12

 automation/eclair_analysis/ECLAIR/deviations.ecl | 8 +++++++-
 docs/misra/safe.json                             | 8 ++++++++
 xen/arch/x86/domain.c                            | 1 +
 xen/arch/x86/domctl.c                            | 1 +
 xen/arch/x86/include/asm/shared.h                | 1 +
 xen/common/domain.c                              | 1 +
 xen/include/xen/self-tests.h                     | 2 +-
 7 files changed, 20 insertions(+), 2 deletions(-)

Comments

Andrew Cooper June 1, 2024, 2:37 p.m. UTC | #1
On 01/06/2024 11:16 am, Nicola Vetrini wrote:
> Patches 1 to 4 address violations of MISRA C Rule 20.12 by deviating certain
> uses of some macros, while the last patch addresses some regressions introduced
> by the latest bitops series
>
> Nicola Vetrini (5):
>   xen/domain: deviate violation of MISRA C Rule 20.12
>   x86/domain: deviate violation of MISRA C Rule 20.12
>   x86: deviate violation of MISRA C Rule 20.12
>   automation/eclair_analysis: address remaining violations of MISRA C
>     Rule 20.12
>   xen: fix MISRA regressions on rule 20.9 and 20.12

I've committed patch 5 because it fixes a blocking failure in Gitlab CI
from content already accepted for Xen 4.19.

The others look fine to me, but you'll need to negotiate with Oleksii
(CC'd) to get them in, at this point in the release.

Given that this series makes x86 clean to Rule 20.12, shouldn't there be
a final patch making it blocking, to bring x86 in line with ARM?

~Andrew
Nicola Vetrini June 1, 2024, 5:19 p.m. UTC | #2
On 2024-06-01 16:37, Andrew Cooper wrote:
> On 01/06/2024 11:16 am, Nicola Vetrini wrote:
>> Patches 1 to 4 address violations of MISRA C Rule 20.12 by deviating 
>> certain
>> uses of some macros, while the last patch addresses some regressions 
>> introduced
>> by the latest bitops series
>> 
>> Nicola Vetrini (5):
>>   xen/domain: deviate violation of MISRA C Rule 20.12
>>   x86/domain: deviate violation of MISRA C Rule 20.12
>>   x86: deviate violation of MISRA C Rule 20.12
>>   automation/eclair_analysis: address remaining violations of MISRA C
>>     Rule 20.12
>>   xen: fix MISRA regressions on rule 20.9 and 20.12
> 
> I've committed patch 5 because it fixes a blocking failure in Gitlab CI
> from content already accepted for Xen 4.19.
> 

Thanks

> The others look fine to me, but you'll need to negotiate with Oleksii
> (CC'd) to get them in, at this point in the release.
> 

Well, having one more clean rule does look better for Xen, and the 
changes to the codebase are harmless enough, but ultimately given the 
closeness with the deadline I didn't really see a need to.

> Given that this series makes x86 clean to Rule 20.12, shouldn't there 
> be
> a final patch making it blocking, to bring x86 in line with ARM?
> 

Good point, I should have done that in patch 4. I'll do a follow-up 
patch.

> ~Andrew
Andrew Cooper June 1, 2024, 5:22 p.m. UTC | #3
On 01/06/2024 6:19 pm, Nicola Vetrini wrote:
> On 2024-06-01 16:37, Andrew Cooper wrote:
>> On 01/06/2024 11:16 am, Nicola Vetrini wrote:
>>> Patches 1 to 4 address violations of MISRA C Rule 20.12 by deviating
>>> certain
>>> uses of some macros, while the last patch addresses some regressions
>>> introduced
>>> by the latest bitops series
>>>
>>> Nicola Vetrini (5):
>>>   xen/domain: deviate violation of MISRA C Rule 20.12
>>>   x86/domain: deviate violation of MISRA C Rule 20.12
>>>   x86: deviate violation of MISRA C Rule 20.12
>>>   automation/eclair_analysis: address remaining violations of MISRA C
>>>     Rule 20.12
>>>   xen: fix MISRA regressions on rule 20.9 and 20.12
>>
>> I've committed patch 5 because it fixes a blocking failure in Gitlab CI
>> from content already accepted for Xen 4.19.
>>
>
> Thanks
>
>> The others look fine to me, but you'll need to negotiate with Oleksii
>> (CC'd) to get them in, at this point in the release.
>>
>
> Well, having one more clean rule does look better for Xen, and the
> changes to the codebase are harmless enough, but ultimately given the
> closeness with the deadline I didn't really see a need to.
>
>> Given that this series makes x86 clean to Rule 20.12, shouldn't there be
>> a final patch making it blocking, to bring x86 in line with ARM?
>>
>
> Good point, I should have done that in patch 4. I'll do a follow-up
> patch.

FWIW, given how simple this series is, I'm +1 for including it in 4.19,
even at this point.  It is definitely nicer to have the disposition of
Rule 20.12 the same between ARM and x86.

Still - it's very much Oleksii's call.

~Andrew