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 <[email protected]>
---
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