mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] KVM: Fix warnings in irqchip.c
       [not found] <tencent_E7FFD5AD20D6F7A59A915FD8CB1385FC8806@qq.com>
@ 2023-07-17  3:27 ` shijie001
  0 siblings, 0 replies; only message in thread
From: shijie001 @ 2023-07-17  3:27 UTC (permalink / raw)
  To: pbonzini; +Cc: kvm, linux-kernel

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))

Signed-off-by: Jie Shi <shijie001@208suo.com>
---
  virt/kvm/irqchip.c | 15 +++++++++------
  1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/virt/kvm/irqchip.c b/virt/kvm/irqchip.c
index 1e567d1f6d3d..33721848315f 100644
--- a/virt/kvm/irqchip.c
+++ b/virt/kvm/irqchip.c
@@ -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;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-07-17  3:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <tencent_E7FFD5AD20D6F7A59A915FD8CB1385FC8806@qq.com>
2023-07-17  3:27 ` [PATCH] KVM: Fix warnings in irqchip.c shijie001

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®