[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 0/5] xen: address violations of MISRA C:2012 Rule 11.8



From: Maria Celeste Cesario <maria.celeste.cesario@xxxxxxxxxxx>

The xen sources contains violations of MISRA C:2012 Rule 11.8 whose headline
states:
"A conversion shall not remove any const, volatile or Atomic qualification
from the type pointed to by a pointer".

This patch amends or removes casts that unnecessarily drop const qualifiers.
Example:

  static inline int atomic_read(const atomic_t *v)
  {
    return *(volatile int *)&v->counter;    /* Non-compliant */
  }

In this example, the const qualifier is unnnecessarily removed from
the original object, therefore making it non-compliant.

Maria Celeste Cesario (5):
  x86/platform_hypercall: address violations of MISRA C:2012 Rule 11.8
  x86/boot/reloc: address violations of MISRA C:2012 Rule 11.8
  AMD/IOMMU: address violations of MISRA C:2012 Rule 11.8
  x86/atomic: address violations of MISRA C:2012 Rule 11.8
  xen/arm: address violations of MISRA C:2012 Rule 11.8

 xen/arch/arm/domain_build.c              | 2 +-
 xen/arch/arm/include/asm/atomic.h        | 2 +-
 xen/arch/arm/include/asm/regs.h          | 2 +-
 xen/arch/x86/boot/reloc.c                | 2 +-
 xen/arch/x86/include/asm/atomic.h        | 8 ++++----
 xen/arch/x86/platform_hypercall.c        | 2 +-
 xen/drivers/passthrough/amd/iommu_acpi.c | 2 +-
 7 files changed, 10 insertions(+), 10 deletions(-)

-- 
2.40.0




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.