Patchwork ppc: remove unused variables

login
register
mail settings
Submitter Blue Swirl
Date Feb. 4, 2012, 11:49 a.m.
Message ID <CAAu8pHtCoqKbf0uvb0bDvn5LXrvLFSbFx7dcPLqT4LyUyGZ5AQ@mail.gmail.com>
Download mbox | patch
Permalink /patch/139576/
State New
Headers show

Comments

Blue Swirl - Feb. 4, 2012, 11:49 a.m.
Fix this error:
/src/qemu/target-ppc/helper.c: In function 'booke206_tlb_to_page_size':
/src/qemu/target-ppc/helper.c:1296:14: error: variable 'tlbncfg' set
but not used [-Werror=unused-but-set-variable]

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
---
 target-ppc/helper.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

     return 1024ULL << tlbm_size;
Andreas Färber - Feb. 6, 2012, 3:21 p.m.
Am 04.02.2012 12:49, schrieb Blue Swirl:
> Fix this error:
> /src/qemu/target-ppc/helper.c: In function 'booke206_tlb_to_page_size':
> /src/qemu/target-ppc/helper.c:1296:14: error: variable 'tlbncfg' set
> but not used [-Werror=unused-but-set-variable]
> 
> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

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

Alex?

Andreas

> ---
>  target-ppc/helper.c |    3 ---
>  1 files changed, 0 insertions(+), 3 deletions(-)
> 
> diff --git a/target-ppc/helper.c b/target-ppc/helper.c
> index e56fac8..928fbcf 100644
> --- a/target-ppc/helper.c
> +++ b/target-ppc/helper.c
> @@ -1293,11 +1293,8 @@ void booke206_flush_tlb(CPUState *env, int
> flags, const int check_iprot)
> 
>  target_phys_addr_t booke206_tlb_to_page_size(CPUState *env, ppcmas_tlb_t *tlb)
>  {
> -    uint32_t tlbncfg;
> -    int tlbn = booke206_tlbm_to_tlbn(env, tlb);
>      int tlbm_size;
> 
> -    tlbncfg = env->spr[SPR_BOOKE_TLB0CFG + tlbn];
>      tlbm_size = (tlb->mas1 & MAS1_TSIZE_MASK) >> MAS1_TSIZE_SHIFT;
> 
>      return 1024ULL << tlbm_size;
Alexander Graf - Feb. 6, 2012, 3:57 p.m.
On 06.02.2012, at 16:21, Andreas Färber wrote:

> Am 04.02.2012 12:49, schrieb Blue Swirl:
>> Fix this error:
>> /src/qemu/target-ppc/helper.c: In function 'booke206_tlb_to_page_size':
>> /src/qemu/target-ppc/helper.c:1296:14: error: variable 'tlbncfg' set
>> but not used [-Werror=unused-but-set-variable]
>> 
>> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
> 
> Tested-by: Andreas Färber <afaerber@suse.de>

Yes, Blue, can you push it please?


Alex
Blue Swirl - Feb. 11, 2012, 11:07 a.m.
On Mon, Feb 6, 2012 at 15:57, Alexander Graf <agraf@suse.de> wrote:
>
> On 06.02.2012, at 16:21, Andreas Färber wrote:
>
>> Am 04.02.2012 12:49, schrieb Blue Swirl:
>>> Fix this error:
>>> /src/qemu/target-ppc/helper.c: In function 'booke206_tlb_to_page_size':
>>> /src/qemu/target-ppc/helper.c:1296:14: error: variable 'tlbncfg' set
>>> but not used [-Werror=unused-but-set-variable]
>>>
>>> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
>>
>> Tested-by: Andreas Färber <afaerber@suse.de>
>
> Yes, Blue, can you push it please?

Pushed.

>
>
> Alex
>

Patch

From 410e82944dbec49e3c21806dd4d54eb46bd264f3 Mon Sep 17 00:00:00 2001
Message-Id: <410e82944dbec49e3c21806dd4d54eb46bd264f3.1328356075.git.blauwirbel@gmail.com>
From: Blue Swirl <blauwirbel@gmail.com>
Date: Sat, 4 Feb 2012 11:47:17 +0000
Subject: [PATCH] ppc: remove unused variables

Fix this error:
/src/qemu/target-ppc/helper.c: In function 'booke206_tlb_to_page_size':
/src/qemu/target-ppc/helper.c:1296:14: error: variable 'tlbncfg' set but not used [-Werror=unused-but-set-variable]

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
---
 target-ppc/helper.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/target-ppc/helper.c b/target-ppc/helper.c
index e56fac8..928fbcf 100644
--- a/target-ppc/helper.c
+++ b/target-ppc/helper.c
@@ -1293,11 +1293,8 @@  void booke206_flush_tlb(CPUState *env, int flags, const int check_iprot)
 
 target_phys_addr_t booke206_tlb_to_page_size(CPUState *env, ppcmas_tlb_t *tlb)
 {
-    uint32_t tlbncfg;
-    int tlbn = booke206_tlbm_to_tlbn(env, tlb);
     int tlbm_size;
 
-    tlbncfg = env->spr[SPR_BOOKE_TLB0CFG + tlbn];
     tlbm_size = (tlb->mas1 & MAS1_TSIZE_MASK) >> MAS1_TSIZE_SHIFT;
 
     return 1024ULL << tlbm_size;
-- 
1.7.2.5