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: <1278371094-14393-1-git-send-email-kjwinchester@gmail.com>
Date:	Mon,  5 Jul 2010 20:04:54 -0300
From:	Kevin Winchester <kjwinchester@...il.com>
To:	Dan Williams <dan.j.williams@...el.com>
Cc:	Kevin Winchester <kjwinchester@...il.com>,
	FUJITA Tomonori <fujita.tomonori@....ntt.co.jp>,
	Thomas Gleixner <tglx@...utronix.de>,
	linux-kernel@...r.kernel.org
Subject: [PATCH] dmar: Fix statement with no effect warning in include/linux/dmar.h

In the CONFIG_INTR_REMAP=N case, most dmar functions become one-
line static inline functions.  However a few functions were instead
defined to constants.  This causes the following warnings for me:

arch/x86/kernel/apic/apic.c: In function ‘lapic_suspend’:
arch/x86/kernel/apic/apic.c:2014:3: warning: statement with no effect
arch/x86/kernel/apic/apic.c: In function ‘lapic_resume’:
arch/x86/kernel/apic/apic.c:2091:3: warning: statement with no effect

Correct these warnings by converting the defines into static inline
functions instead.

Signed-off-by: Kevin Winchester <kjwinchester@...il.com>
---
 include/linux/dmar.h |   19 +++++++++++++++----
 1 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/include/linux/dmar.h b/include/linux/dmar.h
index d7cecc9..f6fcece 100644
--- a/include/linux/dmar.h
+++ b/include/linux/dmar.h
@@ -176,11 +176,22 @@ static inline int set_msi_sid(struct irte *irte, struct pci_dev *dev)
 {
 	return 0;
 }
+static inline int irq_remapped(int irq)
+{
+	return 0;
+}
+static inline int enable_intr_remapping(int mode)
+{
+	return -1;
+}
+static inline void disable_intr_remapping(void)
+{
+}
+static inline int reenable_intr_remapping(int mode)
+{
+	return 0;
+}
 
-#define irq_remapped(irq)		(0)
-#define enable_intr_remapping(mode)	(-1)
-#define disable_intr_remapping()	(0)
-#define reenable_intr_remapping(mode)	(0)
 #define intr_remapping_enabled		(0)
 #endif
 
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ