KVM: Fix warnings in irqchip.c
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/1 KVM: Fix warnings in irqchip.c
The following checkpatch warnings are removed:
WARNING: Prefer 'unsigned int' to bare use of 'unsigned'
WARNING: Missing a blank line after declarations
WARNING: Block comments use * on subsequent lines
WARNING: Block comments use a trailing */ on a separate line
WARNING: Prefer __weak over __attribute__((weak))
--- virt/kvm/irqchip.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-)
virt/kvm/irqchip.c +5 -3
@@ -37,7 +37,7 @@ int kvm_irq_map_gsi(struct kvm *kvm,return n; } -int kvm_irq_map_chip_pin (struct kvm *kvm,unsigned irqchip,unsigned pin) +int kvm_irq_map_chip_pin (struct kvm *kvm,unsigned int irqchip,unsigned int pin) {struct kvm_irq_routing_table *irq_rt;
@@ -85,6 +85,7 @@ int kvm_set_irq(struct kvm *kvm, int irq_source_id, u32 irq, int level,while (i--) {int r; + r = irq_set[i].set (&irq_set[i], kvm, irq_source_id, level, line_status);if (r <0 )
@@ -118,9 +119,11 @@ static void free_irq_routing_table(struct kvm_irq_routing_table *rt)void kvm_free_irq_routing (struct kvm *kvm) { -/* Called only during vm destruction. Nobody can use the pointer -at this stage */ +/* Called only during vm destruction. +* Nobody can use the pointer at this stage. +*/ struct kvm_irq_routing_table *rt =
rcu_access_pointer(kvm->irq_routing);
+
free_irq_routing_table(rt);
}
@@ -156,7 +159,7 @@ static int setup_routing_entry(struct kvm *kvm,
return 0;
}
-void __attribute__((weak)) kvm_arch_irq_routing_update(struct kvm *kvm) +void __weak kvm_arch_irq_routing_update(struct kvm *kvm)
{
}
@@ -167,8 +170,8 @@ bool __weak kvm_arch_can_set_irq_routing(struct kvm *kvm)
int kvm_set_irq_routing(struct kvm *kvm,
const struct kvm_irq_routing_entry *ue,
- unsigned nr,
- unsigned flags)
+ unsigned int nr,
+ unsigned int flags)
{
struct kvm_irq_routing_table *new, *old;
struct kvm_kernel_irq_routing_entry *e;