mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] sections.h: dereference_function_descriptor() returns void pointer
@ 2020-08-11 10:30 Helge Deller
  0 siblings, 0 replies; only message in thread
From: Helge Deller @ 2020-08-11 10:30 UTC (permalink / raw)
  To: Linux Kernel, Arnd Bergmann, linux-arch

The function dereference_function_descriptor() takes on hppa64, ppc64
and ia64 a pointer to a function descriptor and returns a (void) pointer
to the dereferenced function.
To make cross-arch coding easier, on all other architectures the
dereference_function_descriptor() macro should return a void pointer
too.

Signed-off-by: Helge Deller <deller@gmx.de>

diff --git a/include/asm-generic/sections.h b/include/asm-generic/sections.h
index 66397ed10acb..d16302d3eb59 100644
--- a/include/asm-generic/sections.h
+++ b/include/asm-generic/sections.h
@@ -60,8 +60,8 @@ extern __visible const void __nosave_begin, __nosave_end;

 /* Function descriptor handling (if any).  Override in asm/sections.h */
 #ifndef dereference_function_descriptor
-#define dereference_function_descriptor(p) (p)
-#define dereference_kernel_function_descriptor(p) (p)
+#define dereference_function_descriptor(p) ((void *)(p))
+#define dereference_kernel_function_descriptor(p) ((void *)(p))
 #endif

 /* random extra sections (if any).  Override

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-08-11 10:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-11 10:30 [PATCH] sections.h: dereference_function_descriptor() returns void pointer Helge Deller

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

all inboxes | Powered by JetHome®