* [vfs:untested.iov_iter-2 2/30] lib/iov_iter.c:925:5: warning: comparison of distinct pointer types ('typeof (bytes) *' (aka 'unsigned int *') and 'typeof (((1UL) << (12)) - offset) *' (aka 'unsigned long *'))
@ 2021-05-03 20:22 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-05-03 20:22 UTC (permalink / raw)
To: Al Viro; +Cc: kbuild-all, clang-built-linux, linux-fsdevel
[-- Attachment #1: Type: text/plain, Size: 3257 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git untested.iov_iter-2
head: 5fe048dcff7837bcf95ef3c4f73fb230153a388b
commit: d2e019de6652bdd76006fab8b125f543c431e724 [2/30] teach copy_page_to_iter() to handle compound pages
config: riscv-randconfig-r026-20210503 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 8f5a2a5836cc8e4c1def2bdeb022e7b496623439)
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
# install riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git/commit/?id=d2e019de6652bdd76006fab8b125f543c431e724
git remote add vfs https://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git
git fetch --no-tags vfs untested.iov_iter-2
git checkout d2e019de6652bdd76006fab8b125f543c431e724
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=riscv
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 >>):
>> lib/iov_iter.c:925:5: warning: comparison of distinct pointer types ('typeof (bytes) *' (aka 'unsigned int *') and 'typeof (((1UL) << (12)) - offset) *' (aka 'unsigned long *')) [-Wcompare-distinct-pointer-types]
min(bytes, PAGE_SIZE - offset), i);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/minmax.h:51:19: note: expanded from macro 'min'
#define min(x, y) __careful_cmp(x, y, <)
^~~~~~~~~~~~~~~~~~~~~~
include/linux/minmax.h:42:24: note: expanded from macro '__careful_cmp'
__builtin_choose_expr(__safe_cmp(x, y), \
^~~~~~~~~~~~~~~~
include/linux/minmax.h:32:4: note: expanded from macro '__safe_cmp'
(__typecheck(x, y) && __no_side_effects(x, y))
^~~~~~~~~~~~~~~~~
include/linux/minmax.h:18:28: note: expanded from macro '__typecheck'
(!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~
1 warning generated.
vim +925 lib/iov_iter.c
914
915 size_t copy_page_to_iter(struct page *page, size_t offset, size_t bytes,
916 struct iov_iter *i)
917 {
918 size_t res = 0;
919 if (unlikely(!page_copy_sane(page, offset, bytes)))
920 return 0;
921 page += offset / PAGE_SIZE; // first subpage
922 offset %= PAGE_SIZE;
923 while (1) {
924 size_t n = __copy_page_to_iter(page, offset,
> 925 min(bytes, PAGE_SIZE - offset), i);
926 res += n;
927 bytes -= n;
928 if (!bytes || !n)
929 break;
930 offset += n;
931 if (offset == PAGE_SIZE) {
932 page++;
933 offset = 0;
934 }
935 }
936 return res;
937 }
938 EXPORT_SYMBOL(copy_page_to_iter);
939
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 26952 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-05-03 20:22 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-03 20:22 [vfs:untested.iov_iter-2 2/30] lib/iov_iter.c:925:5: warning: comparison of distinct pointer types ('typeof (bytes) *' (aka 'unsigned int *') and 'typeof (((1UL) << (12)) - offset) *' (aka 'unsigned long *')) 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;
as well as URLs for NNTP newsgroup(s).