linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [vfs:work.splice_read 10/11] lib/iov_iter.c:532:18: note: in expansion of macro 'min'
@ 2016-09-23  8:46 kbuild test robot
  0 siblings, 0 replies; only message in thread
From: kbuild test robot @ 2016-09-23  8:46 UTC (permalink / raw)
  To: Al Viro; +Cc: kbuild-all, linux-fsdevel

[-- Attachment #1: Type: text/plain, Size: 2649 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git work.splice_read
head:   9a791e155521e4599ebe1d2fc2ed17fc705d5348
commit: 34ec04831f679ac550a7e695e37cb4ceec6125be [10/11] new iov_iter flavour: pipe-backed
config: m68k-sun3_defconfig (attached as .config)
compiler: m68k-linux-gcc (GCC) 4.9.0
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 34ec04831f679ac550a7e695e37cb4ceec6125be
        # save the attached .config to linux build tree
        make.cross ARCH=m68k 

All warnings (new ones prefixed by >>):

   In file included from include/linux/uio.h:12:0,
                    from lib/iov_iter.c:2:
   lib/iov_iter.c: In function 'copy_pipe_to_iter':
   include/linux/kernel.h:742:17: warning: comparison of distinct pointer types lacks a cast
     (void) (&_min1 == &_min2);  \
                    ^
>> lib/iov_iter.c:532:18: note: in expansion of macro 'min'
      size_t chunk = min(n, PAGE_SIZE - off);
                     ^
   lib/iov_iter.c: In function 'pipe_zero':
   include/linux/kernel.h:742:17: warning: comparison of distinct pointer types lacks a cast
     (void) (&_min1 == &_min2);  \
                    ^
   lib/iov_iter.c:644:18: note: in expansion of macro 'min'
      size_t chunk = min(n, PAGE_SIZE - off);
                     ^
   lib/iov_iter.c: In function 'pipe_get_pages':
   include/linux/kernel.h:742:17: warning: comparison of distinct pointer types lacks a cast
     (void) (&_min1 == &_min2);  \
                    ^
   lib/iov_iter.c:880:3: note: in expansion of macro 'min'
      min(maxsize, min(npages,maxpages) * PAGE_SIZE - *start),
      ^

vim +/min +532 lib/iov_iter.c

   516	}
   517	
   518	static size_t copy_pipe_to_iter(const void *addr, size_t bytes,
   519					struct iov_iter *i)
   520	{
   521		struct pipe_inode_info *pipe = i->pipe;
   522		size_t n, off;
   523		int idx;
   524	
   525		if (!sanity(i))
   526			return 0;
   527	
   528		bytes = n = push_pipe(i, bytes, &idx, &off);
   529		if (unlikely(!n))
   530			return 0;
   531		for ( ; n; idx = next_idx(idx, pipe), off = 0) {
 > 532			size_t chunk = min(n, PAGE_SIZE - off);
   533			memcpy_to_page(pipe->bufs[idx].page, off, addr, chunk);
   534			i->nr_segs = idx;
   535			i->iov_offset = off + chunk;
   536			n -= chunk;
   537			addr += chunk;
   538		}
   539		i->count -= bytes;
   540		return bytes;

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 11444 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-09-23  8:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-23  8:46 [vfs:work.splice_read 10/11] lib/iov_iter.c:532:18: note: in expansion of macro 'min' kbuild 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).