diff options
author | Christoph Hellwig <hch@lst.de> | 2021-09-15 10:00:00 +0300 |
---|---|---|
committer | Gabriel Krisman Bertazi <krisman@collabora.com> | 2021-10-11 23:01:46 +0300 |
commit | 49bd03cc7e95cb78420305ca2f5ef67497b6fa80 (patch) | |
tree | 5fb64ae823accadc746d0e16dc290c8c4baa3cf8 /fs/unicode/utf8-norm.c | |
parent | f3a9c82396006a5664f6e398d6928799d29de76e (diff) | |
download | linux-49bd03cc7e95cb78420305ca2f5ef67497b6fa80.tar.xz |
unicode: pass a UNICODE_AGE() tripple to utf8_load
Don't bother with pointless string parsing when the caller can just pass
the version in the format that the core expects. Also remove the
fallback to the latest version that none of the callers actually uses.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.com>
Diffstat (limited to 'fs/unicode/utf8-norm.c')
-rw-r--r-- | fs/unicode/utf8-norm.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/fs/unicode/utf8-norm.c b/fs/unicode/utf8-norm.c index 1d2d2e5b906a..12abf89ae6ec 100644 --- a/fs/unicode/utf8-norm.c +++ b/fs/unicode/utf8-norm.c @@ -15,13 +15,12 @@ struct utf8data { #include "utf8data.h" #undef __INCLUDED_FROM_UTF8NORM_C__ -int utf8version_is_supported(u8 maj, u8 min, u8 rev) +int utf8version_is_supported(unsigned int version) { int i = ARRAY_SIZE(utf8agetab) - 1; - unsigned int sb_utf8version = UNICODE_AGE(maj, min, rev); while (i >= 0 && utf8agetab[i] != 0) { - if (sb_utf8version == utf8agetab[i]) + if (version == utf8agetab[i]) return 1; i--; } @@ -29,12 +28,6 @@ int utf8version_is_supported(u8 maj, u8 min, u8 rev) } EXPORT_SYMBOL(utf8version_is_supported); -int utf8version_latest(void) -{ - return utf8vers; -} -EXPORT_SYMBOL(utf8version_latest); - /* * UTF-8 valid ranges. * |