Re: [PATCH 1/2] AMD errata checking framework

H. Peter Anvin
2010-06-11T20:14:53Z

On 06/11/2010 06:25 AM, Hans Rosenfeld wrote:
> +
> +/*
> + * Check for the presence of an AMD erratum.
> + * Arguments are defined in processor.h for each known erratum.
> + */
> +bool cpu_has_amd_erratum(const struct cpuinfo_x86 *cpu, bool osvw, ...)
> +{

/home/hpa/kernel/linux-2.6-tip.cpu/arch/x86/kernel/cpu/amd.c: In
function ‘cpu_has_amd_erratum’:
/home/hpa/kernel/linux-2.6-tip.cpu/arch/x86/kernel/cpu/amd.c:635: error:
expected expression before ‘do’
/home/hpa/kernel/linux-2.6-tip.cpu/arch/x86/kernel/cpu/amd.c:636: error:
expected expression before ‘do’
/home/hpa/kernel/linux-2.6-tip.cpu/arch/x86/kernel/cpu/amd.c:632:
warning: unused variable ‘t’

Also, the use of divide and modulo when shifts and masks work are
generally frowned upon in Linux as a matter of style.

-hpa