Patchwork [v2] pseries: Fix use of global CPU state

login
register
mail settings
Submitter Peter Portante
Date April 23, 2012, 5:27 p.m.
Message ID <1335202076-4978-1-git-send-email-peter.portante@redhat.com>
Download mbox | patch
Permalink /patch/154522/
State New
Headers show

Comments

Peter Portante - April 23, 2012, 5:27 p.m.
Commit ed120055c7f9b26b5707d3ceabbe5a3f06aaf937 (Implement PAPR VPA
functions for pSeries shared processor partitions) introduced the
register_dtl() function and typo "emv" as name of its argument.
This went unnoticed because the code in that function can access the
global variable "env" so that no build failure resulted.

Fix the argument to read "env". Resolves LP#986241.

Signed-off-by: Peter Portante <peter.portante@redhat.com>
---
 hw/spapr_hcall.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Andreas Färber - April 23, 2012, 5:59 p.m.
Am 23.04.2012 19:27, schrieb Peter Portante:
> Commit ed120055c7f9b26b5707d3ceabbe5a3f06aaf937 (Implement PAPR VPA
> functions for pSeries shared processor partitions) introduced the
> register_dtl() function and typo "emv" as name of its argument.

Mea culpa: deregister_dtl()

> This went unnoticed because the code in that function can access the
> global variable "env" so that no build failure resulted.
> 
> Fix the argument to read "env". Resolves LP#986241.
> 
> Signed-off-by: Peter Portante <peter.portante@redhat.com>

Acked-by: Andreas Färber <afaerber@suse.de>

Alex, could you please fix my above typo when applying to avoid a v3? :)

Thanks,
Andreas

> ---
>  hw/spapr_hcall.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/hw/spapr_hcall.c b/hw/spapr_hcall.c
> index 634763e..94bb504 100644
> --- a/hw/spapr_hcall.c
> +++ b/hw/spapr_hcall.c
> @@ -482,7 +482,7 @@ static target_ulong register_dtl(CPUPPCState *env, target_ulong addr)
>      return H_SUCCESS;
>  }
>  
> -static target_ulong deregister_dtl(CPUPPCState *emv, target_ulong addr)
> +static target_ulong deregister_dtl(CPUPPCState *env, target_ulong addr)
>  {
>      env->dispatch_trace_log = 0;
>      env->dtl_size = 0;
Alexander Graf - April 26, 2012, 1:34 p.m.
On 23.04.2012, at 19:27, Peter Portante wrote:

> Commit ed120055c7f9b26b5707d3ceabbe5a3f06aaf937 (Implement PAPR VPA
> functions for pSeries shared processor partitions) introduced the
> register_dtl() function and typo "emv" as name of its argument.
> This went unnoticed because the code in that function can access the
> global variable "env" so that no build failure resulted.
> 
> Fix the argument to read "env". Resolves LP#986241.
> 
> Signed-off-by: Peter Portante <peter.portante@redhat.com>

Thanks, applied to ppc-next (with fixed typo in commit message)


Alex

Patch

diff --git a/hw/spapr_hcall.c b/hw/spapr_hcall.c
index 634763e..94bb504 100644
--- a/hw/spapr_hcall.c
+++ b/hw/spapr_hcall.c
@@ -482,7 +482,7 @@  static target_ulong register_dtl(CPUPPCState *env, target_ulong addr)
     return H_SUCCESS;
 }
 
-static target_ulong deregister_dtl(CPUPPCState *emv, target_ulong addr)
+static target_ulong deregister_dtl(CPUPPCState *env, target_ulong addr)
 {
     env->dispatch_trace_log = 0;
     env->dtl_size = 0;