diff mbox

[1/2] xen_mapcache: remove unused variable

Message ID 3f56b8e8461282d8942c88b616c09907854f8b23.1310400716.git.quintela@redhat.com
State New
Headers show

Commit Message

Juan Quintela July 11, 2011, 4:15 p.m. UTC
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 xen-mapcache.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

Comments

Stefano Stabellini July 12, 2011, 10:19 a.m. UTC | #1
On Mon, 11 Jul 2011, Juan Quintela wrote:
> 
> Signed-off-by: Juan Quintela <quintela@redhat.com>


Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>

> ---
>  xen-mapcache.c |    3 +--
>  1 files changed, 1 insertions(+), 2 deletions(-)
> 
> diff --git a/xen-mapcache.c b/xen-mapcache.c
> index fac47cd..e2e324d 100644
> --- a/xen-mapcache.c
> +++ b/xen-mapcache.c
> @@ -232,7 +232,7 @@ uint8_t *qemu_map_cache(target_phys_addr_t phys_addr, target_phys_addr_t size, u
> 
>  ram_addr_t qemu_ram_addr_from_mapcache(void *ptr)
>  {
> -    MapCacheEntry *entry = NULL, *pentry = NULL;
> +    MapCacheEntry *entry = NULL;
>      MapCacheRev *reventry;
>      target_phys_addr_t paddr_index;
>      target_phys_addr_t size;
> @@ -258,7 +258,6 @@ ram_addr_t qemu_ram_addr_from_mapcache(void *ptr)
> 
>      entry = &mapcache->entry[paddr_index % mapcache->nr_buckets];
>      while (entry && (entry->paddr_index != paddr_index || entry->size != size)) {
> -        pentry = entry;
>          entry = entry->next;
>      }
>      if (!entry) {
> -- 
> 1.7.6
> 
>
Stefan Berger July 26, 2011, 2:54 p.m. UTC | #2
On 07/11/2011 12:15 PM, Juan Quintela wrote:
> Signed-off-by: Juan Quintela<quintela@redhat.com>
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>

Been pointed to this patch after having posted the same.

    Stefan

> ---
>   xen-mapcache.c |    3 +--
>   1 files changed, 1 insertions(+), 2 deletions(-)
>
> diff --git a/xen-mapcache.c b/xen-mapcache.c
> index fac47cd..e2e324d 100644
> --- a/xen-mapcache.c
> +++ b/xen-mapcache.c
> @@ -232,7 +232,7 @@ uint8_t *qemu_map_cache(target_phys_addr_t phys_addr, target_phys_addr_t size, u
>
>   ram_addr_t qemu_ram_addr_from_mapcache(void *ptr)
>   {
> -    MapCacheEntry *entry = NULL, *pentry = NULL;
> +    MapCacheEntry *entry = NULL;
>       MapCacheRev *reventry;
>       target_phys_addr_t paddr_index;
>       target_phys_addr_t size;
> @@ -258,7 +258,6 @@ ram_addr_t qemu_ram_addr_from_mapcache(void *ptr)
>
>       entry =&mapcache->entry[paddr_index % mapcache->nr_buckets];
>       while (entry&&  (entry->paddr_index != paddr_index || entry->size != size)) {
> -        pentry = entry;
>           entry = entry->next;
>       }
>       if (!entry) {
Stefan Hajnoczi July 27, 2011, 9:03 a.m. UTC | #3
On Mon, Jul 11, 2011 at 06:15:11PM +0200, Juan Quintela wrote:
> 
> Signed-off-by: Juan Quintela <quintela@redhat.com>
> ---
>  xen-mapcache.c |    3 +--
>  1 files changed, 1 insertions(+), 2 deletions(-)

Since Stefano has acked it but it was not merged into qemu.git yet...

Thanks, applied to the trivial patches tree:
http://repo.or.cz/w/qemu/stefanha.git/shortlog/refs/heads/trivial-patches

Stefan
diff mbox

Patch

diff --git a/xen-mapcache.c b/xen-mapcache.c
index fac47cd..e2e324d 100644
--- a/xen-mapcache.c
+++ b/xen-mapcache.c
@@ -232,7 +232,7 @@  uint8_t *qemu_map_cache(target_phys_addr_t phys_addr, target_phys_addr_t size, u

 ram_addr_t qemu_ram_addr_from_mapcache(void *ptr)
 {
-    MapCacheEntry *entry = NULL, *pentry = NULL;
+    MapCacheEntry *entry = NULL;
     MapCacheRev *reventry;
     target_phys_addr_t paddr_index;
     target_phys_addr_t size;
@@ -258,7 +258,6 @@  ram_addr_t qemu_ram_addr_from_mapcache(void *ptr)

     entry = &mapcache->entry[paddr_index % mapcache->nr_buckets];
     while (entry && (entry->paddr_index != paddr_index || entry->size != size)) {
-        pentry = entry;
         entry = entry->next;
     }
     if (!entry) {