[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH 4/9] include/xen: Use explicitly specified types
Hi, On 20/06/2022 08:02, Michal Orzel wrote: According to MISRA C 2012 Rule 8.1, types shall be explicitly specified. Fix all the findings reported by cppcheck with misra addon by substituting implicit type 'unsigned' to explicit 'unsigned int'. Signed-off-by: Michal Orzel <michal.orzel@xxxxxxx> --- xen/include/xen/perfc.h | 2 +- xen/include/xen/sched.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/xen/include/xen/perfc.h b/xen/include/xen/perfc.h index bb010b0aae..7c5ce537bd 100644 --- a/xen/include/xen/perfc.h +++ b/xen/include/xen/perfc.h @@ -49,7 +49,7 @@ enum perfcounter { #undef PERFSTATUS #undef PERFSTATUS_ARRAY-typedef unsigned perfc_t;+typedef unsigned int perfc_t; #define PRIperfc ""DECLARE_PER_CPU(perfc_t[NUM_PERFCOUNTERS], perfcounters);diff --git a/xen/include/xen/sched.h b/xen/include/xen/sched.h index 463d41ffb6..d957b6e11f 100644 --- a/xen/include/xen/sched.h +++ b/xen/include/xen/sched.h @@ -518,9 +518,9 @@ struct domain/* hvm_print_line() and guest_console_write() logging. */#define DOMAIN_PBUF_SIZE 200 - char *pbuf; - unsigned pbuf_idx; - spinlock_t pbuf_lock; + char *pbuf; + unsigned int pbuf_idx; + spinlock_t pbuf_lock; Looking a "struct domain", we don't often seem to align the name. In fact, this is something I don't particularly like because it adds a lot of churn in a patch. So my preference would be to just change the line "unsigned". Other than that: Acked-by: Julien Grall <jgrall@xxxxxxxxxx> Cheers, -- Julien Grall
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |