mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] x86, asmlinkage: Fix warning in xen asmlinkage change v2
@ 2013-08-21 20:07 Andi Kleen
  2013-08-22  7:21 ` [tip:x86/asmlinkage] x86/asmlinkage: Fix warning in xen asmlinkage change tip-bot for Andi Kleen
  0 siblings, 1 reply; 2+ messages in thread
From: Andi Kleen @ 2013-08-21 20:07 UTC (permalink / raw)
  To: x86; +Cc: linux-kernel, Andi Kleen

From: Andi Kleen <ak@linux.intel.com>

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>
---
 arch/x86/xen/xen-ops.h | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/x86/xen/xen-ops.h b/arch/x86/xen/xen-ops.h
index d380213..95f8c61 100644
--- a/arch/x86/xen/xen-ops.h
+++ b/arch/x86/xen/xen-ops.h
@@ -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
 
@@ -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);
 
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [tip:x86/asmlinkage] x86/asmlinkage: Fix warning in xen asmlinkage change
  2013-08-21 20:07 [PATCH] x86, asmlinkage: Fix warning in xen asmlinkage change v2 Andi Kleen
@ 2013-08-22  7:21 ` tip-bot for Andi Kleen
  0 siblings, 0 replies; 2+ messages in thread
From: tip-bot for Andi Kleen @ 2013-08-22  7:21 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, ak, tglx

Commit-ID:  eb86b5fd505cb97743d84226140cf247d91a2f03
Gitweb:     http://git.kernel.org/tip/eb86b5fd505cb97743d84226140cf247d91a2f03
Author:     Andi Kleen <ak@linux.intel.com>
AuthorDate: Wed, 21 Aug 2013 13:07:42 -0700
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Thu, 22 Aug 2013 09:17:19 +0200

x86/asmlinkage: Fix warning in xen asmlinkage change

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>
---
 arch/x86/xen/xen-ops.h | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/x86/xen/xen-ops.h b/arch/x86/xen/xen-ops.h
index d380213..95f8c61 100644
--- a/arch/x86/xen/xen-ops.h
+++ b/arch/x86/xen/xen-ops.h
@@ -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
 
@@ -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);
 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-08-22  7:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-21 20:07 [PATCH] x86, asmlinkage: Fix warning in xen asmlinkage change v2 Andi Kleen
2013-08-22  7:21 ` [tip:x86/asmlinkage] x86/asmlinkage: Fix warning in xen asmlinkage change tip-bot for Andi Kleen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome