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

From: Fabio Comolli
Date: Mon Nov 22 2010 - 16:36:57 EST


Reported-and-Tested-by: Fabio Comolli <fabio.comolli@xxxxxxxxx>

On Mon, Nov 22, 2010 at 9:48 PM, Randy Dunlap <randy.dunlap@xxxxxxxxxx> wrote:
> From: Randy Dunlap <randy.dunlap@xxxxxxxxxx>
>
> 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
>
> Signed-off-by: Randy Dunlap <randy.dunlap@xxxxxxxxxx>
> Reported-by: Fabio Comolli <fabio.comolli@xxxxxxxxx>
> ---
> Âinclude/linux/dmar.h | Â 17 ++++++++++++++---
> Â1 file changed, 14 insertions(+), 3 deletions(-)
>
> --- lnx-2637-rc3.orig/include/linux/dmar.h
> +++ lnx-2637-rc3/include/linux/dmar.h
> @@ -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
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/