From: kernel test robot <lkp@intel.com>
To: Al Viro <viro@zeniv.linux.org.uk>
Cc: kbuild-all@lists.01.org, clang-built-linux@googlegroups.com,
linux-fsdevel@vger.kernel.org
Subject: [vfs:untested.iov_iter 18/20] lib/iov_iter.c:888:5: warning: comparison of distinct pointer types ('typeof (bytes) *' (aka 'unsigned int *') and 'typeof (((1UL) << 12) - offset) *' (aka 'unsigned long *'))
Date: Sat, 1 May 2021 03:28:53 +0800 [thread overview]
Message-ID: <202105010350.1U0ORGnk-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 3246 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git untested.iov_iter
head: 6f93d60e7f3ad21d736f87da237fb85caada4d48
commit: 0e3ec7573828ebede159c74ca0019b33ae16f348 [18/20] teach copy_page_to_iter() to handle compound pages
config: arm-randconfig-r006-20210430 (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 arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# https://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git/commit/?id=0e3ec7573828ebede159c74ca0019b33ae16f348
git remote add vfs https://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git
git fetch --no-tags vfs untested.iov_iter
git checkout 0e3ec7573828ebede159c74ca0019b33ae16f348
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=arm
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:888: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 +888 lib/iov_iter.c
877
878 size_t copy_page_to_iter(struct page *page, size_t offset, size_t bytes,
879 struct iov_iter *i)
880 {
881 size_t res = 0;
882 if (unlikely(!page_copy_sane(page, offset, bytes)))
883 return 0;
884 page += offset / PAGE_SIZE; // first subpage
885 offset %= PAGE_SIZE;
886 while (1) {
887 size_t n = __copy_page_to_iter(page, offset,
> 888 min(bytes, PAGE_SIZE - offset), i);
889 res += n;
890 bytes -= n;
891 if (!bytes || !n)
892 break;
893 offset += n;
894 if (offset == PAGE_SIZE) {
895 page++;
896 offset = 0;
897 }
898 }
899 return res;
900 }
901 EXPORT_SYMBOL(copy_page_to_iter);
902
---
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: 35157 bytes --]
reply other threads:[~2021-04-30 19:29 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202105010350.1U0ORGnk-lkp@intel.com \
--to=lkp@intel.com \
--cc=clang-built-linux@googlegroups.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).