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: <f42427601560dee3e611a6145b6c3b8b@208suo.com>
Date:   Fri, 21 Jul 2023 09:03:49 +0000
From:   sunran001@...suo.com
To:     tglx@...utronix.de, mingo@...hat.com, bp@...en8.de,
        dave.hansen@...ux.intel.com, x86@...nel.org
Cc:     linux-kernel@...r.kernel.org
Subject: [PATCH] x86/ioapic: do not use assignment in if condition

Fixes the following checkpatch errors:

ERROR: do not use assignment in if condition

Signed-off-by: Ran Sun <sunran001@...suo.com>
---
  arch/x86/kernel/apic/io_apic.c | 7 +++++--
  1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kernel/apic/io_apic.c 
b/arch/x86/kernel/apic/io_apic.c
index 4241dc243aa8..be32b085d37e 100644
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -1058,8 +1058,11 @@ static int mp_map_pin_to_irq(u32 gsi, int idx, 
int ioapic, int pin,
  		if (legacy)
  			irq = alloc_isa_irq_from_domain(domain, irq,
  							ioapic, pin, &tmp);
-		else if ((irq = irq_find_mapping(domain, pin)) == 0)
-			irq = alloc_irq_from_domain(domain, ioapic, gsi, &tmp);
+		else {
+			irq = irq_find_mapping(domain, pin);
+			if (irq == 0)
+				irq = alloc_irq_from_domain(domain, ioapic, gsi, &tmp);
+		}
  		else if (!mp_check_pin_attr(irq, &tmp))
  			irq = -EBUSY;
  		if (irq >= 0) {

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ