* [linux-next:master 2610/2869] include/uapi/linux/swab.h:131:31: warning: cast from pointer to integer of different size
@ 2022-04-07 6:41 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2022-04-07 6:41 UTC (permalink / raw)
To: Alexander Aring; +Cc: kbuild-all, Linux Memory Management List, David Teigland
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 2e9a9857569ec27e64d2ddd01294bbe3c736acb1
commit: 2f9dbeda8dc04b5b754e032000adf6bab03aa9be [2610/2869] dlm: use __le types for rcom messages
config: arc-allyesconfig (https://download.01.org/0day-ci/archive/20220407/202204071458.BfutYrzm-lkp@intel.com/config)
compiler: arceb-elf-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=2f9dbeda8dc04b5b754e032000adf6bab03aa9be
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout 2f9dbeda8dc04b5b754e032000adf6bab03aa9be
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arc SHELL=/bin/bash fs/dlm/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
In file included from include/linux/swab.h:5,
from include/uapi/linux/byteorder/big_endian.h:14,
from include/linux/byteorder/big_endian.h:5,
from arch/arc/include/uapi/asm/byteorder.h:14,
from include/asm-generic/bitops/le.h:6,
from arch/arc/include/asm/bitops.h:192,
from include/linux/bitops.h:33,
from include/linux/log2.h:12,
from include/asm-generic/div64.h:55,
from ./arch/arc/include/generated/asm/div64.h:1,
from include/linux/math.h:6,
from include/linux/math64.h:6,
from include/linux/time64.h:5,
from include/linux/restart_block.h:10,
from include/linux/thread_info.h:14,
from include/asm-generic/preempt.h:5,
from ./arch/arc/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:78,
from include/linux/spinlock.h:55,
from include/linux/mmzone.h:8,
from include/linux/gfp.h:6,
from include/linux/slab.h:15,
from fs/dlm/dlm_internal.h:19,
from fs/dlm/rcom.c:12:
fs/dlm/rcom.c: In function 'dlm_send_rcom_lock':
>> include/uapi/linux/swab.h:131:31: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
131 | (__builtin_constant_p((__u64)(x)) ? \
| ^
include/uapi/linux/byteorder/big_endian.h:32:43: note: in expansion of macro '__swab64'
32 | #define __cpu_to_le64(x) ((__force __le64)__swab64((x)))
| ^~~~~~~~
include/linux/byteorder/generic.h:86:21: note: in expansion of macro '__cpu_to_le64'
86 | #define cpu_to_le64 __cpu_to_le64
| ^~~~~~~~~~~~~
fs/dlm/rcom.c:457:21: note: in expansion of macro 'cpu_to_le64'
457 | rc->rc_id = cpu_to_le64(r);
| ^~~~~~~~~~~
include/uapi/linux/swab.h:25:11: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
25 | (((__u64)(x) & (__u64)0x00000000000000ffULL) << 56) | \
| ^
include/uapi/linux/swab.h:132:9: note: in expansion of macro '___constant_swab64'
132 | ___constant_swab64(x) : \
| ^~~~~~~~~~~~~~~~~~
include/uapi/linux/byteorder/big_endian.h:32:43: note: in expansion of macro '__swab64'
32 | #define __cpu_to_le64(x) ((__force __le64)__swab64((x)))
| ^~~~~~~~
include/linux/byteorder/generic.h:86:21: note: in expansion of macro '__cpu_to_le64'
86 | #define cpu_to_le64 __cpu_to_le64
| ^~~~~~~~~~~~~
fs/dlm/rcom.c:457:21: note: in expansion of macro 'cpu_to_le64'
457 | rc->rc_id = cpu_to_le64(r);
| ^~~~~~~~~~~
include/uapi/linux/swab.h:26:11: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
26 | (((__u64)(x) & (__u64)0x000000000000ff00ULL) << 40) | \
| ^
include/uapi/linux/swab.h:132:9: note: in expansion of macro '___constant_swab64'
132 | ___constant_swab64(x) : \
| ^~~~~~~~~~~~~~~~~~
include/uapi/linux/byteorder/big_endian.h:32:43: note: in expansion of macro '__swab64'
32 | #define __cpu_to_le64(x) ((__force __le64)__swab64((x)))
| ^~~~~~~~
include/linux/byteorder/generic.h:86:21: note: in expansion of macro '__cpu_to_le64'
86 | #define cpu_to_le64 __cpu_to_le64
| ^~~~~~~~~~~~~
fs/dlm/rcom.c:457:21: note: in expansion of macro 'cpu_to_le64'
457 | rc->rc_id = cpu_to_le64(r);
| ^~~~~~~~~~~
include/uapi/linux/swab.h:27:11: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
27 | (((__u64)(x) & (__u64)0x0000000000ff0000ULL) << 24) | \
| ^
include/uapi/linux/swab.h:132:9: note: in expansion of macro '___constant_swab64'
132 | ___constant_swab64(x) : \
| ^~~~~~~~~~~~~~~~~~
include/uapi/linux/byteorder/big_endian.h:32:43: note: in expansion of macro '__swab64'
32 | #define __cpu_to_le64(x) ((__force __le64)__swab64((x)))
| ^~~~~~~~
include/linux/byteorder/generic.h:86:21: note: in expansion of macro '__cpu_to_le64'
86 | #define cpu_to_le64 __cpu_to_le64
| ^~~~~~~~~~~~~
fs/dlm/rcom.c:457:21: note: in expansion of macro 'cpu_to_le64'
457 | rc->rc_id = cpu_to_le64(r);
| ^~~~~~~~~~~
include/uapi/linux/swab.h:28:11: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
28 | (((__u64)(x) & (__u64)0x00000000ff000000ULL) << 8) | \
| ^
include/uapi/linux/swab.h:132:9: note: in expansion of macro '___constant_swab64'
132 | ___constant_swab64(x) : \
| ^~~~~~~~~~~~~~~~~~
include/uapi/linux/byteorder/big_endian.h:32:43: note: in expansion of macro '__swab64'
32 | #define __cpu_to_le64(x) ((__force __le64)__swab64((x)))
| ^~~~~~~~
include/linux/byteorder/generic.h:86:21: note: in expansion of macro '__cpu_to_le64'
86 | #define cpu_to_le64 __cpu_to_le64
| ^~~~~~~~~~~~~
fs/dlm/rcom.c:457:21: note: in expansion of macro 'cpu_to_le64'
457 | rc->rc_id = cpu_to_le64(r);
| ^~~~~~~~~~~
include/uapi/linux/swab.h:29:11: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
29 | (((__u64)(x) & (__u64)0x000000ff00000000ULL) >> 8) | \
| ^
include/uapi/linux/swab.h:132:9: note: in expansion of macro '___constant_swab64'
132 | ___constant_swab64(x) : \
| ^~~~~~~~~~~~~~~~~~
include/uapi/linux/byteorder/big_endian.h:32:43: note: in expansion of macro '__swab64'
32 | #define __cpu_to_le64(x) ((__force __le64)__swab64((x)))
| ^~~~~~~~
include/linux/byteorder/generic.h:86:21: note: in expansion of macro '__cpu_to_le64'
86 | #define cpu_to_le64 __cpu_to_le64
| ^~~~~~~~~~~~~
fs/dlm/rcom.c:457:21: note: in expansion of macro 'cpu_to_le64'
457 | rc->rc_id = cpu_to_le64(r);
| ^~~~~~~~~~~
include/uapi/linux/swab.h:30:11: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
30 | (((__u64)(x) & (__u64)0x0000ff0000000000ULL) >> 24) | \
| ^
include/uapi/linux/swab.h:132:9: note: in expansion of macro '___constant_swab64'
132 | ___constant_swab64(x) : \
| ^~~~~~~~~~~~~~~~~~
include/uapi/linux/byteorder/big_endian.h:32:43: note: in expansion of macro '__swab64'
32 | #define __cpu_to_le64(x) ((__force __le64)__swab64((x)))
| ^~~~~~~~
include/linux/byteorder/generic.h:86:21: note: in expansion of macro '__cpu_to_le64'
86 | #define cpu_to_le64 __cpu_to_le64
| ^~~~~~~~~~~~~
fs/dlm/rcom.c:457:21: note: in expansion of macro 'cpu_to_le64'
457 | rc->rc_id = cpu_to_le64(r);
| ^~~~~~~~~~~
include/uapi/linux/swab.h:31:11: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
31 | (((__u64)(x) & (__u64)0x00ff000000000000ULL) >> 40) | \
| ^
include/uapi/linux/swab.h:132:9: note: in expansion of macro '___constant_swab64'
132 | ___constant_swab64(x) : \
| ^~~~~~~~~~~~~~~~~~
include/uapi/linux/byteorder/big_endian.h:32:43: note: in expansion of macro '__swab64'
32 | #define __cpu_to_le64(x) ((__force __le64)__swab64((x)))
| ^~~~~~~~
include/linux/byteorder/generic.h:86:21: note: in expansion of macro '__cpu_to_le64'
86 | #define cpu_to_le64 __cpu_to_le64
| ^~~~~~~~~~~~~
fs/dlm/rcom.c:457:21: note: in expansion of macro 'cpu_to_le64'
457 | rc->rc_id = cpu_to_le64(r);
| ^~~~~~~~~~~
include/uapi/linux/swab.h:32:11: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
32 | (((__u64)(x) & (__u64)0xff00000000000000ULL) >> 56)))
| ^
include/uapi/linux/swab.h:132:9: note: in expansion of macro '___constant_swab64'
132 | ___constant_swab64(x) : \
| ^~~~~~~~~~~~~~~~~~
include/uapi/linux/byteorder/big_endian.h:32:43: note: in expansion of macro '__swab64'
32 | #define __cpu_to_le64(x) ((__force __le64)__swab64((x)))
| ^~~~~~~~
include/linux/byteorder/generic.h:86:21: note: in expansion of macro '__cpu_to_le64'
86 | #define cpu_to_le64 __cpu_to_le64
| ^~~~~~~~~~~~~
fs/dlm/rcom.c:457:21: note: in expansion of macro 'cpu_to_le64'
457 | rc->rc_id = cpu_to_le64(r);
| ^~~~~~~~~~~
>> include/uapi/linux/byteorder/big_endian.h:32:52: warning: passing argument 1 of '__fswab64' makes integer from pointer without a cast [-Wint-conversion]
32 | #define __cpu_to_le64(x) ((__force __le64)__swab64((x)))
| ^~~
| |
| struct dlm_rsb *
include/uapi/linux/swab.h:133:19: note: in definition of macro '__swab64'
133 | __fswab64(x))
| ^
include/linux/byteorder/generic.h:86:21: note: in expansion of macro '__cpu_to_le64'
86 | #define cpu_to_le64 __cpu_to_le64
| ^~~~~~~~~~~~~
fs/dlm/rcom.c:457:21: note: in expansion of macro 'cpu_to_le64'
457 | rc->rc_id = cpu_to_le64(r);
| ^~~~~~~~~~~
include/uapi/linux/swab.h:66:57: note: expected '__u64' {aka 'long long unsigned int'} but argument is of type 'struct dlm_rsb *'
66 | static inline __attribute_const__ __u64 __fswab64(__u64 val)
| ~~~~~~^~~
vim +131 include/uapi/linux/swab.h
607ca46e97a1b6 David Howells 2012-10-13 122
607ca46e97a1b6 David Howells 2012-10-13 123 /**
607ca46e97a1b6 David Howells 2012-10-13 124 * __swab64 - return a byteswapped 64-bit value
607ca46e97a1b6 David Howells 2012-10-13 125 * @x: value to byteswap
607ca46e97a1b6 David Howells 2012-10-13 126 */
7322dd755e7dd3 Arnd Bergmann 2016-05-05 127 #ifdef __HAVE_BUILTIN_BSWAP64__
7322dd755e7dd3 Arnd Bergmann 2016-05-05 128 #define __swab64(x) (__u64)__builtin_bswap64((__u64)(x))
7322dd755e7dd3 Arnd Bergmann 2016-05-05 129 #else
607ca46e97a1b6 David Howells 2012-10-13 130 #define __swab64(x) \
607ca46e97a1b6 David Howells 2012-10-13 @131 (__builtin_constant_p((__u64)(x)) ? \
607ca46e97a1b6 David Howells 2012-10-13 132 ___constant_swab64(x) : \
607ca46e97a1b6 David Howells 2012-10-13 133 __fswab64(x))
7322dd755e7dd3 Arnd Bergmann 2016-05-05 134 #endif
607ca46e97a1b6 David Howells 2012-10-13 135
:::::: The code at line 131 was first introduced by commit
:::::: 607ca46e97a1b6594b29647d98a32d545c24bdff UAPI: (Scripted) Disintegrate include/linux
:::::: TO: David Howells <dhowells@redhat.com>
:::::: CC: David Howells <dhowells@redhat.com>
--
0-DAY CI Kernel Test Service
https://01.org/lkp
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-04-07 6:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-07 6:41 [linux-next:master 2610/2869] include/uapi/linux/swab.h:131:31: warning: cast from pointer to integer of different size kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox