lkml.org 
[lkml]   [2023]   [Oct]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectlinux-next: build warning after merge of the kbuild tree
Hi all,

After merging the kbuild tree, today's linux-next build (powerpc
ppc64_defconfig) produced this warning:

In file included from scripts/mod/modpost.c:23:
scripts/mod/modpost.c: In function 'section_rela':
scripts/mod/modpost.h:66:24: warning: passing argument 2 of '__endian' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
66 | __endian(&(x), &(__x), sizeof(__x)); \
| ^~~~~~
scripts/mod/modpost.c:1437:28: note: in expansion of macro 'TO_NATIVE'
1437 | r_offset = TO_NATIVE(rela->r_offset);
| ^~~~~~~~~
scripts/mod/modpost.h:56:52: note: expected 'void *' but argument is of type 'const Elf64_Addr *' {aka 'const long unsigned int *'}
56 | static inline void __endian(const void *src, void *dest, unsigned int size)
| ~~~~~~^~~~
scripts/mod/modpost.h:66:24: warning: passing argument 2 of '__endian' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
66 | __endian(&(x), &(__x), sizeof(__x)); \
| ^~~~~~
scripts/mod/modpost.c:1440:25: note: in expansion of macro 'TO_NATIVE'
1440 | taddr = TO_NATIVE(rela->r_addend);
| ^~~~~~~~~
scripts/mod/modpost.h:56:52: note: expected 'void *' but argument is of type 'const Elf64_Sxword *' {aka 'const long int *'}
56 | static inline void __endian(const void *src, void *dest, unsigned int size)
| ~~~~~~^~~~
scripts/mod/modpost.c: In function 'section_rel':
scripts/mod/modpost.h:66:24: warning: passing argument 2 of '__endian' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
66 | __endian(&(x), &(__x), sizeof(__x)); \
| ^~~~~~
scripts/mod/modpost.c:1472:28: note: in expansion of macro 'TO_NATIVE'
1472 | r_offset = TO_NATIVE(rel->r_offset);
| ^~~~~~~~~
scripts/mod/modpost.h:56:52: note: expected 'void *' but argument is of type 'const Elf64_Addr *' {aka 'const long unsigned int *'}
56 | static inline void __endian(const void *src, void *dest, unsigned int size)
| ~~~~~~^~~~

Introduced by commit

367df0e19c67 ("modpost: factor out the common boilerplate of section_rel(a)")

--
Cheers,
Stephen Rothwell
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2023-10-04 01:16    [W:0.047 / U:0.444 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site