[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202202011252.GlKY0IdE-lkp@intel.com>
Date: Tue, 1 Feb 2022 12:37:56 +0800
From: kernel test robot <lkp@...el.com>
To: Jeff Layton <jlayton@...nel.org>
Cc: llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
linux-kernel@...r.kernel.org
Subject: [jlayton:ceph-fscrypt 53/54] net/ceph/messenger.c:1122:16: warning:
comparison of distinct pointer types ('typeof (bytes) *' (aka 'unsigned int
*') and 'typeof (((1UL) << 12)) *' (aka 'unsigned long *'))
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux.git ceph-fscrypt
head: 14cb86455b249f05d1b11dbab353e33f4fad6a5a
commit: 7e935aa6d4c23a6bcbd27a28c4f5457885c9ae98 [53/54] libceph: allow ceph_msg_data_advance to advance more than a page
config: i386-randconfig-r013-20220131 (https://download.01.org/0day-ci/archive/20220201/202202011252.GlKY0IdE-lkp@intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 6b1e844b69f15bb7dffaf9365cd2b355d2eb7579)
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/jlayton/linux.git/commit/?id=7e935aa6d4c23a6bcbd27a28c4f5457885c9ae98
git remote add jlayton https://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux.git
git fetch --no-tags jlayton ceph-fscrypt
git checkout 7e935aa6d4c23a6bcbd27a28c4f5457885c9ae98
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash net/ceph/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
>> net/ceph/messenger.c:1122:16: warning: comparison of distinct pointer types ('typeof (bytes) *' (aka 'unsigned int *') and 'typeof (((1UL) << 12)) *' (aka 'unsigned long *')) [-Wcompare-distinct-pointer-types]
size_t cur = min(bytes, PAGE_SIZE);
^~~~~~~~~~~~~~~~~~~~~
include/linux/minmax.h:45:19: note: expanded from macro 'min'
#define min(x, y) __careful_cmp(x, y, <)
^~~~~~~~~~~~~~~~~~~~~~
include/linux/minmax.h:36:24: note: expanded from macro '__careful_cmp'
__builtin_choose_expr(__safe_cmp(x, y), \
^~~~~~~~~~~~~~~~
include/linux/minmax.h:26:4: note: expanded from macro '__safe_cmp'
(__typecheck(x, y) && __no_side_effects(x, y))
^~~~~~~~~~~~~~~~~
include/linux/minmax.h:20:28: note: expanded from macro '__typecheck'
(!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~
1 warning generated.
vim +1122 net/ceph/messenger.c
1118
1119 void ceph_msg_data_advance(struct ceph_msg_data_cursor *cursor, size_t bytes)
1120 {
1121 while (bytes) {
> 1122 size_t cur = min(bytes, PAGE_SIZE);
1123
1124 __ceph_msg_data_advance(cursor, cur);
1125 bytes -= cur;
1126 }
1127 }
1128
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Powered by blists - more mailing lists