[PATCH] lib: fwts_virt: fix non-Intel build errors
IvanHu
ivan.hu at canonical.com
Fri Dec 14 00:06:08 UTC 2012
On 12/07/2012 06:09 PM, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
>
> This fixes a -Wextra build error for non-Intel builds. This function
> is only used in x86 tests so we can just make this function return dummy
> values anyway since it is never called on non-x86 systems.
>
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
> src/lib/src/fwts_virt.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/src/lib/src/fwts_virt.c b/src/lib/src/fwts_virt.c
> index ad5bec0..3c3831b 100644
> --- a/src/lib/src/fwts_virt.c
> +++ b/src/lib/src/fwts_virt.c
> @@ -58,6 +58,14 @@ void fwts_exec_cpuid(const int cpu, const uint32_t cmd, cpu_registers* regs)
> "=c"(regs->ecx),"=d"(regs->edx)
> : "a"(cmd)
> );
> +#else
> + /* Non x86 we just fake it */
> + FWTS_UNUSED(cmd);
> +
> + regs->eax = 0;
> + regs->ebx = 0;
> + regs->ecx = 0;
> + regs->edx = 0;
> #endif
>
> if (cpu != CURRENT_CPU)
>
Acked-by: Ivan Hu <ivan.hu at canonical.com>
More information about the fwts-devel
mailing list