From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id BD1E9C433F5 for ; Thu, 7 Apr 2022 06:42:56 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 4F7146B0073; Thu, 7 Apr 2022 02:42:46 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 4A64D6B0074; Thu, 7 Apr 2022 02:42:46 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 36F3A6B0075; Thu, 7 Apr 2022 02:42:46 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.26]) by kanga.kvack.org (Postfix) with ESMTP id 2975F6B0073 for ; Thu, 7 Apr 2022 02:42:46 -0400 (EDT) Received: from smtpin07.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 05C0728B2D for ; Thu, 7 Apr 2022 06:42:36 +0000 (UTC) X-FDA: 79329139512.07.E941203 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by imf06.hostedemail.com (Postfix) with ESMTP id E2600180002 for ; Thu, 7 Apr 2022 06:42:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1649313755; x=1680849755; h=date:from:to:cc:subject:message-id:mime-version; bh=nhrrbqhZO7Yyx0yLcK4dvYTEchQknYMlW+qshgdKeDo=; b=h2BuRwP0YttnxjSd2vP3DEb/fkWmpak+8V7CXWgorFgvps4Kdj+yQN+l XaW3oI2QiVIeQB7hl3geRpa59KIoKtELlMrB0gdoP1fdcOM2dlt7o6yGR tk15NTqMrjEefk6TMicvCTzp5vfkKcsLOep4gdwVJS8xv2I1h+XXcMviw g/njwL8jC/iF3OcoyUmRn44pr8ueYXlfGJ2v9Q/ZutMdYd9r2pSKiDLiB QGWxhPF0QYxYW1VqzHIz8/2R85w6sPxQXIZGXD7uOGVIu8dmyqjBlvZKx dewOfM4uOw+PTnA1wGgt6iTyTU07sExqRQcettBQiArTcJn1gPUyWzR6Q g==; X-IronPort-AV: E=McAfee;i="6200,9189,10309"; a="248767065" X-IronPort-AV: E=Sophos;i="5.90,241,1643702400"; d="scan'208";a="248767065" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Apr 2022 23:42:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,241,1643702400"; d="scan'208";a="697680691" Received: from lkp-server02.sh.intel.com (HELO a44fdfb70b94) ([10.239.97.151]) by fmsmga001.fm.intel.com with ESMTP; 06 Apr 2022 23:42:31 -0700 Received: from kbuild by a44fdfb70b94 with local (Exim 4.95) (envelope-from ) id 1ncLqh-00059l-2q; Thu, 07 Apr 2022 06:42:31 +0000 Date: Thu, 7 Apr 2022 14:41:52 +0800 From: kernel test robot To: Alexander Aring Cc: kbuild-all@lists.01.org, Linux Memory Management List , David Teigland Subject: [linux-next:master 2610/2869] include/uapi/linux/swab.h:131:31: warning: cast from pointer to integer of different size Message-ID: <202204071458.BfutYrzm-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: E2600180002 X-Stat-Signature: u8t9bxw8prfgp1ooagxf6uet64nwca99 X-Rspam-User: Authentication-Results: imf06.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=h2BuRwP0; dmarc=pass (policy=none) header.from=intel.com; spf=none (imf06.hostedemail.com: domain of lkp@intel.com has no SPF policy when checking 134.134.136.20) smtp.mailfrom=lkp@intel.com X-HE-Tag: 1649313754-342809 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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 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 :::::: CC: David Howells -- 0-DAY CI Kernel Test Service https://01.org/lkp