Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Vivekanandan, Balasubramani" <balasubramani.vivekanandan@intel.com>
To: Lucas De Marchi <lucas.demarchi@intel.com>,
	<intel-xe@lists.freedesktop.org>
Cc: Riana Tauro <riana.tauro@intel.com>, kernel test robot <lkp@intel.com>
Subject: Re: [PATCH] drm/xe: Fix build with CONFIG_MODULES=n
Date: Fri, 19 Sep 2025 12:30:14 +0530	[thread overview]
Message-ID: <aMz_fi-OYDbyWwwV@bvivekan-mob1> (raw)
In-Reply-To: <20250912-fix-nomodule-build-v1-1-d11b70a92516@intel.com>

On 12.09.2025 14:54, Lucas De Marchi wrote:
> 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>

LGTM.

Reviewed-by: Balasubramani Vivekanandan <balasubramani.vivekanandan@intel.com>

Regards,
Bala

> ---
>  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);
> 
> 
> 

      parent reply	other threads:[~2025-09-19  7:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 ` Vivekanandan, Balasubramani [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aMz_fi-OYDbyWwwV@bvivekan-mob1 \
    --to=balasubramani.vivekanandan@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=lkp@intel.com \
    --cc=lucas.demarchi@intel.com \
    --cc=riana.tauro@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox