CC: kbuild-...@lists.01.org
TO: "Jens, Axboe," <ax...@kernel.dk>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git 
async-readahead
head:   77ca3affd737b5ca9f4222ead263a55b5a663e79
commit: ed611876580275e085cba3bb9c1f948ad5d882ab [15/20] fs: make 
aops->readpages() take kiocb argument
:::::: branch date: 4 hours ago
:::::: commit date: 6 hours ago
config: i386-randconfig-s002-20200601 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.1-243-gc100a7ab-dirty
        git checkout ed611876580275e085cba3bb9c1f948ad5d882ab
        # save the attached .config to linux build tree
        make W=1 C=1 ARCH=i386 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'

If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <l...@intel.com>


sparse warnings: (new ones prefixed by >>)

>> fs/nfs/file.c:515:22: sparse: sparse: incorrect type in initializer 
>> (incompatible argument 1 (different base types)) @@     expected int ( 
>> *readpages )( ... ) @@     got int ( * )( ... ) @@
>> fs/nfs/file.c:515:22: sparse:     expected int ( *readpages )( ... )
>> fs/nfs/file.c:515:22: sparse:     got int ( * )( ... )
--
   fs/nfs/read.c:405:5: sparse: sparse: symbol 'nfs_readpages' redeclared with 
different type (incompatible argument 1 (different base types)):
>> fs/nfs/read.c:405:5: sparse:    int extern [addressable] [signed] [toplevel] 
>> nfs_readpages( ... )
>> include/linux/nfs_fs.h:553:13: sparse: note: previously declared as:
>> include/linux/nfs_fs.h:553:13: sparse:    int extern [addressable] [signed] 
>> [toplevel] nfs_readpages( ... )

# 
https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git/commit/?id=ed611876580275e085cba3bb9c1f948ad5d882ab
git remote add block 
https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git
git remote update block
git checkout ed611876580275e085cba3bb9c1f948ad5d882ab
vim +405 fs/nfs/read.c

^1da177e4c3f41 Linus Torvalds        2005-04-16  404  
ed611876580275 Jens Axboe            2020-05-31 @405  int nfs_readpages(struct 
kiocb *kiocb, struct address_space *mapping,
^1da177e4c3f41 Linus Torvalds        2005-04-16  406            struct 
list_head *pages, unsigned nr_pages)
^1da177e4c3f41 Linus Torvalds        2005-04-16  407  {
ed611876580275 Jens Axboe            2020-05-31  408    struct file *filp = 
kiocb->ki_filp;
8b09bee3083897 Trond Myklebust       2007-04-02  409    struct 
nfs_pageio_descriptor pgio;
a7d42ddb309972 Weston Andros Adamson 2014-09-19  410    struct nfs_pgio_mirror 
*pgm;
^1da177e4c3f41 Linus Torvalds        2005-04-16  411    struct nfs_readdesc 
desc = {
8b09bee3083897 Trond Myklebust       2007-04-02  412            .pgio = &pgio,
^1da177e4c3f41 Linus Torvalds        2005-04-16  413    };
^1da177e4c3f41 Linus Torvalds        2005-04-16  414    struct inode *inode = 
mapping->host;
8b09bee3083897 Trond Myklebust       2007-04-02  415    unsigned long npages;
5f004cf2aa8494 Trond Myklebust       2006-09-14  416    int ret = -ESTALE;
^1da177e4c3f41 Linus Torvalds        2005-04-16  417  
1e8968c5b05823 Niels de Vos          2013-12-17  418    dprintk("NFS: 
nfs_readpages (%s/%Lu %d)\n",
^1da177e4c3f41 Linus Torvalds        2005-04-16  419                    
inode->i_sb->s_id,
1e8968c5b05823 Niels de Vos          2013-12-17  420                    
(unsigned long long)NFS_FILEID(inode),
^1da177e4c3f41 Linus Torvalds        2005-04-16  421                    
nr_pages);
91d5b47023b608 Chuck Lever           2006-03-20  422    nfs_inc_stats(inode, 
NFSIOS_VFSREADPAGES);
^1da177e4c3f41 Linus Torvalds        2005-04-16  423  
5f004cf2aa8494 Trond Myklebust       2006-09-14  424    if (NFS_STALE(inode))
5f004cf2aa8494 Trond Myklebust       2006-09-14  425            goto out;
5f004cf2aa8494 Trond Myklebust       2006-09-14  426  
^1da177e4c3f41 Linus Torvalds        2005-04-16  427    if (filp == NULL) {
d530838bfa507d Trond Myklebust       2005-11-04  428            desc.ctx = 
nfs_find_open_context(inode, NULL, FMODE_READ);
^1da177e4c3f41 Linus Torvalds        2005-04-16  429            if (desc.ctx == 
NULL)
^1da177e4c3f41 Linus Torvalds        2005-04-16  430                    return 
-EBADF;
^1da177e4c3f41 Linus Torvalds        2005-04-16  431    } else
cd3758e37ddea6 Trond Myklebust       2007-08-10  432            desc.ctx = 
get_nfs_open_context(nfs_file_open_context(filp));
9a9fc1c03315f1 David Howells         2009-04-03  433  
9a9fc1c03315f1 David Howells         2009-04-03  434    /* attempt to read as 
many of the pages as possible from the cache
9a9fc1c03315f1 David Howells         2009-04-03  435     * - this returns 
-ENOBUFS immediately if the cookie is negative
9a9fc1c03315f1 David Howells         2009-04-03  436     */
9a9fc1c03315f1 David Howells         2009-04-03  437    ret = 
nfs_readpages_from_fscache(desc.ctx, inode, mapping,
9a9fc1c03315f1 David Howells         2009-04-03  438                            
         pages, &nr_pages);
9a9fc1c03315f1 David Howells         2009-04-03  439    if (ret == 0)
9a9fc1c03315f1 David Howells         2009-04-03  440            goto 
read_complete; /* all pages were read */
9a9fc1c03315f1 David Howells         2009-04-03  441  
fab5fc25d230ed Christoph Hellwig     2014-04-16  442    
nfs_pageio_init_read(&pgio, inode, false,
fab5fc25d230ed Christoph Hellwig     2014-04-16  443                         
&nfs_async_read_completion_ops);
8b09bee3083897 Trond Myklebust       2007-04-02  444  
^1da177e4c3f41 Linus Torvalds        2005-04-16  445    ret = 
read_cache_pages(mapping, pages, readpage_async_filler, &desc);
8b09bee3083897 Trond Myklebust       2007-04-02  446    
nfs_pageio_complete(&pgio);
a7d42ddb309972 Weston Andros Adamson 2014-09-19  447  
a7d42ddb309972 Weston Andros Adamson 2014-09-19  448    /* It doesn't make 
sense to do mirrored reads! */
a7d42ddb309972 Weston Andros Adamson 2014-09-19  449    
WARN_ON_ONCE(pgio.pg_mirror_count != 1);
a7d42ddb309972 Weston Andros Adamson 2014-09-19  450  
a7d42ddb309972 Weston Andros Adamson 2014-09-19  451    pgm = 
&pgio.pg_mirrors[0];
a7d42ddb309972 Weston Andros Adamson 2014-09-19  452    NFS_I(inode)->read_io 
+= pgm->pg_bytes_written;
09cbfeaf1a5a67 Kirill A. Shutemov    2016-04-01  453    npages = 
(pgm->pg_bytes_written + PAGE_SIZE - 1) >>
09cbfeaf1a5a67 Kirill A. Shutemov    2016-04-01  454             PAGE_SHIFT;
8b09bee3083897 Trond Myklebust       2007-04-02  455    nfs_add_stats(inode, 
NFSIOS_READPAGES, npages);
9a9fc1c03315f1 David Howells         2009-04-03  456  read_complete:
^1da177e4c3f41 Linus Torvalds        2005-04-16  457    
put_nfs_open_context(desc.ctx);
5f004cf2aa8494 Trond Myklebust       2006-09-14  458  out:
^1da177e4c3f41 Linus Torvalds        2005-04-16  459    return ret;
^1da177e4c3f41 Linus Torvalds        2005-04-16  460  }
^1da177e4c3f41 Linus Torvalds        2005-04-16  461  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org

Attachment: .config.gz
Description: application/gzip

_______________________________________________
kbuild mailing list -- kbuild@lists.01.org
To unsubscribe send an email to kbuild-le...@lists.01.org

Reply via email to