diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2024-11-22 20:50:55 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2024-11-22 20:50:55 -0800 |
commit | 060fc106b6854d3289d838ac3c98eb17afb261d7 (patch) | |
tree | 586ed45526f9d1daa0af349624b17c9c1f74817b | |
parent | 980f8f8fd4228839f3d811521a27d4f9c2ead123 (diff) | |
parent | 6b56a63d286f6f57066c4b5648d8fbec9510beae (diff) |
Merge tag 'unicode-next-6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/krisman/unicode
Pull unicode updates from Gabriel Krisman Bertazi:
- constify a read-only struct (Thomas Weißschuh)
- fix the error path of unicode_load, avoiding a possible kernel oops
if it fails to find the unicode module (André Almeida)
- documentation fix, updating a filename in the README (Gan Jie)
- add the link of my tree to MAINTAINERS (André Almeida)
* tag 'unicode-next-6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/krisman/unicode:
MAINTAINERS: Add Unicode tree
unicode: change the reference of database file
unicode: Fix utf8_load() error path
unicode: constify utf8 data table
-rw-r--r-- | MAINTAINERS | 1 | ||||
-rw-r--r-- | fs/unicode/README.utf8data | 8 | ||||
-rw-r--r-- | fs/unicode/mkutf8data.c | 4 | ||||
-rw-r--r-- | fs/unicode/utf8-core.c | 2 | ||||
-rw-r--r-- | fs/unicode/utf8data.c_shipped | 2 | ||||
-rw-r--r-- | fs/unicode/utf8n.h | 2 |
6 files changed, 10 insertions, 9 deletions
diff --git a/MAINTAINERS b/MAINTAINERS index cd1fb65cce1b..e40e1220c733 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -23925,6 +23925,7 @@ UNICODE SUBSYSTEM M: Gabriel Krisman Bertazi <krisman@kernel.org> L: linux-fsdevel@vger.kernel.org S: Supported +T: git git://git.kernel.org/pub/scm/linux/kernel/git/krisman/unicode.git F: fs/unicode/ UNIFDEF diff --git a/fs/unicode/README.utf8data b/fs/unicode/README.utf8data index c73786807d3b..f75567e28138 100644 --- a/fs/unicode/README.utf8data +++ b/fs/unicode/README.utf8data @@ -1,4 +1,4 @@ -The utf8data.h file in this directory is generated from the Unicode +The utf8data.c file in this directory is generated from the Unicode Character Database for version 12.1.0 of the Unicode standard. The full set of files can be found here: @@ -45,13 +45,13 @@ Then, build under fs/unicode/ with REGENERATE_UTF8DATA=1: make REGENERATE_UTF8DATA=1 fs/unicode/ -After sanity checking the newly generated utf8data.h file (the +After sanity checking the newly generated utf8data.c file (the version generated from the 12.1.0 UCD should be 4,109 lines long, and have a total size of 324k) and/or comparing it with the older version -of utf8data.h_shipped, rename it to utf8data.h_shipped. +of utf8data.c_shipped, rename it to utf8data.c_shipped. If you are a kernel developer updating to a newer version of the Unicode Character Database, please update this README.utf8data file with the version of the UCD that was used, the md5sum and sha1sums of -the *.txt files, before checking in the new versions of the utf8data.h +the *.txt files, before checking in the new versions of the utf8data.c and README.utf8data files. diff --git a/fs/unicode/mkutf8data.c b/fs/unicode/mkutf8data.c index b2bd08250c7a..6b095dd32e0f 100644 --- a/fs/unicode/mkutf8data.c +++ b/fs/unicode/mkutf8data.c @@ -36,7 +36,7 @@ #define FOLD_NAME "CaseFolding.txt" #define NORM_NAME "NormalizationCorrections.txt" #define TEST_NAME "NormalizationTest.txt" -#define UTF8_NAME "utf8data.h" +#define UTF8_NAME "utf8data.c" const char *age_name = AGE_NAME; const char *ccc_name = CCC_NAME; @@ -3269,7 +3269,7 @@ static void write_file(void) } fprintf(file, "};\n"); fprintf(file, "\n"); - fprintf(file, "struct utf8data_table utf8_data_table = {\n"); + fprintf(file, "const struct utf8data_table utf8_data_table = {\n"); fprintf(file, "\t.utf8agetab = utf8agetab,\n"); fprintf(file, "\t.utf8agetab_size = ARRAY_SIZE(utf8agetab),\n"); fprintf(file, "\n"); diff --git a/fs/unicode/utf8-core.c b/fs/unicode/utf8-core.c index 7f7cb14e01ce..6fc9ab8667e6 100644 --- a/fs/unicode/utf8-core.c +++ b/fs/unicode/utf8-core.c @@ -198,7 +198,7 @@ struct unicode_map *utf8_load(unsigned int version) return um; out_symbol_put: - symbol_put(um->tables); + symbol_put(utf8_data_table); out_free_um: kfree(um); return ERR_PTR(-EINVAL); diff --git a/fs/unicode/utf8data.c_shipped b/fs/unicode/utf8data.c_shipped index ac2da4ba2dc0..ef15d52900d0 100644 --- a/fs/unicode/utf8data.c_shipped +++ b/fs/unicode/utf8data.c_shipped @@ -4096,7 +4096,7 @@ static const unsigned char utf8data[64080] = { 0x80,0xcf,0x86,0x85,0x84,0xcf,0x86,0xcf,0x06,0x02,0x00,0x00,0x00,0x00,0x00,0x00 }; -struct utf8data_table utf8_data_table = { +const struct utf8data_table utf8_data_table = { .utf8agetab = utf8agetab, .utf8agetab_size = ARRAY_SIZE(utf8agetab), diff --git a/fs/unicode/utf8n.h b/fs/unicode/utf8n.h index bd00d587747a..fc703aa4b28e 100644 --- a/fs/unicode/utf8n.h +++ b/fs/unicode/utf8n.h @@ -78,6 +78,6 @@ struct utf8data_table { const unsigned char *utf8data; }; -extern struct utf8data_table utf8_data_table; +extern const struct utf8data_table utf8_data_table; #endif /* UTF8NORM_H */ |