* [dhowells-fs:notifications-pipe-prep 4/10] lib/iov_iter.c:962:34: warning: 'i_head' may be used uninitialized in this function
@ 2019-10-23 17:52 kbuild test robot
0 siblings, 0 replies; only message in thread
From: kbuild test robot @ 2019-10-23 17:52 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 2362 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git notifications-pipe-prep
head: 48045df7b3191f476ef0095ec30d6fcbe4411940
commit: 2b988693eb16961453719e63b7a96e83cacd7fd2 [4/10] pipe: Use head and tail pointers for the ring, not cursor and length
config: sparc64-allmodconfig (attached as .config)
compiler: sparc64-linux-gcc (GCC) 7.4.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 2b988693eb16961453719e63b7a96e83cacd7fd2
# save the attached .config to linux build tree
GCC_VERSION=7.4.0 make.cross ARCH=sparc64
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
Note: it may well be a FALSE warning. FWIW you are at least aware of it now.
http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings
All warnings (new ones prefixed by >>):
lib/iov_iter.c: In function 'iov_iter_zero':
>> lib/iov_iter.c:962:34: warning: 'i_head' may be used uninitialized in this function [-Wmaybe-uninitialized]
memzero_page(pipe->bufs[i_head & p_mask].page, off, chunk);
~~~~~~~^~~~~~~~
lib/iov_iter.c:949:15: note: 'i_head' was declared here
unsigned int i_head;
^~~~~~
vim +/i_head +962 lib/iov_iter.c
944
945 static size_t pipe_zero(size_t bytes, struct iov_iter *i)
946 {
947 struct pipe_inode_info *pipe = i->pipe;
948 unsigned int p_mask = pipe->ring_size - 1;
949 unsigned int i_head;
950 size_t n, off;
951 int idx;
952
953 if (!sanity(i))
954 return 0;
955
956 bytes = n = push_pipe(i, bytes, &idx, &off);
957 if (unlikely(!n))
958 return 0;
959
960 do {
961 size_t chunk = min_t(size_t, n, PAGE_SIZE - off);
> 962 memzero_page(pipe->bufs[i_head & p_mask].page, off, chunk);
963 i->head = i_head;
964 i->iov_offset = off + chunk;
965 n -= chunk;
966 off = 0;
967 i_head++;
968 } while (n);
969 i->count -= bytes;
970 return bytes;
971 }
972
---
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: 59095 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2019-10-23 17:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-23 17:52 [dhowells-fs:notifications-pipe-prep 4/10] lib/iov_iter.c:962:34: warning: 'i_head' may be used uninitialized in this function kbuild test robot
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.