Skip to contentSkip to conversation

2.6.37-rc3 - io-apic.c and apic.c warnings

PATCH In review Fabio Comolli 2 participants 4 messages Nov 22, 2010 – Nov 26, 2010

lore
Share & tools
lore
#0 lore raw

Compiling a freshly pulled Linus' git:

arch/x86/kernel/apic/io_apic.c: In function ‘ack_apic_level’:
arch/x86/kernel/apic/io_apic.c:2433:19: warning: unused variable ‘desc

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

#1 lore raw

PATCH 1/1 dmar: use function stubs when CONFIG_INTR_REMAP is disabled

From: Randy Dunlap <[email protected]>

The stubs for CONFIG_INTR_REMAP disabled need to be functions instead of values to eliminate build warnings.

arch/x86/kernel/apic/apic.c: In function 'lapic_suspend':
arch/x86/kernel/apic/apic.c:2060:3: warning: statement with no effect arch/x86/kernel/apic/apic.c: In function 'lapic_resume':
arch/x86/kernel/apic/apic.c:2137:3: warning: statement with no effect

---
 include/linux/dmar.h |   17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)
include/linux/dmar.h +14 -3
@@ -175,10 +175,21 @@ static inline int set_msi_sid(struct irt
 	return 0;
 }
 
-#define enable_intr_remapping(mode)	(-1)
-#define disable_intr_remapping()	(0)
-#define reenable_intr_remapping(mode)	(0)
 #define intr_remapping_enabled		(0)
+
+static inline int enable_intr_remapping(int eim)
+{
+	return -1;
+}
+
+static inline void disable_intr_remapping(void)
+{
+}
+
+static inline int reenable_intr_remapping(int eim)
+{
+	return 0;
+}
 #endif
 
 /* Can't use the common MSI interrupt functions
#2 lore raw

Re: [PATCH] dmar: use function stubs when CONFIG_INTR_REMAP is disabled

Reported-and-Tested-by Fabio Comolli <[email protected]>
Quoted 44 lines · Randy Dunlap

From: Randy Dunlap <[email protected]>

The stubs for CONFIG_INTR_REMAP disabled need to be functions instead of values to eliminate build warnings.

arch/x86/kernel/apic/apic.c: In function 'lapic_suspend':
arch/x86/kernel/apic/apic.c:2060:3: warning: statement with no effect arch/x86/kernel/apic/apic.c: In function 'lapic_resume':
arch/x86/kernel/apic/apic.c:2137:3: warning: statement with no effect

---
 include/linux/dmar.h |   17 ++++++++++++++---

 1 file changed, 14 insertions(+), 3 deletions(-)
include/linux/dmar.h +14 -3
@@ -175,10 +175,21 @@ static inline int set_msi_sid(struct irt
        return 0;
  }
 
-#define enable_intr_remapping(mode)    (-1)
-#define disable_intr_remapping()       (0)
-#define reenable_intr_remapping(mode)  (0)
  #define intr_remapping_enabled         (0)
+
+static inline int enable_intr_remapping(int eim)
+{
+       return -1;
+}
+
+static inline void disable_intr_remapping(void)
+{
+}
+
+static inline int reenable_intr_remapping(int eim)
+{
+       return 0;
+}
  #endif
 
  /* Can't use the common MSI interrupt functions
#3 lore raw

[tip:x86/urgent] dmar, x86: Use function stubs when CONFIG_INTR_REMAP is disabled

In reply to Randy Dunlap
Commit-ID:  4917b284db8607e414c334317b7d15239854d39c
Gitweb:     http://git.kernel.org/tip/4917b284db8607e414c334317b7d15239854d39c
Author:     Randy Dunlap <[email protected]>
AuthorDate: Mon, 22 Nov 2010 12:48:34 -0800
Committer:  Ingo Molnar <[email protected]>
CommitDate: Fri, 26 Nov 2010 09:57:36 +0100

dmar, x86: Use function stubs when CONFIG_INTR_REMAP is disabled

The stubs for CONFIG_INTR_REMAP disabled need to be functions instead of values to eliminate build warnings.

arch/x86/kernel/apic/apic.c: In function 'lapic_suspend':
arch/x86/kernel/apic/apic.c:2060:3: warning: statement with no effect arch/x86/kernel/apic/apic.c: In function 'lapic_resume':
arch/x86/kernel/apic/apic.c:2137:3: warning: statement with no effect

Reported-and-Tested-by Fabio Comolli <[email protected]>
Cc Suresh Siddha <[email protected]>
Cc Yinghai Lu <[email protected]>
Cc David Woodhouse <[email protected]>
Cc Jesse Barnes <[email protected]>

LKML-Reference: <[email protected]>

---
 include/linux/dmar.h |   17 ++++++++++++++---
 1 files changed, 14 insertions(+), 3 deletions(-)
include/linux/dmar.h +14 -3
index a7d9dc2..7b776d7 100644
@@ -175,10 +175,21 @@ static inline int set_msi_sid(struct irte *irte, struct pci_dev *dev)
 	return 0;
 }
 
-#define enable_intr_remapping(mode)	(-1)
-#define disable_intr_remapping()	(0)
-#define reenable_intr_remapping(mode)	(0)
 #define intr_remapping_enabled		(0)
+
+static inline int enable_intr_remapping(int eim)
+{
+	return -1;
+}
+
+static inline void disable_intr_remapping(void)
+{
+}
+
+static inline int reenable_intr_remapping(int eim)
+{
+	return 0;
+}
 #endif
 
 /* Can't use the common MSI interrupt functions