Skip to content

Commit e2a58d2

Browse files
Christoph Hellwigkrisman-at-collabora
authored andcommitted
unicode: only export internal symbols for the selftests
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> Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.com>
1 parent 2b3d047 commit e2a58d2

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

fs/unicode/utf8-norm.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ int utf8version_is_supported(const struct unicode_map *um, unsigned int version)
1717
}
1818
return 0;
1919
}
20-
EXPORT_SYMBOL(utf8version_is_supported);
2120

2221
/*
2322
* UTF-8 valid ranges.
@@ -407,7 +406,6 @@ ssize_t utf8nlen(const struct unicode_map *um, enum utf8_normalization n,
407406
}
408407
return ret;
409408
}
410-
EXPORT_SYMBOL(utf8nlen);
411409

412410
/*
413411
* Set up an utf8cursor for use by utf8byte().
@@ -442,7 +440,6 @@ int utf8ncursor(struct utf8cursor *u8c, const struct unicode_map *um,
442440
return -1;
443441
return 0;
444442
}
445-
EXPORT_SYMBOL(utf8ncursor);
446443

447444
/*
448445
* Get one byte from the normalized form of the string described by u8c.
@@ -588,4 +585,10 @@ int utf8byte(struct utf8cursor *u8c)
588585
}
589586
}
590587
}
591-
EXPORT_SYMBOL(utf8byte);
588+
589+
#ifdef CONFIG_UNICODE_NORMALIZATION_SELFTEST_MODULE
590+
EXPORT_SYMBOL_GPL(utf8version_is_supported);
591+
EXPORT_SYMBOL_GPL(utf8nlen);
592+
EXPORT_SYMBOL_GPL(utf8ncursor);
593+
EXPORT_SYMBOL_GPL(utf8byte);
594+
#endif

0 commit comments

Comments
 (0)