[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210915070006.954653-9-hch@lst.de>
Date: Wed, 15 Sep 2021 09:00:03 +0200
From: Christoph Hellwig <hch@....de>
To: Gabriel Krisman Bertazi <krisman@...labora.com>
Cc: Shreeya Patel <shreeya.patel@...labora.com>,
linux-fsdevel@...r.kernel.org, linux-ext4@...r.kernel.org,
linux-f2fs-devel@...ts.sourceforge.net
Subject: [PATCH 08/11] unicode: move utf8cursor to utf8-selftest.c
Only used by the tests, so no need to keep it in the core.
Signed-off-by: Christoph Hellwig <hch@....de>
---
fs/unicode/utf8-norm.c | 16 ----------------
fs/unicode/utf8-selftest.c | 6 ++++++
fs/unicode/utf8n.h | 2 --
3 files changed, 6 insertions(+), 18 deletions(-)
diff --git a/fs/unicode/utf8-norm.c b/fs/unicode/utf8-norm.c
index 348d6e97553f2..1ac90fa00070d 100644
--- a/fs/unicode/utf8-norm.c
+++ b/fs/unicode/utf8-norm.c
@@ -456,22 +456,6 @@ int utf8ncursor(struct utf8cursor *u8c, const struct utf8data *data,
}
EXPORT_SYMBOL(utf8ncursor);
-/*
- * Set up an utf8cursor for use by utf8byte().
- *
- * u8c : pointer to cursor.
- * data : const struct utf8data to use for normalization.
- * s : NUL-terminated string.
- *
- * Returns -1 on error, 0 on success.
- */
-int utf8cursor(struct utf8cursor *u8c, const struct utf8data *data,
- const char *s)
-{
- return utf8ncursor(u8c, data, s, (unsigned int)-1);
-}
-EXPORT_SYMBOL(utf8cursor);
-
/*
* Get one byte from the normalized form of the string described by u8c.
*
diff --git a/fs/unicode/utf8-selftest.c b/fs/unicode/utf8-selftest.c
index 80fb7c75acb28..04628b50351d3 100644
--- a/fs/unicode/utf8-selftest.c
+++ b/fs/unicode/utf8-selftest.c
@@ -165,6 +165,12 @@ static ssize_t utf8len(const struct utf8data *data, const char *s)
return utf8nlen(data, s, (size_t)-1);
}
+static int utf8cursor(struct utf8cursor *u8c, const struct utf8data *data,
+ const char *s)
+{
+ return utf8ncursor(u8c, data, s, (unsigned int)-1);
+}
+
static void check_utf8_nfdi(void)
{
int i;
diff --git a/fs/unicode/utf8n.h b/fs/unicode/utf8n.h
index 41182e5464dfa..736b6460a38cb 100644
--- a/fs/unicode/utf8n.h
+++ b/fs/unicode/utf8n.h
@@ -65,8 +65,6 @@ struct utf8cursor {
* Returns 0 on success.
* Returns -1 on failure.
*/
-extern int utf8cursor(struct utf8cursor *u8c, const struct utf8data *data,
- const char *s);
extern int utf8ncursor(struct utf8cursor *u8c, const struct utf8data *data,
const char *s, size_t len);
--
2.30.2
Powered by blists - more mailing lists