From patchwork Thu Jun 10 11:10:55 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andi Kleen X-Patchwork-Id: 105353 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o5ABCkSU004188 for ; Thu, 10 Jun 2010 11:12:46 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758891Ab0FJLK7 (ORCPT ); Thu, 10 Jun 2010 07:10:59 -0400 Received: from one.firstfloor.org ([213.235.205.2]:39183 "EHLO one.firstfloor.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758880Ab0FJLK4 (ORCPT ); Thu, 10 Jun 2010 07:10:56 -0400 Received: from basil.firstfloor.org (p5B3CB6DB.dip0.t-ipconnect.de [91.60.182.219]) by one.firstfloor.org (Postfix) with ESMTP id BCDAC1EE802D; Thu, 10 Jun 2010 13:10:55 +0200 (CEST) Received: by basil.firstfloor.org (Postfix, from userid 1000) id 4FB51B1A2B; Thu, 10 Jun 2010 13:10:55 +0200 (CEST) From: Andi Kleen References: <20100610110.764742110@firstfloor.org> In-Reply-To: <20100610110.764742110@firstfloor.org> To: avi@redhat.com, kvm@vger.kernel.org, akpm@linux-foundation.org, linux-kernel@vger.kernel.org Subject: [PATCH] [19/23] KVM: Fix unused but set warnings Message-Id: <20100610111055.4FB51B1A2B@basil.firstfloor.org> Date: Thu, 10 Jun 2010 13:10:55 +0200 (CEST) Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Thu, 10 Jun 2010 11:12:46 +0000 (UTC) Index: linux-2.6.35-rc2-gcc/arch/x86/kvm/paging_tmpl.h =================================================================== --- linux-2.6.35-rc2-gcc.orig/arch/x86/kvm/paging_tmpl.h +++ linux-2.6.35-rc2-gcc/arch/x86/kvm/paging_tmpl.h @@ -442,6 +442,7 @@ static int FNAME(page_fault)(struct kvm_ kvm_mmu_free_some_pages(vcpu); sptep = FNAME(fetch)(vcpu, addr, &walker, user_fault, write_fault, level, &write_pt, pfn); + (void)sptep; pgprintk("%s: shadow pte %p %llx ptwrite %d\n", __func__, sptep, *sptep, write_pt); Index: linux-2.6.35-rc2-gcc/arch/x86/kvm/vmx.c =================================================================== --- linux-2.6.35-rc2-gcc.orig/arch/x86/kvm/vmx.c +++ linux-2.6.35-rc2-gcc/arch/x86/kvm/vmx.c @@ -1624,10 +1624,9 @@ static void enter_pmode(struct kvm_vcpu static gva_t rmode_tss_base(struct kvm *kvm) { if (!kvm->arch.tss_addr) { - struct kvm_memslots *slots; gfn_t base_gfn; - slots = kvm_memslots(kvm); + kvm_memslots(kvm); base_gfn = kvm->memslots->memslots[0].base_gfn + kvm->memslots->memslots[0].npages - 3; return base_gfn << PAGE_SHIFT; Index: linux-2.6.35-rc2-gcc/virt/kvm/assigned-dev.c =================================================================== --- linux-2.6.35-rc2-gcc.orig/virt/kvm/assigned-dev.c +++ linux-2.6.35-rc2-gcc/virt/kvm/assigned-dev.c @@ -58,12 +58,10 @@ static int find_index_from_host_irq(stru static void kvm_assigned_dev_interrupt_work_handler(struct work_struct *work) { struct kvm_assigned_dev_kernel *assigned_dev; - struct kvm *kvm; int i; assigned_dev = container_of(work, struct kvm_assigned_dev_kernel, interrupt_work); - kvm = assigned_dev->kvm; spin_lock_irq(&assigned_dev->assigned_dev_lock); if (assigned_dev->irq_requested_type & KVM_DEV_IRQ_HOST_MSIX) {