From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com>
Subject: lib/iov_iter.c:1298 want_pages_array() warn: ambiguous units merge 'count' 'page' or 'array_size'
Date: Wed, 10 May 2023 21:11:11 +0800 [thread overview]
Message-ID: <202305102104.SULT79lZ-lkp@intel.com> (raw)
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: Al Viro <viro@zeniv.linux.org.uk>
CC: Jeff Layton <jlayton@kernel.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 16a8829130ca22666ac6236178a6233208d425c3
commit: 3cf42da327f26eb4461864dd64812345b37f4fd9 iov_iter: saner helper for page array allocation
date: 9 months ago
:::::: branch date: 20 hours ago
:::::: commit date: 9 months ago
config: x86_64-randconfig-m001 (https://download.01.org/0day-ci/archive/20230510/202305102104.SULT79lZ-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-12) 11.3.0
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Link: https://lore.kernel.org/r/202305102104.SULT79lZ-lkp@intel.com/
smatch warnings:
lib/iov_iter.c:1298 want_pages_array() warn: ambiguous units merge 'count' 'page' or 'array_size'
lib/iov_iter.c:1298 want_pages_array() warn: ambiguous units merge 'count' 'array_size' or 'page'
vim +1298 lib/iov_iter.c
357f435d8a0d32 Al Viro 2016-04-08 1286
3cf42da327f26e Al Viro 2022-06-17 1287 static int want_pages_array(struct page ***res, size_t size,
3cf42da327f26e Al Viro 2022-06-17 1288 size_t start, unsigned int maxpages)
acbdeb8320b0a4 Al Viro 2022-06-17 1289 {
3cf42da327f26e Al Viro 2022-06-17 1290 unsigned int count = DIV_ROUND_UP(size + start, PAGE_SIZE);
3cf42da327f26e Al Viro 2022-06-17 1291
3cf42da327f26e Al Viro 2022-06-17 1292 if (count > maxpages)
3cf42da327f26e Al Viro 2022-06-17 1293 count = maxpages;
3cf42da327f26e Al Viro 2022-06-17 1294 WARN_ON(!count); // caller should've prevented that
3cf42da327f26e Al Viro 2022-06-17 1295 if (!*res) {
3cf42da327f26e Al Viro 2022-06-17 1296 *res = kvmalloc_array(count, sizeof(struct page *), GFP_KERNEL);
3cf42da327f26e Al Viro 2022-06-17 1297 if (!*res)
3cf42da327f26e Al Viro 2022-06-17 @1298 return 0;
3cf42da327f26e Al Viro 2022-06-17 1299 }
3cf42da327f26e Al Viro 2022-06-17 1300 return count;
acbdeb8320b0a4 Al Viro 2022-06-17 1301 }
acbdeb8320b0a4 Al Viro 2022-06-17 1302
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
next reply other threads:[~2023-05-10 13:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-10 13:11 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-05-10 8:07 lib/iov_iter.c:1298 want_pages_array() warn: ambiguous units merge 'count' 'page' or 'array_size' kernel test robot
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=202305102104.SULT79lZ-lkp@intel.com \
--to=lkp@intel.com \
--cc=error27@gmail.com \
--cc=oe-kbuild@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.