From patchwork Wed Mar 10 11:37:46 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrea Gelmini X-Patchwork-Id: 84543 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 o2ABc9As012975 for ; Wed, 10 Mar 2010 11:38:09 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756305Ab0CJLiH (ORCPT ); Wed, 10 Mar 2010 06:38:07 -0500 Received: from mail-fx0-f219.google.com ([209.85.220.219]:40172 "EHLO mail-fx0-f219.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755602Ab0CJLiD (ORCPT ); Wed, 10 Mar 2010 06:38:03 -0500 Received: by fxm19 with SMTP id 19so8544428fxm.21 for ; Wed, 10 Mar 2010 03:38:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:from:to:cc:subject :date:message-id:x-mailer:in-reply-to:references; bh=zlhdN9JBu3SE8Kvjrpq7qUf4oh1AUNYxAhaalaBL+nA=; b=dXJfXjIIPFcjFgUW0VMxNp6IxixDM8c7DYf4sqiWEmde1LInwDERGGF1+k67zN+vqF ALN1YK4RWKx5+Ab5A6E4h5zE8VNnsIDInmWwEVnj5yZIPiWJ8SQbAM/SV/R3GNJs5+m9 JTbEdM+ygHHMMbs8C4D4X0o6UdJVvWbbL7KIo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; b=XTACw2YvAXQNYEYk8BSoF5eXK6R8JonVGI7Ohs00tCdpiw5v6EeT7/t5u7PmxUouMA /1J+MGBsU7X6dfSUOZ9nPlyQzq62HHk4fPz6Gw84VRjtBwR1VK36bgKZT1eaoZ4dDqtp R4pQHBmf9r40Hd+E+LoHs0OfopJeFan/gNjpw= Received: by 10.223.97.219 with SMTP id m27mr1414082fan.16.1268221081991; Wed, 10 Mar 2010 03:38:01 -0800 (PST) Received: from localhost.localdomain (ip-125-235.sn2.eutelia.it [83.211.125.235]) by mx.google.com with ESMTPS id 13sm775283fxm.14.2010.03.10.03.38.01 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 10 Mar 2010 03:38:01 -0800 (PST) From: Andrea Gelmini To: mtosatti@redhat.com Cc: avi@redhat.com, kvm@vger.kernel.org, Andrea Gelmini Subject: [PATCH 1/2] virt/kvm/* Checkpatch cleanup Date: Wed, 10 Mar 2010 12:37:46 +0100 Message-Id: <1268221067-23733-2-git-send-email-andrea.gelmini@gelma.net> X-Mailer: git-send-email 1.7.0.2.157.gb7e7f In-Reply-To: <1268221067-23733-1-git-send-email-andrea.gelmini@gelma.net> References: <1268221067-23733-1-git-send-email-andrea.gelmini@gelma.net> 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]); Wed, 10 Mar 2010 11:38:09 +0000 (UTC) diff --git a/virt/kvm/assigned-dev.c b/virt/kvm/assigned-dev.c index 057e2cc..6595bf2 100644 --- a/virt/kvm/assigned-dev.c +++ b/virt/kvm/assigned-dev.c @@ -786,7 +786,7 @@ long kvm_vm_ioctl_assigned_device(struct kvm *kvm, unsigned ioctl, goto out_free_irq_routing; r = kvm_set_irq_routing(kvm, entries, routing.nr, routing.flags); - out_free_irq_routing: +out_free_irq_routing: vfree(entries); break; } diff --git a/virt/kvm/coalesced_mmio.h b/virt/kvm/coalesced_mmio.h index 8a5959e..8c3b79f 100644 --- a/virt/kvm/coalesced_mmio.h +++ b/virt/kvm/coalesced_mmio.h @@ -25,9 +25,9 @@ struct kvm_coalesced_mmio_dev { int kvm_coalesced_mmio_init(struct kvm *kvm); void kvm_coalesced_mmio_free(struct kvm *kvm); int kvm_vm_ioctl_register_coalesced_mmio(struct kvm *kvm, - struct kvm_coalesced_mmio_zone *zone); + struct kvm_coalesced_mmio_zone *zone); int kvm_vm_ioctl_unregister_coalesced_mmio(struct kvm *kvm, - struct kvm_coalesced_mmio_zone *zone); + struct kvm_coalesced_mmio_zone *zone); #else diff --git a/virt/kvm/ioapic.c b/virt/kvm/ioapic.c index 3db15a8..b718699 100644 --- a/virt/kvm/ioapic.c +++ b/virt/kvm/ioapic.c @@ -43,7 +43,7 @@ #include "irq.h" #if 0 -#define ioapic_debug(fmt,arg...) printk(KERN_WARNING fmt,##arg) +#define ioapic_debug(fmt, arg...) printk(KERN_WARNING fmt, ##arg) #else #define ioapic_debug(fmt, arg...) #endif @@ -326,7 +326,7 @@ static int ioapic_mmio_write(struct kvm_io_device *this, gpa_t addr, int len, return -EOPNOTSUPP; ioapic_debug("ioapic_mmio_write addr=%p len=%d val=%p\n", - (void*)addr, len, val); + (void *)addr, len, val); ASSERT(!(addr & 0xf)); /* check alignment */ if (len == 4 || len == 8) diff --git a/virt/kvm/ioapic.h b/virt/kvm/ioapic.h index 8a751b7..0053dd7 100644 --- a/virt/kvm/ioapic.h +++ b/virt/kvm/ioapic.h @@ -50,7 +50,7 @@ struct kvm_ioapic { }; #ifdef DEBUG -#define ASSERT(x) \ +#define ASSERT(x) \ do { \ if (!(x)) { \ printk(KERN_EMERG "assertion failed %s: %d: %s\n", \ diff --git a/virt/kvm/irq_comm.c b/virt/kvm/irq_comm.c index 9fd5b3e..9a05c77 100644 --- a/virt/kvm/irq_comm.c +++ b/virt/kvm/irq_comm.c @@ -162,7 +162,7 @@ int kvm_set_irq(struct kvm *kvm, int irq_source_id, u32 irq, int level) irq_set[i++] = *e; rcu_read_unlock(); - while(i--) { + while (i--) { int r; r = irq_set[i].set(&irq_set[i], kvm, irq_source_id, level); if (r < 0) diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 548f925..596900e 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c @@ -64,7 +64,7 @@ MODULE_LICENSE("GPL"); /* * Ordering of locks: * - * kvm->lock --> kvm->slots_lock --> kvm->irq_lock + * kvm->lock --> kvm->slots_lock --> kvm->irq_lock */ DEFINE_SPINLOCK(kvm_lock); @@ -681,8 +681,8 @@ skip_lpage: * memslot will be created. * * validation of sp->gfn happens in: - * - gfn_to_hva (kvm_read_guest, gfn_to_pfn) - * - kvm_is_visible_gfn (mmu_check_roots) + * - gfn_to_hva (kvm_read_guest, gfn_to_pfn) + * - kvm_is_visible_gfn (mmu_check_roots) */ kvm_arch_flush_shadow(kvm); kfree(old_memslots); @@ -918,7 +918,7 @@ unsigned long gfn_to_hva(struct kvm *kvm, gfn_t gfn) slot = gfn_to_memslot_unaliased(kvm, gfn); if (!slot || slot->flags & KVM_MEMSLOT_INVALID) return bad_hva(); - return (slot->userspace_addr + (gfn - slot->base_gfn) * PAGE_SIZE); + return slot->userspace_addr + (gfn - slot->base_gfn) * PAGE_SIZE; } EXPORT_SYMBOL_GPL(gfn_to_hva); @@ -970,7 +970,7 @@ EXPORT_SYMBOL_GPL(gfn_to_pfn); static unsigned long gfn_to_hva_memslot(struct kvm_memory_slot *slot, gfn_t gfn) { - return (slot->userspace_addr + (gfn - slot->base_gfn) * PAGE_SIZE); + return slot->userspace_addr + (gfn - slot->base_gfn) * PAGE_SIZE; } pfn_t gfn_to_pfn_memslot(struct kvm *kvm, @@ -1166,7 +1166,7 @@ int kvm_clear_guest(struct kvm *kvm, gpa_t gpa, unsigned long len) int offset = offset_in_page(gpa); int ret; - while ((seg = next_segment(len, offset)) != 0) { + while ((seg = next_segment(len, offset)) != 0) { ret = kvm_clear_guest_page(kvm, gfn, offset, seg); if (ret < 0) return ret;