[staging:staging-testing 752/791] drivers/staging/lustre/lustre/mdc/mdc_request.c:1200:3: error: implicit declaration of function 'prefetchw'

kbuild test robot lkp at intel.com
Fri May 25 19:20:36 UTC 2018


tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git staging-testing
head:   0badacd779df08fbbc895cf6c488e100b86c1f39
commit: 73d65c8d1a851785af624870424b332f42af1b37 [752/791] staging: lustre: remove libcfs_all.h from lustre/include/*.h
config: sh-allmodconfig (attached as .config)
compiler: sh4-linux-gnu-gcc (Debian 7.2.0-11) 7.2.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 73d65c8d1a851785af624870424b332f42af1b37
        # save the attached .config to linux build tree
        make.cross ARCH=sh 

All errors (new ones prefixed by >>):

   drivers/staging/lustre/lustre/mdc/mdc_request.c: In function 'mdc_read_page_remote':
>> drivers/staging/lustre/lustre/mdc/mdc_request.c:1200:3: error: implicit declaration of function 'prefetchw' [-Werror=implicit-function-declaration]
      prefetchw(&page->flags);
      ^~~~~~~~~
   cc1: some warnings being treated as errors

vim +/prefetchw +1200 drivers/staging/lustre/lustre/mdc/mdc_request.c

4f76f0ec wang di         2016-08-19  1114  
4f76f0ec wang di         2016-08-19  1115  /**
4f76f0ec wang di         2016-08-19  1116   * Read pages from server.
4f76f0ec wang di         2016-08-19  1117   *
4f76f0ec wang di         2016-08-19  1118   * Page in MDS_READPAGE RPC is packed in LU_PAGE_SIZE, and each page contains
4f76f0ec wang di         2016-08-19  1119   * a header lu_dirpage which describes the start/end hash, and whether this
4f76f0ec wang di         2016-08-19  1120   * page is empty (contains no dir entry) or hash collide with next page.
4f76f0ec wang di         2016-08-19  1121   * After client receives reply, several pages will be integrated into dir page
4f76f0ec wang di         2016-08-19  1122   * in PAGE_SIZE (if PAGE_SIZE greater than LU_PAGE_SIZE), and the
4f76f0ec wang di         2016-08-19  1123   * lu_dirpage for this integrated page will be adjusted.
4f76f0ec wang di         2016-08-19  1124   **/
4f76f0ec wang di         2016-08-19  1125  static int mdc_read_page_remote(void *data, struct page *page0)
4f76f0ec wang di         2016-08-19  1126  {
4f76f0ec wang di         2016-08-19  1127  	struct readpage_param *rp = data;
4f76f0ec wang di         2016-08-19  1128  	struct page **page_pool;
4f76f0ec wang di         2016-08-19  1129  	struct page *page;
4f76f0ec wang di         2016-08-19  1130  	struct lu_dirpage *dp;
4f76f0ec wang di         2016-08-19  1131  	int rd_pgs = 0; /* number of pages read actually */
4f76f0ec wang di         2016-08-19  1132  	int npages;
4f76f0ec wang di         2016-08-19  1133  	struct md_op_data *op_data = rp->rp_mod;
4f76f0ec wang di         2016-08-19  1134  	struct ptlrpc_request *req;
4f76f0ec wang di         2016-08-19  1135  	int max_pages = op_data->op_max_pages;
4f76f0ec wang di         2016-08-19  1136  	struct inode *inode;
4f76f0ec wang di         2016-08-19  1137  	struct lu_fid *fid;
4f76f0ec wang di         2016-08-19  1138  	int i;
4f76f0ec wang di         2016-08-19  1139  	int rc;
4f76f0ec wang di         2016-08-19  1140  
4f76f0ec wang di         2016-08-19  1141  	LASSERT(max_pages > 0 && max_pages <= PTLRPC_MAX_BRW_PAGES);
4f76f0ec wang di         2016-08-19  1142  	inode = op_data->op_data;
4f76f0ec wang di         2016-08-19  1143  	fid = &op_data->op_fid1;
4f76f0ec wang di         2016-08-19  1144  	LASSERT(inode);
4f76f0ec wang di         2016-08-19  1145  
4f76f0ec wang di         2016-08-19  1146  	page_pool = kcalloc(max_pages, sizeof(page), GFP_NOFS);
4f76f0ec wang di         2016-08-19  1147  	if (page_pool) {
4f76f0ec wang di         2016-08-19  1148  		page_pool[0] = page0;
4f76f0ec wang di         2016-08-19  1149  	} else {
4f76f0ec wang di         2016-08-19  1150  		page_pool = &page0;
4f76f0ec wang di         2016-08-19  1151  		max_pages = 1;
4f76f0ec wang di         2016-08-19  1152  	}
4f76f0ec wang di         2016-08-19  1153  
4f76f0ec wang di         2016-08-19  1154  	for (npages = 1; npages < max_pages; npages++) {
453f85d4 Mel Gorman      2017-11-15  1155  		page = page_cache_alloc(inode->i_mapping);
4f76f0ec wang di         2016-08-19  1156  		if (!page)
4f76f0ec wang di         2016-08-19  1157  			break;
4f76f0ec wang di         2016-08-19  1158  		page_pool[npages] = page;
4f76f0ec wang di         2016-08-19  1159  	}
4f76f0ec wang di         2016-08-19  1160  
4f76f0ec wang di         2016-08-19  1161  	rc = mdc_getpage(rp->rp_exp, fid, rp->rp_off, page_pool, npages, &req);
4f76f0ec wang di         2016-08-19  1162  	if (!rc) {
4f76f0ec wang di         2016-08-19  1163  		int lu_pgs = req->rq_bulk->bd_nob_transferred;
4f76f0ec wang di         2016-08-19  1164  
4f76f0ec wang di         2016-08-19  1165  		rd_pgs = (req->rq_bulk->bd_nob_transferred +
4f76f0ec wang di         2016-08-19  1166  			  PAGE_SIZE - 1) >> PAGE_SHIFT;
4f76f0ec wang di         2016-08-19  1167  		lu_pgs >>= LU_PAGE_SHIFT;
4f76f0ec wang di         2016-08-19  1168  		LASSERT(!(req->rq_bulk->bd_nob_transferred & ~LU_PAGE_MASK));
4f76f0ec wang di         2016-08-19  1169  
3cbbf5ed John L. Hammond 2016-09-18  1170  		CDEBUG(D_INODE, "read %d(%d) pages\n", rd_pgs, lu_pgs);
4f76f0ec wang di         2016-08-19  1171  
4f76f0ec wang di         2016-08-19  1172  		mdc_adjust_dirpages(page_pool, rd_pgs, lu_pgs);
4f76f0ec wang di         2016-08-19  1173  
4f76f0ec wang di         2016-08-19  1174  		SetPageUptodate(page0);
4f76f0ec wang di         2016-08-19  1175  	}
4f76f0ec wang di         2016-08-19  1176  
4f76f0ec wang di         2016-08-19  1177  	unlock_page(page0);
4f76f0ec wang di         2016-08-19  1178  	ptlrpc_req_finished(req);
4f76f0ec wang di         2016-08-19  1179  	CDEBUG(D_CACHE, "read %d/%d pages\n", rd_pgs, npages);
4f76f0ec wang di         2016-08-19  1180  	for (i = 1; i < npages; i++) {
4f76f0ec wang di         2016-08-19  1181  		unsigned long offset;
4f76f0ec wang di         2016-08-19  1182  		__u64 hash;
4f76f0ec wang di         2016-08-19  1183  		int ret;
4f76f0ec wang di         2016-08-19  1184  
4f76f0ec wang di         2016-08-19  1185  		page = page_pool[i];
4f76f0ec wang di         2016-08-19  1186  
4f76f0ec wang di         2016-08-19  1187  		if (rc < 0 || i >= rd_pgs) {
4f76f0ec wang di         2016-08-19  1188  			put_page(page);
4f76f0ec wang di         2016-08-19  1189  			continue;
4f76f0ec wang di         2016-08-19  1190  		}
4f76f0ec wang di         2016-08-19  1191  
4f76f0ec wang di         2016-08-19  1192  		SetPageUptodate(page);
4f76f0ec wang di         2016-08-19  1193  
4f76f0ec wang di         2016-08-19  1194  		dp = kmap(page);
4f76f0ec wang di         2016-08-19  1195  		hash = le64_to_cpu(dp->ldp_hash_start);
4f76f0ec wang di         2016-08-19  1196  		kunmap(page);
4f76f0ec wang di         2016-08-19  1197  
4f76f0ec wang di         2016-08-19  1198  		offset = hash_x_index(hash, rp->rp_hash64);
4f76f0ec wang di         2016-08-19  1199  
4f76f0ec wang di         2016-08-19 @1200  		prefetchw(&page->flags);
4f76f0ec wang di         2016-08-19  1201  		ret = add_to_page_cache_lru(page, inode->i_mapping, offset,
4f76f0ec wang di         2016-08-19  1202  					    GFP_KERNEL);
4f76f0ec wang di         2016-08-19  1203  		if (!ret)
4f76f0ec wang di         2016-08-19  1204  			unlock_page(page);
4f76f0ec wang di         2016-08-19  1205  		else
4f76f0ec wang di         2016-08-19  1206  			CDEBUG(D_VFSTRACE, "page %lu add to page cache failed: rc = %d\n",
4f76f0ec wang di         2016-08-19  1207  			       offset, ret);
4f76f0ec wang di         2016-08-19  1208  		put_page(page);
4f76f0ec wang di         2016-08-19  1209  	}
4f76f0ec wang di         2016-08-19  1210  
4f76f0ec wang di         2016-08-19  1211  	if (page_pool != &page0)
4f76f0ec wang di         2016-08-19  1212  		kfree(page_pool);
4f76f0ec wang di         2016-08-19  1213  
4f76f0ec wang di         2016-08-19  1214  	return rc;
4f76f0ec wang di         2016-08-19  1215  }
4f76f0ec wang di         2016-08-19  1216  

:::::: The code at line 1200 was first introduced by commit
:::::: 4f76f0ec093c2f9ef049495c78d486bfb48e4de0 staging: lustre: llite: move dir cache to MDC layer

:::::: TO: wang di <di.wang at intel.com>
:::::: CC: Greg Kroah-Hartman <gregkh at linuxfoundation.org>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 47771 bytes
Desc: not available
URL: <http://driverdev.linuxdriverproject.org/pipermail/driverdev-devel/attachments/20180526/c1e8af29/attachment-0001.bin>


More information about the devel mailing list