[XEN PATCH 0/5] Fix violations of MISRA C:2012 Rule 8.3 on parameter names

Federico Serafini posted 5 patches 10 months, 1 week ago
Failed in applying to current master (apply log)
xen/arch/x86/cpu/mcheck/mce.h           |  2 +-
xen/arch/x86/cpu/mcheck/x86_mca.h       |  2 +-
xen/arch/x86/hvm/nestedhvm.c            | 10 ++---
xen/arch/x86/hvm/rtc.c                  |  2 +-
xen/arch/x86/hvm/svm/nestedhvm.h        |  2 +-
xen/arch/x86/hvm/vioapic.c              |  2 +-
xen/arch/x86/hvm/vlapic.c               | 56 ++++++++++++-------------
xen/arch/x86/include/asm/genapic.h      |  2 +-
xen/arch/x86/include/asm/guest_pt.h     |  2 +-
xen/arch/x86/include/asm/hap.h          |  2 +-
xen/arch/x86/include/asm/hvm/hvm.h      |  2 +-
xen/arch/x86/include/asm/hvm/io.h       |  2 +-
xen/arch/x86/include/asm/hvm/monitor.h  |  2 +-
xen/arch/x86/include/asm/hvm/svm/vmcb.h |  2 +-
xen/arch/x86/include/asm/hvm/vmx/vmcs.h |  4 +-
xen/arch/x86/include/asm/hvm/vmx/vvmx.h |  8 ++--
xen/arch/x86/include/asm/io_apic.h      |  2 +-
xen/arch/x86/include/asm/irq.h          |  6 +--
xen/arch/x86/include/asm/mem_access.h   |  2 +-
xen/arch/x86/include/asm/mpspec.h       |  2 +-
xen/arch/x86/include/asm/msi.h          |  4 +-
xen/arch/x86/include/asm/p2m.h          |  8 ++--
xen/arch/x86/include/asm/paging.h       |  2 +-
xen/arch/x86/include/asm/psr.h          |  2 +-
xen/arch/x86/include/asm/setup.h        |  2 +-
xen/arch/x86/include/asm/uaccess.h      |  6 +--
xen/arch/x86/include/asm/xstate.h       |  2 +-
xen/arch/x86/x86_emulate/blk.c          | 38 ++++++++---------
xen/arch/x86/x86_emulate/util-xen.c     | 46 ++++++++++----------
xen/arch/x86/x86_emulate/util.c         | 54 ++++++++++++------------
xen/include/xen/lib/x86/cpu-policy.h    | 29 ++++++-------
31 files changed, 154 insertions(+), 153 deletions(-)
[XEN PATCH 0/5] Fix violations of MISRA C:2012 Rule 8.3 on parameter names
Posted by Federico Serafini 10 months, 1 week ago
To comply with Rule 8.3 ("All declarations of an object or function
shall use the same names and type qualifiers") change the parameter
names in order to have function declarations consistent with the
corresponding definitions.

Federico Serafini (5):
  x86: swap parameter names of hvm_copy_context_and_params() declaration
  x86: change parameter names of nestedhvm_vcpu_iomap_get() definition
  x86/vlapic: change parameter names in function definitions
  x86/x86_emulate: change parameter name from 's' to 'state'
  x86: make parameter names of function declarations consistent

 xen/arch/x86/cpu/mcheck/mce.h           |  2 +-
 xen/arch/x86/cpu/mcheck/x86_mca.h       |  2 +-
 xen/arch/x86/hvm/nestedhvm.c            | 10 ++---
 xen/arch/x86/hvm/rtc.c                  |  2 +-
 xen/arch/x86/hvm/svm/nestedhvm.h        |  2 +-
 xen/arch/x86/hvm/vioapic.c              |  2 +-
 xen/arch/x86/hvm/vlapic.c               | 56 ++++++++++++-------------
 xen/arch/x86/include/asm/genapic.h      |  2 +-
 xen/arch/x86/include/asm/guest_pt.h     |  2 +-
 xen/arch/x86/include/asm/hap.h          |  2 +-
 xen/arch/x86/include/asm/hvm/hvm.h      |  2 +-
 xen/arch/x86/include/asm/hvm/io.h       |  2 +-
 xen/arch/x86/include/asm/hvm/monitor.h  |  2 +-
 xen/arch/x86/include/asm/hvm/svm/vmcb.h |  2 +-
 xen/arch/x86/include/asm/hvm/vmx/vmcs.h |  4 +-
 xen/arch/x86/include/asm/hvm/vmx/vvmx.h |  8 ++--
 xen/arch/x86/include/asm/io_apic.h      |  2 +-
 xen/arch/x86/include/asm/irq.h          |  6 +--
 xen/arch/x86/include/asm/mem_access.h   |  2 +-
 xen/arch/x86/include/asm/mpspec.h       |  2 +-
 xen/arch/x86/include/asm/msi.h          |  4 +-
 xen/arch/x86/include/asm/p2m.h          |  8 ++--
 xen/arch/x86/include/asm/paging.h       |  2 +-
 xen/arch/x86/include/asm/psr.h          |  2 +-
 xen/arch/x86/include/asm/setup.h        |  2 +-
 xen/arch/x86/include/asm/uaccess.h      |  6 +--
 xen/arch/x86/include/asm/xstate.h       |  2 +-
 xen/arch/x86/x86_emulate/blk.c          | 38 ++++++++---------
 xen/arch/x86/x86_emulate/util-xen.c     | 46 ++++++++++----------
 xen/arch/x86/x86_emulate/util.c         | 54 ++++++++++++------------
 xen/include/xen/lib/x86/cpu-policy.h    | 29 ++++++-------
 31 files changed, 154 insertions(+), 153 deletions(-)

-- 
2.34.1
Re: [XEN PATCH 0/5] Fix violations of MISRA C:2012 Rule 8.3 on parameter names
Posted by Andrew Cooper 10 months, 1 week ago
On 29/06/2023 4:55 pm, Federico Serafini wrote:
> Federico Serafini (5):
>   x86: swap parameter names of hvm_copy_context_and_params() declaration
>   x86: change parameter names of nestedhvm_vcpu_iomap_get() definition
>   x86/vlapic: change parameter names in function definitions

I've acked/committed the first 3 patches, with the various tweaks that
Stefano identified.

nestedhvm_vcpu_iomap_get() is utter nonsense (it would absolutely not
have passed review if I'd seen it before it went in), but untangling
nested virt is multiple cans of worms, so I've put the name changes in
as-are to avoid blocking the MISRA effort.

The final two patches need a bit more consideration time.

~Andrew