Skip to content

Commit

Permalink
unicode: only export internal symbols for the selftests
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Christoph Hellwig authored and Gabriel Krisman Bertazi committed Oct 12, 2021
1 parent 2b3d047 commit e2a58d2
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions fs/unicode/utf8-norm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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().
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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

0 comments on commit e2a58d2

Please sign in to comment.