Message ID | c5aa988e00f94cf793b7ecae49a4eb94db785dee.1725958056.git.nicola.vetrini@bugseng.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | [XEN] x86/cpufreq: address MISRA Rule 7.3 violation | expand |
On 10.09.2024 10:48, Nicola Vetrini wrote: > Rule 7.3 states: > "The lowercase character l shall not be used in a literal suffix", > but the INTEL_MSR_RANGE macro uses the "ull" suffix. > The "u" is transformed in uppercase for consistency. > > No functional change. > > Signed-off-by: Nicola Vetrini <nicola.vetrini@bugseng.com> Acked-by: Jan Beulich <jbeulich@suse.com> I'm heavily tempted though to ... > --- a/xen/arch/x86/acpi/cpufreq/acpi.c > +++ b/xen/arch/x86/acpi/cpufreq/acpi.c > @@ -25,7 +25,7 @@ enum { > SYSTEM_IO_CAPABLE, > }; > > -#define INTEL_MSR_RANGE (0xffffull) > +#define INTEL_MSR_RANGE (0xffffULL) ... drop the pointless parentheses while committing. Jan
On 10/09/2024 10:12 am, Jan Beulich wrote: > On 10.09.2024 10:48, Nicola Vetrini wrote: >> Rule 7.3 states: >> "The lowercase character l shall not be used in a literal suffix", >> but the INTEL_MSR_RANGE macro uses the "ull" suffix. >> The "u" is transformed in uppercase for consistency. >> >> No functional change. >> >> Signed-off-by: Nicola Vetrini <nicola.vetrini@bugseng.com> > Acked-by: Jan Beulich <jbeulich@suse.com> > > I'm heavily tempted though to ... > >> --- a/xen/arch/x86/acpi/cpufreq/acpi.c >> +++ b/xen/arch/x86/acpi/cpufreq/acpi.c >> @@ -25,7 +25,7 @@ enum { >> SYSTEM_IO_CAPABLE, >> }; >> >> -#define INTEL_MSR_RANGE (0xffffull) >> +#define INTEL_MSR_RANGE (0xffffULL) > ... drop the pointless parentheses while committing. I'd be tempted to delete the constant entirely. It's utterly wrong and unsafe everywhere it's used... ~Andrew
diff --git a/xen/arch/x86/acpi/cpufreq/acpi.c b/xen/arch/x86/acpi/cpufreq/acpi.c index c6d7d02faa56..06f6c99d4cc1 100644 --- a/xen/arch/x86/acpi/cpufreq/acpi.c +++ b/xen/arch/x86/acpi/cpufreq/acpi.c @@ -25,7 +25,7 @@ enum { SYSTEM_IO_CAPABLE, }; -#define INTEL_MSR_RANGE (0xffffull) +#define INTEL_MSR_RANGE (0xffffULL) static bool __read_mostly acpi_pstate_strict; boolean_param("acpi_pstate_strict", acpi_pstate_strict);
Rule 7.3 states: "The lowercase character l shall not be used in a literal suffix", but the INTEL_MSR_RANGE macro uses the "ull" suffix. The "u" is transformed in uppercase for consistency. No functional change. Signed-off-by: Nicola Vetrini <nicola.vetrini@bugseng.com> --- xen/arch/x86/acpi/cpufreq/acpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)