tree: https://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git orangefs-untested head: 8f26caf05a24999f3d52961c4d9d1dfff32d53d8 commit: 45cfc9e62ea9f318acecec998e7d1c25f357c409 [1/8] orangefs: explicitly pass the size to pvfs_bufmap_copy_to_iovec() config: mn10300-allmodconfig (attached as .config) reproduce: wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross git checkout 45cfc9e62ea9f318acecec998e7d1c25f357c409 # save the attached .config to linux build tree make.cross ARCH=mn10300 All warnings (new ones prefixed by >>): fs/orangefs/pvfs2-bufmap.c: In function 'pvfs_bufmap_copy_from_iovec': fs/orangefs/pvfs2-bufmap.c:520:2: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'size_t' [-Wformat=] gossip_debug(GOSSIP_BUFMAP_DEBUG, ^ fs/orangefs/pvfs2-bufmap.c: In function 'pvfs_bufmap_copy_to_iovec': >> fs/orangefs/pvfs2-bufmap.c:551:2: warning: format '%zu' expects argument of type 'size_t', but argument 4 has type 'unsigned int' [-Wformat=] gossip_debug(GOSSIP_BUFMAP_DEBUG, ^ vim +551 fs/orangefs/pvfs2-bufmap.c 274dcf55 Mike Marshall 2015-07-17 514 { 274dcf55 Mike Marshall 2015-07-17 515 struct pvfs_bufmap_desc *to; 4d1c4404 Mike Marshall 2015-09-04 516 struct page *page; 4d1c4404 Mike Marshall 2015-09-04 517 size_t copied; 4d1c4404 Mike Marshall 2015-09-04 518 int i; 274dcf55 Mike Marshall 2015-07-17 519 274dcf55 Mike Marshall 2015-07-17 @520 gossip_debug(GOSSIP_BUFMAP_DEBUG, 4d1c4404 Mike Marshall 2015-09-04 521 "%s: buffer_index:%d: size:%lu:\n", 4d1c4404 Mike Marshall 2015-09-04 522 __func__, buffer_index, size); 274dcf55 Mike Marshall 2015-07-17 523 274dcf55 Mike Marshall 2015-07-17 524 to = &bufmap->desc_array[buffer_index]; 274dcf55 Mike Marshall 2015-07-17 525 4d1c4404 Mike Marshall 2015-09-04 526 for (i = 0; size; i++) { 4d1c4404 Mike Marshall 2015-09-04 527 page = to->page_array[i]; 4d1c4404 Mike Marshall 2015-09-04 528 copied = copy_page_from_iter(page, 0, PAGE_SIZE, iter); 4d1c4404 Mike Marshall 2015-09-04 529 size -= copied; 4d1c4404 Mike Marshall 2015-09-04 530 if ((copied == 0) && (size)) 4d1c4404 Mike Marshall 2015-09-04 531 break; 274dcf55 Mike Marshall 2015-07-17 532 } 274dcf55 Mike Marshall 2015-07-17 533 4d1c4404 Mike Marshall 2015-09-04 534 return size ? -EFAULT : 0; 274dcf55 Mike Marshall 2015-07-17 535 274dcf55 Mike Marshall 2015-07-17 536 } 274dcf55 Mike Marshall 2015-07-17 537 274dcf55 Mike Marshall 2015-07-17 538 /* 4d1c4404 Mike Marshall 2015-09-04 539 * Iterate through the array of pages containing the bytes from 4d1c4404 Mike Marshall 2015-09-04 540 * a file being read. 274dcf55 Mike Marshall 2015-07-17 541 * 274dcf55 Mike Marshall 2015-07-17 542 */ 4d1c4404 Mike Marshall 2015-09-04 543 int pvfs_bufmap_copy_to_iovec(struct pvfs2_bufmap *bufmap, 4d1c4404 Mike Marshall 2015-09-04 544 struct iov_iter *iter, 45cfc9e6 Al Viro 2015-10-08 545 int buffer_index, 45cfc9e6 Al Viro 2015-10-08 546 size_t size) 274dcf55 Mike Marshall 2015-07-17 547 { 45cfc9e6 Al Viro 2015-10-08 548 struct pvfs_bufmap_desc *from = &bufmap->desc_array[buffer_index]; 4d1c4404 Mike Marshall 2015-09-04 549 int i; 274dcf55 Mike Marshall 2015-07-17 550 274dcf55 Mike Marshall 2015-07-17 @551 gossip_debug(GOSSIP_BUFMAP_DEBUG, 45cfc9e6 Al Viro 2015-10-08 552 "%s: buffer_index:%d: size:%zu:\n", 45cfc9e6 Al Viro 2015-10-08 553 __func__, buffer_index, size); 274dcf55 Mike Marshall 2015-07-17 554 :::::: The code at line 551 was first introduced by commit :::::: 274dcf55bd4ab12af1cc1d3b77416285bef8ebf4 Orangefs: kernel client part 3 :::::: TO: Mike Marshall <hubcap@xxxxxxxxxxxx> :::::: CC: Mike Marshall <hubcap@xxxxxxxxxxxx> --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: Binary data