Re: [PATCH] These are my first patches to the kernel

2010-06-13 Thread Avi Kivity

On 06/12/2010 03:17 PM, K.de Jong wrote:

 From 6b9ac8708d856a425a9aaa598acdea3d89485bde Mon Sep 17 00:00:00 2001
From: UndiFineDk.dej...@undifined.nl
Date: Sat, 12 Jun 2010 00:24:28 +0200
Subject: [PATCH] These are my first patches to the kernel
Janitor patches to kvm
Linus2.6: virt/kvm/

   


Most of the patch is just whitespace changes, which don't improve the 
code in any way.  I much prefer patches that fix bugs or add features.


--
error compiling committee.c: too many arguments to function

--
To unsubscribe from this list: send the line unsubscribe kvm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] These are my first patches to the kernel

2010-06-13 Thread K.de Jong
2010/6/13 Avi Kivity a...@redhat.com:
 On 06/12/2010 03:17 PM, K.de Jong wrote:

  From 6b9ac8708d856a425a9aaa598acdea3d89485bde Mon Sep 17 00:00:00 2001
 From: UndiFineDk.dej...@undifined.nl
 Date: Sat, 12 Jun 2010 00:24:28 +0200
 Subject: [PATCH] These are my first patches to the kernel
 Janitor patches to kvm
 Linus2.6: virt/kvm/



 Most of the patch is just whitespace changes, which don't improve the code
 in any way.  I much prefer patches that fix bugs or add features.

Ofcourse everyone prefers bug fixes and new features :-)
I simply looked at greg's submit a patch video.
And thought, hey I could do this, and help clean up code.
Cleaner code makes it more accessible
and I get to know where everything is located.
So I am going to continue making patches like these
and become more familiar with the whole kernel.

-- 
Keimpe de Jong
--
To unsubscribe from this list: send the line unsubscribe kvm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] These are my first patches to the kernel

2010-06-13 Thread Wolfram Sang
 So I am going to continue making patches like these
 and become more familiar with the whole kernel.

Better concentrate on the drivers/staging-directory for that. Such patches are
very welcome there, which may be not so true for the rest of the kernel. You
can probably find a couple of mail-threads stating the pros and cons.

Regards,

   Wolfram

-- 
Pengutronix e.K.   | Wolfram Sang|
Industrial Linux Solutions | http://www.pengutronix.de/  |


signature.asc
Description: Digital signature


[PATCH] These are my first patches to the kernel

2010-06-12 Thread K.de Jong
From 6b9ac8708d856a425a9aaa598acdea3d89485bde Mon Sep 17 00:00:00 2001
From: UndiFineD k.dej...@undifined.nl
Date: Sat, 12 Jun 2010 00:24:28 +0200
Subject: [PATCH] These are my first patches to the kernel
Janitor patches to kvm
Linus2.6: virt/kvm/

Signed-off-by: UndiFineD k.dej...@undifined.nl
---
 virt/kvm/assigned-dev.c   |6 +++---
 virt/kvm/coalesced_mmio.h |4 ++--
 virt/kvm/ioapic.c |   17 -
 virt/kvm/ioapic.h |   14 +++---
 virt/kvm/iodev.h  |2 +-
 virt/kvm/irq_comm.c   |4 ++--
 virt/kvm/kvm_main.c   |   28 +---
 7 files changed, 36 insertions(+), 39 deletions(-)

diff --git a/virt/kvm/assigned-dev.c b/virt/kvm/assigned-dev.c
index 4d10b1e..81b0e36 100644
--- a/virt/kvm/assigned-dev.c
+++ b/virt/kvm/assigned-dev.c
@@ -19,8 +19,8 @@
 #include linux/slab.h
 #include irq.h

-static struct kvm_assigned_dev_kernel *kvm_find_assigned_dev(struct
list_head *head,
- int assigned_dev_id)
+static struct kvm_assigned_dev_kernel *kvm_find_assigned_dev(
+struct list_head *head, int assigned_dev_id)
 {
struct list_head *ptr;
struct kvm_assigned_dev_kernel *match;
@@ -791,7 +791,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..d45c5bc 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 3500dee..80f00fd 100644
--- a/virt/kvm/ioapic.c
+++ b/virt/kvm/ioapic.c
@@ -44,22 +44,21 @@
 #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
 static int ioapic_deliver(struct kvm_ioapic *vioapic, int irq);

 static unsigned long ioapic_read_indirect(struct kvm_ioapic *ioapic,
- unsigned long addr,
- unsigned long length)
+unsigned long addr, unsigned long length)
 {
unsigned long result = 0;

switch (ioapic-ioregsel) {
case IOAPIC_REG_VERSION:
result = IOAPIC_NUM_PINS - 1)  0xff)  16)
- | (IOAPIC_VERSION_ID  0xff));
+   | (IOAPIC_VERSION_ID  0xff));
break;

case IOAPIC_REG_APIC_ID:
@@ -110,7 +109,7 @@ static void update_handled_vectors(struct
kvm_ioapic *ioapic)
for (i = 0; i  IOAPIC_NUM_PINS; ++i)
__set_bit(ioapic-redirtbl[i].fields.vector, handled_vectors);
memcpy(ioapic-handled_vectors, handled_vectors,
-  sizeof(handled_vectors));
+   sizeof(handled_vectors));
smp_wmb();
 }

@@ -221,7 +220,7 @@ int kvm_ioapic_set_irq(struct kvm_ioapic *ioapic,
int irq, int level)
 }

 static void __kvm_ioapic_update_eoi(struct kvm_ioapic *ioapic, int vector,
-int trigger_mode)
+int trigger_mode)
 {
int i;

@@ -277,7 +276,7 @@ static inline int ioapic_in_range(struct
kvm_ioapic *ioapic, gpa_t addr)
 }

 static int ioapic_mmio_read(struct kvm_io_device *this, gpa_t addr, int len,
-   void *val)
+void *val)
 {
struct kvm_ioapic *ioapic = to_ioapic(this);
u32 result;
@@ -320,7 +319,7 @@ static int ioapic_mmio_read(struct kvm_io_device
*this, gpa_t addr, int len,
 }

 static int ioapic_mmio_write(struct kvm_io_device *this, gpa_t addr, int len,
-const void *val)
+const void *val)
 {
struct kvm_ioapic *ioapic = to_ioapic(this);
u32 data;
@@ -328,7 +327,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