Skip to content

Commit 060fc10

Browse files
committed
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
2 parents 980f8f8 + 6b56a63 commit 060fc10

File tree

6 files changed

+10
-9
lines changed

6 files changed

+10
-9
lines changed

MAINTAINERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23925,6 +23925,7 @@ UNICODE SUBSYSTEM
2392523925
M: Gabriel Krisman Bertazi <[email protected]>
2392623926
2392723927
S: Supported
23928+
T: git git://git.kernel.org/pub/scm/linux/kernel/git/krisman/unicode.git
2392823929
F: fs/unicode/
2392923930

2393023931
UNIFDEF

fs/unicode/README.utf8data

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
The utf8data.h file in this directory is generated from the Unicode
1+
The utf8data.c file in this directory is generated from the Unicode
22
Character Database for version 12.1.0 of the Unicode standard.
33

44
The full set of files can be found here:
@@ -45,13 +45,13 @@ Then, build under fs/unicode/ with REGENERATE_UTF8DATA=1:
4545

4646
make REGENERATE_UTF8DATA=1 fs/unicode/
4747

48-
After sanity checking the newly generated utf8data.h file (the
48+
After sanity checking the newly generated utf8data.c file (the
4949
version generated from the 12.1.0 UCD should be 4,109 lines long, and
5050
have a total size of 324k) and/or comparing it with the older version
51-
of utf8data.h_shipped, rename it to utf8data.h_shipped.
51+
of utf8data.c_shipped, rename it to utf8data.c_shipped.
5252

5353
If you are a kernel developer updating to a newer version of the
5454
Unicode Character Database, please update this README.utf8data file
5555
with the version of the UCD that was used, the md5sum and sha1sums of
56-
the *.txt files, before checking in the new versions of the utf8data.h
56+
the *.txt files, before checking in the new versions of the utf8data.c
5757
and README.utf8data files.

fs/unicode/mkutf8data.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
#define FOLD_NAME "CaseFolding.txt"
3737
#define NORM_NAME "NormalizationCorrections.txt"
3838
#define TEST_NAME "NormalizationTest.txt"
39-
#define UTF8_NAME "utf8data.h"
39+
#define UTF8_NAME "utf8data.c"
4040

4141
const char *age_name = AGE_NAME;
4242
const char *ccc_name = CCC_NAME;
@@ -3269,7 +3269,7 @@ static void write_file(void)
32693269
}
32703270
fprintf(file, "};\n");
32713271
fprintf(file, "\n");
3272-
fprintf(file, "struct utf8data_table utf8_data_table = {\n");
3272+
fprintf(file, "const struct utf8data_table utf8_data_table = {\n");
32733273
fprintf(file, "\t.utf8agetab = utf8agetab,\n");
32743274
fprintf(file, "\t.utf8agetab_size = ARRAY_SIZE(utf8agetab),\n");
32753275
fprintf(file, "\n");

fs/unicode/utf8-core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ struct unicode_map *utf8_load(unsigned int version)
198198
return um;
199199

200200
out_symbol_put:
201-
symbol_put(um->tables);
201+
symbol_put(utf8_data_table);
202202
out_free_um:
203203
kfree(um);
204204
return ERR_PTR(-EINVAL);

fs/unicode/utf8data.c_shipped

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4096,7 +4096,7 @@ static const unsigned char utf8data[64080] = {
40964096
0x80,0xcf,0x86,0x85,0x84,0xcf,0x86,0xcf,0x06,0x02,0x00,0x00,0x00,0x00,0x00,0x00
40974097
};
40984098

4099-
struct utf8data_table utf8_data_table = {
4099+
const struct utf8data_table utf8_data_table = {
41004100
.utf8agetab = utf8agetab,
41014101
.utf8agetab_size = ARRAY_SIZE(utf8agetab),
41024102

fs/unicode/utf8n.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,6 @@ struct utf8data_table {
7878
const unsigned char *utf8data;
7979
};
8080

81-
extern struct utf8data_table utf8_data_table;
81+
extern const struct utf8data_table utf8_data_table;
8282

8383
#endif /* UTF8NORM_H */

0 commit comments

Comments
 (0)