Skip to content

Commit

Permalink
x86/asmlinkage: Fix warning in xen asmlinkage change
Browse files Browse the repository at this point in the history
Current code uses asmlinkage for functions without arguments.
This adds an implicit regparm(0) which creates a warning
when assigning the function to pointers.

Use __visible for the functions without arguments.
This avoids having to add regparm(0) to function pointers.
Since they have no arguments it does not make any difference.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Link: http://lkml.kernel.org/r/1377115662-4865-1-git-send-email-andi@firstfloor.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
  • Loading branch information
Andi Kleen authored and Ingo Molnar committed Aug 22, 2013
1 parent 28596b6 commit eb86b5f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions arch/x86/xen/xen-ops.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ static inline void __init xen_init_apic(void)
/* Declare an asm function, along with symbols needed to make it
inlineable */
#define DECL_ASM(ret, name, ...) \
asmlinkage ret name(__VA_ARGS__); \
__visible ret name(__VA_ARGS__); \
extern char name##_end[] __visible; \
extern char name##_reloc[] __visible

Expand All @@ -115,11 +115,11 @@ DECL_ASM(unsigned long, xen_save_fl_direct, void);
DECL_ASM(void, xen_restore_fl_direct, unsigned long);

/* These are not functions, and cannot be called normally */
asmlinkage void xen_iret(void);
asmlinkage void xen_sysexit(void);
asmlinkage void xen_sysret32(void);
asmlinkage void xen_sysret64(void);
asmlinkage void xen_adjust_exception_frame(void);
__visible void xen_iret(void);
__visible void xen_sysexit(void);
__visible void xen_sysret32(void);
__visible void xen_sysret64(void);
__visible void xen_adjust_exception_frame(void);

extern int xen_panic_handler_init(void);

Expand Down

0 comments on commit eb86b5f

Please sign in to comment.