Re: Rule 10.1 violations in perfc_incra and PERFCOUNTER_ARRAY

2023-10-11 Thread Nicola Vetrini
> > 3. use an unnamed enum, effectively considering the enumerated values as > > plain > > integers. > >This does not violate the Rule. > > What do you mean by unname enum? e.g. enum { #include NUM_PERFCOUNTERS }; instead of enum perfcounter { #include NUM_PERFCOUNTERS

Re: Rule 10.1 violations in perfc_incra and PERFCOUNTER_ARRAY

2023-10-10 Thread Stefano Stabellini
On Tue, 10 Oct 2023, Nicola Vetrini wrote: > On 10/10/2023 03:56, Stefano Stabellini wrote: > > On Fri, 6 Oct 2023, Nicola Vetrini wrote: > > > Given the following macros in and > > > > > > #define perfc_incra(x,y)\ > > > ( (y) <= PERFC_LAST_ ##

Re: Rule 10.1 violations in perfc_incra and PERFCOUNTER_ARRAY

2023-10-10 Thread Nicola Vetrini
On 10/10/2023 03:56, Stefano Stabellini wrote: On Fri, 6 Oct 2023, Nicola Vetrini wrote: Given the following macros in and #define perfc_incra(x,y) \ ( (y) <= PERFC_LAST_ ## x - PERFC_ ## x ? \ ++this_cpu(

Re: Rule 10.1 violations in perfc_incra and PERFCOUNTER_ARRAY

2023-10-09 Thread Stefano Stabellini
On Fri, 6 Oct 2023, Nicola Vetrini wrote: > Given the following macros in and > > #define perfc_incra(x,y)\ > ( (y) <= PERFC_LAST_ ## x - PERFC_ ## x ? \ >++this_cpu(perfcounters)[PERFC_ ## x + (y)] : 0 ) > > a

Rule 10.1 violations in perfc_incra and PERFCOUNTER_ARRAY

2023-10-06 Thread Nicola Vetrini
Given the following macros in and #define perfc_incra(x,y) \ ( (y) <= PERFC_LAST_ ## x - PERFC_ ## x ? \ ++this_cpu(perfcounters)[PERFC_ ## x + (y)] : 0 ) and the following violation xen/arch/arm/traps.c:1