Skip to content

Commit

Permalink
x86, xen: Initialize cx to suppress warning
Browse files Browse the repository at this point in the history
Initialize cx before calling xen_cpuid(), in order to suppress the
"may be used uninitialized in this function" warning.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
  • Loading branch information
H. Peter Anvin committed Aug 26, 2009
1 parent d560bc6 commit 7adb4df
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions arch/x86/xen/enlighten.c
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ static __init void xen_init_cpuid_mask(void)
(1 << X86_FEATURE_ACPI)); /* disable ACPI */

ax = 1;
cx = 0;
xen_cpuid(&ax, &bx, &cx, &dx);

/* cpuid claims we support xsave; try enabling it to see what happens */
Expand Down

0 comments on commit 7adb4df

Please sign in to comment.