Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c0b49b0d164c4902e53c17d90e2c5e5a2ac9e132
Commit:     c0b49b0d164c4902e53c17d90e2c5e5a2ac9e132
Parent:     9ef9dc69d4167276c04590d67ee55de8380bc1ad
Author:     Andrew Morton <[EMAIL PROTECTED]>
AuthorDate: Mon Feb 4 22:27:18 2008 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Tue Feb 5 09:44:06 2008 -0800

    kvm: i386 fix
    
    arch/x86/kvm/x86.c: In function 'emulator_cmpxchg_emulated':
    arch/x86/kvm/x86.c:1746: warning: passing argument 2 of 
'vcpu->arch.mmu.gva_to_gpa' makes integer from pointer without a cast
    arch/x86/kvm/x86.c:1746: warning: 'addr' is used uninitialized in this 
function
    
    Is true.  Local variable `addr' shadows incoming arg `addr'.  Avi is on
    vacation for a while, so...
    
    Cc: Avi Kivity <[EMAIL PROTECTED]>
    Cc: Ingo Molnar <[EMAIL PROTECTED]>
    Cc: Thomas Gleixner <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 arch/x86/kvm/x86.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 8f94a0b..cf53081 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -1739,7 +1739,7 @@ static int emulator_cmpxchg_emulated(unsigned long addr,
        if (bytes == 8) {
                gpa_t gpa;
                struct page *page;
-               char *addr;
+               char *kaddr;
                u64 val;
 
                down_read(&current->mm->mmap_sem);
@@ -1754,9 +1754,9 @@ static int emulator_cmpxchg_emulated(unsigned long addr,
 
                val = *(u64 *)new;
                page = gfn_to_page(vcpu->kvm, gpa >> PAGE_SHIFT);
-               addr = kmap_atomic(page, KM_USER0);
-               set_64bit((u64 *)(addr + offset_in_page(gpa)), val);
-               kunmap_atomic(addr, KM_USER0);
+               kaddr = kmap_atomic(page, KM_USER0);
+               set_64bit((u64 *)(kaddr + offset_in_page(gpa)), val);
+               kunmap_atomic(kaddr, KM_USER0);
                kvm_release_page_dirty(page);
        emul_write:
                up_read(&current->mm->mmap_sem);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to