x86: adjust comparison for earlier signedness change
PATCH 1/1 x86: adjust comparison for earlier signedness change
Interestingly only Clang warns about the now bogus less-than-zero comparison. Convert it to something that's more explicitly doing what the comment says.
Fixes 4086857cc159 ("x86: implement cpuid() in terms of cpuid_count()")
Signed-off-by Jan Beulich <[email protected]>
xen/arch/x86/cpu/intel_cacheinfo.c +2 -1
@@ -187,7 +187,8 @@ void init_intel_cacheinfo(struct cpuinfo/* If bit 31 is set, this is an unknown format */ for ( j =0 ; j <3 ; j++ ) { -if ( regs[j] <0 ) regs[j] =0 ; +if ( regs[j] >>31 ) + regs[j] =0 ; }/* Byte 0 is level count, not a descriptor */
Quoted 6 lines · Jan Beulich
Interestingly only Clang warns about the now bogus less-than-zero comparison. Convert it to something that's more explicitly doing what the comment says.
Fixes 4086857cc159 ("x86: implement cpuid() in terms of cpuid_count()")Signed-off-by Jan Beulich <[email protected]>
Reviewed-by Juergen Gross <[email protected]>
Juergen