diff mbox

[09/10] exec: remove unused variable

Message ID dd745620661c4470581ed3e40c282a0fe6fbc434.1308072799.git.mst@redhat.com
State New
Headers show

Commit Message

Michael S. Tsirkin June 14, 2011, 5:36 p.m. UTC
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
 exec.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

Comments

Michael S. Tsirkin June 26, 2011, 11:08 a.m. UTC | #1
On Tue, Jun 14, 2011 at 08:36:26PM +0300, Michael S. Tsirkin wrote:
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

Any comments on this one?

> ---
>  exec.c |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/exec.c b/exec.c
> index 81808f4..b784f08 100644
> --- a/exec.c
> +++ b/exec.c
> @@ -1207,12 +1207,16 @@ static inline void tb_alloc_page(TranslationBlock *tb,
>                                   unsigned int n, tb_page_addr_t page_addr)
>  {
>      PageDesc *p;
> +#if !defined(CONFIG_USER_ONLY)
>      TranslationBlock *last_first_tb;
> +#endif
>  
>      tb->page_addr[n] = page_addr;
>      p = page_find_alloc(page_addr >> TARGET_PAGE_BITS, 1);
>      tb->page_next[n] = p->first_tb;
> +#if !defined(CONFIG_USER_ONLY)
>      last_first_tb = p->first_tb;
> +#endif
>      p->first_tb = (TranslationBlock *)((long)tb | n);
>      invalidate_page_bitmap(p);
>  
> -- 
> 1.7.5.53.gc233e
Stefan Hajnoczi June 26, 2011, 2:32 p.m. UTC | #2
On Sun, Jun 26, 2011 at 12:08 PM, Michael S. Tsirkin <mst@redhat.com> wrote:
> On Tue, Jun 14, 2011 at 08:36:26PM +0300, Michael S. Tsirkin wrote:
>> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
>
> Any comments on this one?

Juan Quintela's "exec: last_first_tb was only used in !ONLY_USER case"
patch is equivalent and the trivial-patches pull request containing it
is on qemu-devel.  We're waiting for it to be merged.

http://patchwork.ozlabs.org/patch/101875/

Stefan
diff mbox

Patch

diff --git a/exec.c b/exec.c
index 81808f4..b784f08 100644
--- a/exec.c
+++ b/exec.c
@@ -1207,12 +1207,16 @@  static inline void tb_alloc_page(TranslationBlock *tb,
                                  unsigned int n, tb_page_addr_t page_addr)
 {
     PageDesc *p;
+#if !defined(CONFIG_USER_ONLY)
     TranslationBlock *last_first_tb;
+#endif
 
     tb->page_addr[n] = page_addr;
     p = page_find_alloc(page_addr >> TARGET_PAGE_BITS, 1);
     tb->page_next[n] = p->first_tb;
+#if !defined(CONFIG_USER_ONLY)
     last_first_tb = p->first_tb;
+#endif
     p->first_tb = (TranslationBlock *)((long)tb | n);
     invalidate_page_bitmap(p);