Skip to content

Commit

Permalink
x86/efi: address violations of MISRA C:2012 Rule 7.2
Browse files Browse the repository at this point in the history
The xen sources contains violations of MISRA C:2012 Rule 7.2 whose
headline states:
"A 'u' or 'U' suffix shall be applied to all integer constants
that are represented in an unsigned type".

Addi the 'U' suffix to integers literals with unsigned type.

Signed-off-by: Simone Ballarin <[email protected]>
Signed-off-by: Gianluca Luparini <[email protected]>
Acked-by: Jan Beulich <[email protected]>
  • Loading branch information
Simone Ballarin authored and jbeulich committed Sep 13, 2023
1 parent e29cb1f commit 38e1da3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions xen/arch/x86/efi/efi-boot.h
Original file line number Diff line number Diff line change
Expand Up @@ -740,16 +740,16 @@ static void __init efi_arch_handle_module(const struct file *file,

static void __init efi_arch_cpu(void)
{
uint32_t eax = cpuid_eax(0x80000000);
uint32_t eax = cpuid_eax(0x80000000U);
uint32_t *caps = boot_cpu_data.x86_capability;

boot_tsc_stamp = rdtsc();

caps[FEATURESET_1c] = cpuid_ecx(1);

if ( (eax >> 16) == 0x8000 && eax > 0x80000000 )
if ( (eax >> 16) == 0x8000 && eax > 0x80000000U )
{
caps[FEATURESET_e1d] = cpuid_edx(0x80000001);
caps[FEATURESET_e1d] = cpuid_edx(0x80000001U);

/*
* This check purposefully doesn't use cpu_has_nx because
Expand Down

0 comments on commit 38e1da3

Please sign in to comment.