Message ID | 20210818140651.17181-12-hch@lst.de |
---|---|
State | Superseded |
Headers | show |
Series | [01/11] ext4: simplify ext4_sb_read_encoding | expand |
On Wed, Aug 18, 2021 at 04:06:51PM +0200, Christoph Hellwig wrote: > The exported symbols in utf8-norm.c are not needed for normal > file system consumers, so move them to conditional _GPL exports > just for the selftest. Would it be better to use EXPORT_SYMBOL_NS_GPL()?
On Wed, Aug 18, 2021 at 03:56:59PM +0100, Matthew Wilcox wrote: > On Wed, Aug 18, 2021 at 04:06:51PM +0200, Christoph Hellwig wrote: > > The exported symbols in utf8-norm.c are not needed for normal > > file system consumers, so move them to conditional _GPL exports > > just for the selftest. > > Would it be better to use EXPORT_SYMBOL_NS_GPL()? Maybe. Even better would be the EXPORT_SYMBOL_FOR I've been prototyping for a while but which is still not ready.
diff --git a/fs/unicode/utf8-norm.c b/fs/unicode/utf8-norm.c index 829c7e2ad764..768f8ab448b8 100644 --- a/fs/unicode/utf8-norm.c +++ b/fs/unicode/utf8-norm.c @@ -17,7 +17,6 @@ int utf8version_is_supported(const struct unicode_map *um, unsigned int version) } return 0; } -EXPORT_SYMBOL(utf8version_is_supported); /* * UTF-8 valid ranges. @@ -407,7 +406,6 @@ ssize_t utf8nlen(const struct unicode_map *um, enum utf8_normalization n, } return ret; } -EXPORT_SYMBOL(utf8nlen); /* * Set up an utf8cursor for use by utf8byte(). @@ -442,7 +440,6 @@ int utf8ncursor(struct utf8cursor *u8c, const struct unicode_map *um, return -1; return 0; } -EXPORT_SYMBOL(utf8ncursor); /* * Get one byte from the normalized form of the string described by u8c. @@ -588,4 +585,10 @@ int utf8byte(struct utf8cursor *u8c) } } } -EXPORT_SYMBOL(utf8byte); + +#ifdef CONFIG_UNICODE_NORMALIZATION_SELFTEST_MODULE +EXPORT_SYMBOL_GPL(utf8version_is_supported); +EXPORT_SYMBOL_GPL(utf8nlen); +EXPORT_SYMBOL_GPL(utf8ncursor); +EXPORT_SYMBOL_GPL(utf8byte); +#endif
The exported symbols in utf8-norm.c are not needed for normal file system consumers, so move them to conditional _GPL exports just for the selftest. Signed-off-by: Christoph Hellwig <hch@lst.de> --- fs/unicode/utf8-norm.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)