Re: [PATCH 1/1] cpu: Fix one compile error for PPC.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jul 29, 2013 at 15:41:19 +0800, Li Zhang wrote:
> From: Li Zhang <zhlcindy@xxxxxxxxxxxxxxxxxx>
> 
> CPU data structure is refined, which causes one compile error for PPC.
> 
> Signed-off-by: Li Zhang <zhlcindy@xxxxxxxxxxxxxxxxxx>
> ---
>  src/cpu/cpu_powerpc.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/src/cpu/cpu_powerpc.c b/src/cpu/cpu_powerpc.c
> index 62437d3..55a4153 100644
> --- a/src/cpu/cpu_powerpc.c
> +++ b/src/cpu/cpu_powerpc.c
> @@ -354,15 +354,15 @@ ppcDataFree(virCPUDataPtr data)
>  static virCPUDataPtr
>  ppcNodeData(void)
>  {
> -    virCPUDataPtr data;
> +    virCPUDataPtr cpuData;
>  
> -    if (VIR_ALLOC(data) < 0)
> +    if (VIR_ALLOC(cpuData) < 0)
>          return NULL;
>  
>      asm("mfpvr %0"
> -        : "=r" (data->ppc.pvr));
> +        : "=r" (cpuData->data.ppc.pvr));
>  
> -    return data;
> +    return cpuData;
>  }
>  #endif

I'm fine with this change but what compile error does this fix? The only
error I could think of is shadowing a global "data" symbol but I doubt
that's the case as the same structure is called "data" in several other
functions in cpu_powerpc.c

Jirka

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]