LKML Archive on
help / color / mirror / Atom feed
* [PATCH -next] drm/i915: fix i915_globals_exit() section mismatch error
@ 2021-08-04 20:41 Randy Dunlap
  2021-08-04 21:03 ` Jason Ekstrand
  0 siblings, 1 reply; 2+ messages in thread
From: Randy Dunlap @ 2021-08-04 20:41 UTC (permalink / raw)
  To: linux-kernel
  Cc: Randy Dunlap, Jason Ekstrand, Daniel Vetter, Rodrigo Vivi,
	Jani Nikula, Joonas Lahtinen, intel-gfx, dri-devel

Fix modpost Section mismatch error in i915_globals_exit().
Since both an __init function and an __exit function can call
i915_globals_exit(), any function that i915_globals_exit() calls
should not be marked as __init or __exit. I.e., it needs to be
available for either of them.

WARNING: modpost: vmlinux.o(.text+0x8b796a): Section mismatch in reference from the function i915_globals_exit() to the function .exit.text:__i915_globals_flush()
The function i915_globals_exit() references a function in an exit section.
Often the function __i915_globals_flush() has valid usage outside the exit section
and the fix is to remove the __exit annotation of __i915_globals_flush.

ERROR: modpost: Section mismatches detected.

Fixes: 1354d830cb8f ("drm/i915: Call i915_globals_exit() if pci_register_device() fails")
Signed-off-by: Randy Dunlap <>
Cc: Jason Ekstrand <>
Cc: Daniel Vetter <>
Cc: Rodrigo Vivi <>
Cc: Jani Nikula <>
Cc: Joonas Lahtinen <>
 drivers/gpu/drm/i915/i915_globals.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- linext-2021-0804.orig/drivers/gpu/drm/i915/i915_globals.c
+++ linext-2021-0804/drivers/gpu/drm/i915/i915_globals.c
@@ -138,7 +138,7 @@ void i915_globals_unpark(void)
-static void __exit __i915_globals_flush(void)
+static void  __i915_globals_flush(void)
 	atomic_inc(&active); /* skip shrinking */

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

end of thread, other threads:[~2021-08-04 21:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-04 20:41 [PATCH -next] drm/i915: fix i915_globals_exit() section mismatch error Randy Dunlap
2021-08-04 21:03 ` Jason Ekstrand

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).