Linux Modules
 help / color / mirror / Atom feed
* linux-next: build failure after merge of the cifs tree
@ 2023-07-20  0:35 Stephen Rothwell
  2023-07-20  0:47 ` Steve French
  0 siblings, 1 reply; 4+ messages in thread
From: Stephen Rothwell @ 2023-07-20  0:35 UTC (permalink / raw)
  To: Steve French, CIFS
  Cc: Winston Wen, Linux Kernel Mailing List, Linux Next Mailing List,
	Luis Chamberlain, linux-modules

[-- Attachment #1: Type: text/plain, Size: 1215 bytes --]

Hi all,

After merging the cifs tree, today's linux-next build (x86_64
allmodconfig) failed like this:

fs/smb/client/connect.c: In function 'cifs_get_smb_ses':
fs/smb/client/connect.c:2293:49: error: passing argument 1 of 'load_nls' discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
 2293 |         ses->local_nls = load_nls(ctx->local_nls->charset);
      |                                   ~~~~~~~~~~~~~~^~~~~~~~~
In file included from fs/smb/client/cifsproto.h:10,
                 from fs/smb/client/connect.c:37:
include/linux/nls.h:50:35: note: expected 'char *' but argument is of type 'const char *'
   50 | extern struct nls_table *load_nls(char *);
      |                                   ^~~~~~

Caused by commit

  46055407cd4a ("cifs: fix charset issue in reconnection")

I have used the cifs tree from next-20230719 for today.

It looks as though the parameter to load_nls could be made const safely
as it is just passed to try_then_request_module() passes it to
__request_module() which just passes it to vsnprintf() to construct the
module name.  There does not appear to be any maintainer for fs/nls ...
-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: linux-next: build failure after merge of the cifs tree
  2023-07-20  0:35 linux-next: build failure after merge of the cifs tree Stephen Rothwell
@ 2023-07-20  0:47 ` Steve French
  2023-07-20  1:00   ` Stephen Rothwell
  0 siblings, 1 reply; 4+ messages in thread
From: Steve French @ 2023-07-20  0:47 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: CIFS, Winston Wen, Linux Kernel Mailing List,
	Linux Next Mailing List, Luis Chamberlain, linux-modules

Winston had an updated version of the patch - just replaced it with
his updated one which does a cast to (char *)

          ses->local_nls = load_nls((char *)ctx->local_nls->charset);

But as he noted in an earlier email thread:
> Perhaps I should make a change to load_nls() to take a const char *
> instead of char *? If this make sense, I'll do it soon.

which is probably cleaner

On Wed, Jul 19, 2023 at 7:35 PM Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Hi all,
>
> After merging the cifs tree, today's linux-next build (x86_64
> allmodconfig) failed like this:
>
> fs/smb/client/connect.c: In function 'cifs_get_smb_ses':
> fs/smb/client/connect.c:2293:49: error: passing argument 1 of 'load_nls' discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
>  2293 |         ses->local_nls = load_nls(ctx->local_nls->charset);
>       |                                   ~~~~~~~~~~~~~~^~~~~~~~~
> In file included from fs/smb/client/cifsproto.h:10,
>                  from fs/smb/client/connect.c:37:
> include/linux/nls.h:50:35: note: expected 'char *' but argument is of type 'const char *'
>    50 | extern struct nls_table *load_nls(char *);
>       |                                   ^~~~~~
>
> Caused by commit
>
>   46055407cd4a ("cifs: fix charset issue in reconnection")
>
> I have used the cifs tree from next-20230719 for today.
>
> It looks as though the parameter to load_nls could be made const safely
> as it is just passed to try_then_request_module() passes it to
> __request_module() which just passes it to vsnprintf() to construct the
> module name.  There does not appear to be any maintainer for fs/nls ...
> --
> Cheers,
> Stephen Rothwell



-- 
Thanks,

Steve

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: linux-next: build failure after merge of the cifs tree
  2023-07-20  0:47 ` Steve French
@ 2023-07-20  1:00   ` Stephen Rothwell
  2023-07-20  1:33     ` Winston Wen
  0 siblings, 1 reply; 4+ messages in thread
From: Stephen Rothwell @ 2023-07-20  1:00 UTC (permalink / raw)
  To: Steve French
  Cc: CIFS, Winston Wen, Linux Kernel Mailing List,
	Linux Next Mailing List, Luis Chamberlain, linux-modules

[-- Attachment #1: Type: text/plain, Size: 573 bytes --]

Hi all,

On Wed, 19 Jul 2023 19:47:42 -0500 Steve French <smfrench@gmail.com> wrote:
>
> Winston had an updated version of the patch - just replaced it with
> his updated one which does a cast to (char *)
> 
>           ses->local_nls = load_nls((char *)ctx->local_nls->charset);
> 
> But as he noted in an earlier email thread:
> > Perhaps I should make a change to load_nls() to take a const char *
> > instead of char *? If this make sense, I'll do it soon.  
> 
> which is probably cleaner

s/probably/definitely/  ;-)

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: linux-next: build failure after merge of the cifs tree
  2023-07-20  1:00   ` Stephen Rothwell
@ 2023-07-20  1:33     ` Winston Wen
  0 siblings, 0 replies; 4+ messages in thread
From: Winston Wen @ 2023-07-20  1:33 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Steve French, CIFS, Linux Kernel Mailing List,
	Linux Next Mailing List, Luis Chamberlain, linux-modules

On Thu, 20 Jul 2023 11:00:21 +1000
Stephen Rothwell <sfr@canb.auug.org.au> wrote:

> Hi all,
> 
> On Wed, 19 Jul 2023 19:47:42 -0500 Steve French <smfrench@gmail.com>
> wrote:
> >
> > Winston had an updated version of the patch - just replaced it with
> > his updated one which does a cast to (char *)
> > 
> >           ses->local_nls = load_nls((char
> > *)ctx->local_nls->charset);
> > 
> > But as he noted in an earlier email thread:
> > > Perhaps I should make a change to load_nls() to take a const char
> > > * instead of char *? If this make sense, I'll do it soon.  
> > 
> > which is probably cleaner
> 
> s/probably/definitely/  ;-)
> 

haha yes!

I'll make a small patch for this in the next cycle.

-- 
Thanks,
Winston


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-07-20  1:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-20  0:35 linux-next: build failure after merge of the cifs tree Stephen Rothwell
2023-07-20  0:47 ` Steve French
2023-07-20  1:00   ` Stephen Rothwell
2023-07-20  1:33     ` Winston Wen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox