summaryrefslogtreecommitdiffstats
path: root/fs/unicode/utf8n.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2021-09-15 09:00:00 +0200
committerGabriel Krisman Bertazi <krisman@collabora.com>2021-10-11 17:01:46 -0300
commit49bd03cc7e95cb78420305ca2f5ef67497b6fa80 (patch)
tree5fb64ae823accadc746d0e16dc290c8c4baa3cf8 /fs/unicode/utf8n.h
parentf3a9c82396006a5664f6e398d6928799d29de76e (diff)
downloadlinux-49bd03cc7e95cb78420305ca2f5ef67497b6fa80.tar.bz2
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/utf8n.h')
-rw-r--r--fs/unicode/utf8n.h14
1 files changed, 2 insertions, 12 deletions
diff --git a/fs/unicode/utf8n.h b/fs/unicode/utf8n.h
index 0acd530c2c79..85a7bebf6927 100644
--- a/fs/unicode/utf8n.h
+++ b/fs/unicode/utf8n.h
@@ -11,19 +11,9 @@
#include <linux/export.h>
#include <linux/string.h>
#include <linux/module.h>
+#include <linux/unicode.h>
-/* Encoding a unicode version number as a single unsigned int. */
-#define UNICODE_MAJ_SHIFT (16)
-#define UNICODE_MIN_SHIFT (8)
-
-#define UNICODE_AGE(MAJ, MIN, REV) \
- (((unsigned int)(MAJ) << UNICODE_MAJ_SHIFT) | \
- ((unsigned int)(MIN) << UNICODE_MIN_SHIFT) | \
- ((unsigned int)(REV)))
-
-/* Highest unicode version supported by the data tables. */
-extern int utf8version_is_supported(u8 maj, u8 min, u8 rev);
-extern int utf8version_latest(void);
+int utf8version_is_supported(unsigned int version);
/*
* Look for the correct const struct utf8data for a unicode version.