diff options
author | Winston Wen <wentao@uniontech.com> | 2023-07-24 04:10:56 +0200 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2023-07-25 07:30:02 +0200 |
commit | c1ed39ec116272935528ca9b348b8ee79b0791da (patch) | |
tree | 5afa2eaa4b3905e8a02c1fff0d086db816f87c15 /fs | |
parent | Linux 6.5-rc3 (diff) | |
download | linux-c1ed39ec116272935528ca9b348b8ee79b0791da.tar.xz linux-c1ed39ec116272935528ca9b348b8ee79b0791da.zip |
fs/nls: make load_nls() take a const parameter
load_nls() take a char * parameter, use it to find nls module in list or
construct the module name to load it.
This change make load_nls() take a const parameter, so we don't need do
some cast like this:
ses->local_nls = load_nls((char *)ctx->local_nls->charset);
Suggested-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Winston Wen <wentao@uniontech.com>
Reviewed-by: Paulo Alcantara <pc@manguebit.com>
Reviewed-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/nls/nls_base.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/nls/nls_base.c b/fs/nls/nls_base.c index 52ccd34b1e79..a026dbd3593f 100644 --- a/fs/nls/nls_base.c +++ b/fs/nls/nls_base.c @@ -272,7 +272,7 @@ int unregister_nls(struct nls_table * nls) return -EINVAL; } -static struct nls_table *find_nls(char *charset) +static struct nls_table *find_nls(const char *charset) { struct nls_table *nls; spin_lock(&nls_lock); @@ -288,7 +288,7 @@ static struct nls_table *find_nls(char *charset) return nls; } -struct nls_table *load_nls(char *charset) +struct nls_table *load_nls(const char *charset) { return try_then_request_module(find_nls(charset), "nls_%s", charset); } |