Skip to content

Commit

Permalink
unicode: remove the charset field from struct unicode_map
Browse files Browse the repository at this point in the history
It is hardcoded and only used for a f2fs sysfs file where it can be
hardcoded just as easily.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Gabriel Krisman Bertazi <krisman@collabora.com>
Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.com>
  • Loading branch information
Christoph Hellwig authored and Gabriel Krisman Bertazi committed Oct 11, 2021
1 parent 86e8057 commit a440943
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 6 deletions.
3 changes: 1 addition & 2 deletions fs/f2fs/sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,7 @@ static ssize_t encoding_show(struct f2fs_attr *a,
struct super_block *sb = sbi->sb;

if (f2fs_sb_has_casefold(sbi))
return snprintf(buf, PAGE_SIZE, "%s (%d.%d.%d)\n",
sb->s_encoding->charset,
return snprintf(buf, PAGE_SIZE, "UTF-8 (%d.%d.%d)\n",
(sb->s_encoding->version >> 16) & 0xff,
(sb->s_encoding->version >> 8) & 0xff,
sb->s_encoding->version & 0xff);
Expand Down
3 changes: 0 additions & 3 deletions fs/unicode/utf8-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -219,10 +219,7 @@ struct unicode_map *utf8_load(const char *version)
um = kzalloc(sizeof(struct unicode_map), GFP_KERNEL);
if (!um)
return ERR_PTR(-ENOMEM);

um->charset = "UTF-8";
um->version = unicode_version;

return um;
}
EXPORT_SYMBOL(utf8_load);
Expand Down
1 change: 0 additions & 1 deletion include/linux/unicode.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#include <linux/dcache.h>

struct unicode_map {
const char *charset;
int version;
};

Expand Down

0 comments on commit a440943

Please sign in to comment.