[PATCH v3 2/9] lib/ucs2_string: Suppress modinfo when __DISABLE_EXPORTS is set
From: Ard Biesheuvel
Date: Wed Sep 16 2026 - 10:52:29 EST
From: Ard Biesheuvel <ardb@xxxxxxxxxx>
Allow the UCS-2 string library to be reused in the EFI stub, by
suppressing the modinfo data that is usually emitted so that the library
can be built as a module.
Signed-off-by: Ard Biesheuvel <ardb@xxxxxxxxxx>
---
lib/ucs2_string.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/ucs2_string.c b/lib/ucs2_string.c
index d66fef9c9b81..f75fb4f7961a 100644
--- a/lib/ucs2_string.c
+++ b/lib/ucs2_string.c
@@ -165,5 +165,7 @@ ucs2_as_utf8(u8 *dest, const ucs2_char_t *src, unsigned long maxlength)
}
EXPORT_SYMBOL(ucs2_as_utf8);
+#ifndef __DISABLE_EXPORTS
MODULE_DESCRIPTION("UCS2 string handling");
MODULE_LICENSE("GPL v2");
+#endif
--
2.55.0.1032.g73a4cd73de-goog