BCC: [email protected]
CC: [email protected]
In-Reply-To: <[email protected]>
References: <[email protected]>
TO: David Howells <[email protected]>

Hi David,

[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on linus/master]
[also build test WARNING on v6.0-rc4 next-20220909]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    
https://github.com/intel-lab-lkp/linux/commits/David-Howells/iov_iter-Add-extraction-functions/20220910-072102
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
ce888220d5c7a805e0e155302a318d5d23e62950
:::::: branch date: 33 hours ago
:::::: commit date: 33 hours ago
config: x86_64-randconfig-m001 
(https://download.01.org/0day-ci/archive/20220911/[email protected]/config)
compiler: gcc-11 (Debian 11.3.0-5) 11.3.0

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <[email protected]>
Reported-by: Dan Carpenter <[email protected]>

smatch warnings:
lib/iov_iter_extract.c:360 iov_iter_extract_xarray() error: uninitialized 
symbol 'ret'.

vim +/ret +360 lib/iov_iter_extract.c

a8df8a89788037 David Howells 2022-09-10  314  
a8df8a89788037 David Howells 2022-09-10  315  /*
a8df8a89788037 David Howells 2022-09-10  316   * Extract the pages from an 
XARRAY-class iterator and add them to the
a8df8a89788037 David Howells 2022-09-10  317   * destination buffer.  The pages 
are not pinned.
a8df8a89788037 David Howells 2022-09-10  318   */
a8df8a89788037 David Howells 2022-09-10  319  static ssize_t 
iov_iter_extract_xarray(struct iov_iter *iter,
a8df8a89788037 David Howells 2022-09-10  320                                   
void *array, unsigned int array_max,
a8df8a89788037 David Howells 2022-09-10  321                                   
ssize_t maxsize,
a8df8a89788037 David Howells 2022-09-10  322                                   
enum iter_extract_dest dest)
a8df8a89788037 David Howells 2022-09-10  323  {
a8df8a89788037 David Howells 2022-09-10  324    struct xarray *xa = 
iter->xarray;
a8df8a89788037 David Howells 2022-09-10  325    struct folio *folio;
a8df8a89788037 David Howells 2022-09-10  326    unsigned int ix;
a8df8a89788037 David Howells 2022-09-10  327    loff_t start = 
iter->xarray_start + iter->iov_offset;
a8df8a89788037 David Howells 2022-09-10  328    pgoff_t index = start / 
PAGE_SIZE;
a8df8a89788037 David Howells 2022-09-10  329    ssize_t ret;
a8df8a89788037 David Howells 2022-09-10  330    size_t offset, len;
a8df8a89788037 David Howells 2022-09-10  331    XA_STATE(xas, xa, index);
a8df8a89788037 David Howells 2022-09-10  332  
a8df8a89788037 David Howells 2022-09-10  333    rcu_read_lock();
a8df8a89788037 David Howells 2022-09-10  334    xas_for_each(&xas, folio, 
ULONG_MAX) {
a8df8a89788037 David Howells 2022-09-10  335            if (xas_retry(&xas, 
folio))
a8df8a89788037 David Howells 2022-09-10  336                    continue;
a8df8a89788037 David Howells 2022-09-10  337            if 
(WARN_ON(xa_is_value(folio)))
a8df8a89788037 David Howells 2022-09-10  338                    break;
a8df8a89788037 David Howells 2022-09-10  339            if 
(WARN_ON(folio_test_hugetlb(folio)))
a8df8a89788037 David Howells 2022-09-10  340                    break;
a8df8a89788037 David Howells 2022-09-10  341  
a8df8a89788037 David Howells 2022-09-10  342            offset = 
offset_in_folio(folio, start);
a8df8a89788037 David Howells 2022-09-10  343            len = min_t(size_t, 
maxsize, folio_size(folio) - offset);
a8df8a89788037 David Howells 2022-09-10  344  
a8df8a89788037 David Howells 2022-09-10  345            ix = 
extract_contig_pages(array, folio_page(folio, 0),
a8df8a89788037 David Howells 2022-09-10  346                                    
  offset, len, dest);
a8df8a89788037 David Howells 2022-09-10  347            maxsize -= len;
a8df8a89788037 David Howells 2022-09-10  348            ret += len;
a8df8a89788037 David Howells 2022-09-10  349            if (ix >= array_max) {
a8df8a89788037 David Howells 2022-09-10  350                    WARN_ON_ONCE(ix 
> array_max);
a8df8a89788037 David Howells 2022-09-10  351                    break;
a8df8a89788037 David Howells 2022-09-10  352            }
a8df8a89788037 David Howells 2022-09-10  353  
a8df8a89788037 David Howells 2022-09-10  354            if (maxsize <= 0)
a8df8a89788037 David Howells 2022-09-10  355                    break;
a8df8a89788037 David Howells 2022-09-10  356    }
a8df8a89788037 David Howells 2022-09-10  357  
a8df8a89788037 David Howells 2022-09-10  358    rcu_read_unlock();
a8df8a89788037 David Howells 2022-09-10  359    terminate_array(array, dest);
a8df8a89788037 David Howells 2022-09-10 @360    return ret;
a8df8a89788037 David Howells 2022-09-10  361  }
a8df8a89788037 David Howells 2022-09-10  362  

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp
_______________________________________________
kbuild mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to