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

Re: [BUGGY] Re: [XEN PATCH] x86: Address violations of MISRA C:2012 and drop bool_t



On 07/08/23 14:31, Andrew Cooper wrote:
On 04/08/2023 3:11 pm, Federico Serafini wrote:
Give a name to unnamed parameters to address violations of
MISRA C:2012 Rule 8.2 ("Function types shall be in prototype form with
named parameters").
Keep consistency between object and function declarations thus
addressing violations of MISRA C:2012 Rule 8.3 ("All declarations of an
object or function shall use the same names and type qualifiers").
Replace the occurrences of bool_t with bool.

No functional change.

Signed-off-by: Federico Serafini <federico.serafini@xxxxxxxxxxx>
---
  xen/arch/x86/cpu/common.c            |  6 +++---
  xen/arch/x86/include/asm/processor.h | 16 ++++++++--------
  2 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/xen/arch/x86/cpu/common.c b/xen/arch/x86/cpu/common.c
index cfcdaace12..5f29148416 100644
--- a/xen/arch/x86/cpu/common.c
+++ b/xen/arch/x86/cpu/common.c
@@ -26,11 +26,11 @@
bool __read_mostly opt_dom0_cpuid_faulting = true; -bool_t opt_arat = 1;
+bool opt_arat = 1;
  boolean_param("arat", opt_arat);

I see this has been committed, but you do realise you've created a new
violation of 8.3 by failing to change the declaration of opt_arat to be
bool ?

Please everyone be more careful.  There is an enormous amount of MISRA
churn, and it's hard enough to deal with this when the patches are correct.

~Andrew

I'm sorry, I noticed too late.
I will submit a patch to address the new violations.

--
Federico Serafini, M.Sc.

Software Engineer, BUGSENG (http://bugseng.com)



 


Rackspace

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