All of lore.kernel.org
 help / color / mirror / Atom feed
* [dhowells-fs:fscache-iter 23/33] fs/fscache/read_helper.c:258:10: warning: 'x_flags' may be used uninitialized in this function
@ 2019-11-13 16:27 kbuild test robot
  0 siblings, 0 replies; only message in thread
From: kbuild test robot @ 2019-11-13 16:27 UTC (permalink / raw)
  To: kbuild-all

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git fscache-iter
head:   f62d2e3b55357b54ea4a541e85200ecdccfce7b4
commit: b546e3179314dd9f56dd09047dfdaf93a2baada3 [23/33] fscache: Add read helper
config: x86_64-randconfig-a002-201945 (attached as .config)
compiler: gcc-7 (Debian 7.4.0-14) 7.4.0
reproduce:
        git checkout b546e3179314dd9f56dd09047dfdaf93a2baada3
        # save the attached .config to linux build tree
        make ARCH=x86_64 

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 >>):

   fs/fscache/read_helper.c: In function 'fscache_read_helper':
>> fs/fscache/read_helper.c:258:10: warning: 'x_flags' may be used uninitialized in this function [-Wmaybe-uninitialized]
     x_flags |= fscache_shape_extent(req->io_handle, extent, i_size, false);
             ^~
>> fs/fscache/read_helper.c:479:9: warning: 'ret' may be used uninitialized in this function [-Wmaybe-uninitialized]
     return ret;
            ^~~

vim +/x_flags +258 fs/fscache/read_helper.c

   209	
   210	/**
   211	 * fscache_read_helper - Helper to manage a read request
   212	 * @req: The initialised request structure to use
   213	 * @extent: The extent of the pages to access
   214	 * @requested_page: Singular page to include
   215	 * @pages: Unattached pages to include (readpages)
   216	 * @type: FSCACHE_READ_*
   217	 * @aop_flags: AOP_FLAG_*
   218	 *
   219	 * Read a sequence of pages appropriately sized for an fscache allocation
   220	 * block.  Pages are added at both ends and to fill in the gaps as appropriate
   221	 * to make it the right size.
   222	 *
   223	 * req->mapping should indicate the mapping to which the pages will be attached.
   224	 *
   225	 * The operations pointed to by req->ops will be used to issue or reissue a
   226	 * read against the server in case the cache is unavailable, incomplete or
   227	 * generates an error.  req->iter will be set up to point to the iterator
   228	 * representing the buffer to be filled in.
   229	 */
   230	int fscache_read_helper(struct fscache_io_request *req,
   231				struct fscache_extent *extent,
   232				struct page **requested_page,
   233				struct list_head *pages,
   234				enum fscache_read_type type,
   235				unsigned int aop_flags)
   236	{
   237		struct address_space *mapping = req->mapping;
   238		struct page *page;
   239		unsigned char x_flags;
   240		pgoff_t eof, cursor, start, first_index, trailer = ULONG_MAX;
   241		loff_t i_size;
   242		int ret;
   243	
   244		first_index = extent->start;
   245		_enter("{%lx,%lx}", first_index, extent->limit);
   246	
   247		ASSERTIFCMP(requested_page && *requested_page,
   248			    (*requested_page)->index, ==, first_index);
   249		ASSERTIF(type == FSCACHE_READ_LOCKED_PAGE ||
   250			 type == FSCACHE_READ_FOR_WRITE,
   251			 pages == NULL);
   252		ASSERTIFCMP(pages && !list_empty(pages),
   253			    first_index, ==, lru_to_page(pages)->index);
   254	
   255		i_size = i_size_read(mapping->host);
   256		eof = (i_size + PAGE_SIZE - 1) >> PAGE_SHIFT;
   257	
 > 258		x_flags |= fscache_shape_extent(req->io_handle, extent, i_size, false);

---
0-DAY kernel test infrastructure                 Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org Intel Corporation

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

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

only message in thread, other threads:[~2019-11-13 16:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-13 16:27 [dhowells-fs:fscache-iter 23/33] fs/fscache/read_helper.c:258:10: warning: 'x_flags' 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.