lkml.org 
[lkml]   [2010]   [Nov]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] dmar: use function stubs when CONFIG_INTR_REMAP is disabled
From
Reported-and-Tested-by: Fabio Comolli <fabio.comolli@gmail.com>

On Mon, Nov 22, 2010 at 9:48 PM, Randy Dunlap <randy.dunlap@oracle.com> wrote:
> From: Randy Dunlap <randy.dunlap@oracle.com>
>
> 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@oracle.com>
> Reported-by: Fabio Comolli <fabio.comolli@gmail.com>
> ---
>  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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2010-11-22 22:39    [W:0.052 / U:1.284 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site