Skip to content

Commit

Permalink
dmar, x86: Use function stubs when CONFIG_INTR_REMAP is disabled
Browse files Browse the repository at this point in the history
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 <fabio.comolli@gmail.com>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: Yinghai Lu <yinghai@kernel.org>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
LKML-Reference: <20101122124834.74429004.randy.dunlap@oracle.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Randy Dunlap authored and Ingo Molnar committed Nov 26, 2010
1 parent 37db6c8 commit 4917b28
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions include/linux/dmar.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4917b28

Please sign in to comment.