lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <2ec15b819263c1b9e0ee08da6b605006@208suo.com>
Date:   Mon, 17 Jul 2023 11:27:01 +0800
From:   shijie001@...suo.com
To:     pbonzini@...hat.com
Cc:     kvm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] 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))

Signed-off-by: Jie Shi <shijie001@...suo.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;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ