Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/xe: Fix build with CONFIG_MODULES=n
@ 2025-09-12 21:54 Lucas De Marchi
  2025-09-12 22:00 ` ✗ CI.checkpatch: warning for " Patchwork
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Lucas De Marchi @ 2025-09-12 21:54 UTC (permalink / raw)
  To: intel-xe; +Cc: Lucas De Marchi, Riana Tauro, kernel test robot

When building with CONFIG_MODULES=n, the __exit functions are dropped.
However our init functions may call them for error handling, so they are
not good candidates for the exit sections.

Fix this error reported by 0day:

	ld.lld: error: relocation refers to a symbol in a discarded section: xe_configfs_exit
	>>> defined in vmlinux.a(drivers/gpu/drm/xe/xe_configfs.o)
	>>> referenced by xe_module.c
	>>>               drivers/gpu/drm/xe/xe_module.o:(init_funcs) in archive vmlinux.a

This is the only exit function using __exit. Drop it to fix the build.

Cc: Riana Tauro <riana.tauro@intel.com>
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202506092221.1FmUQmI8-lkp@intel.com/
Fixes: 16280ded45fb ("drm/xe: Add configfs to enable survivability mode")
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
---
 drivers/gpu/drm/xe/xe_configfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/xe/xe_configfs.c b/drivers/gpu/drm/xe/xe_configfs.c
index e52808e3199fc..392550844404d 100644
--- a/drivers/gpu/drm/xe/xe_configfs.c
+++ b/drivers/gpu/drm/xe/xe_configfs.c
@@ -618,7 +618,7 @@ int __init xe_configfs_init(void)
 	return 0;
 }
 
-void __exit xe_configfs_exit(void)
+void xe_configfs_exit(void)
 {
 	configfs_unregister_subsystem(&xe_configfs);
 	mutex_destroy(&xe_configfs.su_mutex);




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

end of thread, other threads:[~2025-09-19  7:02 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-12 21:54 [PATCH] drm/xe: Fix build with CONFIG_MODULES=n Lucas De Marchi
2025-09-12 22:00 ` ✗ CI.checkpatch: warning for " Patchwork
2025-09-12 22:02 ` ✓ CI.KUnit: success " Patchwork
2025-09-12 22:51 ` ✓ Xe.CI.BAT: " Patchwork
2025-09-13  0:53 ` ✗ Xe.CI.Full: failure " Patchwork
2025-09-19  7:00 ` [PATCH] " Vivekanandan, Balasubramani

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