Re: [PATCH 2/7] staging: lustre: llite_nfs.c: replace container_of0 by container_of

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Aya,

[auto build test WARNING on staging/staging-next -- if it's inappropriate base, please suggest rules for selecting the more suitable base]

url:    https://github.com/0day-ci/linux/commits/Aya-Mahfouz/staging-lustre-remove-uses-and-definition-of-container_of0/20151014-062751
config: blackfin-allmodconfig (attached as .config)
reproduce:
        wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=blackfin 

All warnings (new ones prefixed by >>):

   drivers/staging/lustre/lustre/llite/llite_nfs.c: In function 'll_nfs_get_name_filldir':
>> drivers/staging/lustre/lustre/llite/llite_nfs.c:213:26: warning: initialization from incompatible pointer type [enabled by default]
>> drivers/staging/lustre/lustre/llite/llite_nfs.c:213:26: warning: (near initialization for 'lde') [enabled by default]

vim +213 drivers/staging/lustre/lustre/llite/llite_nfs.c

   197		if (*plen < sizeof(struct lustre_nfs_fid) / 4)
   198			return 255;
   199	
   200		nfs_fid->lnf_child = *ll_inode2fid(inode);
   201		nfs_fid->lnf_parent = *ll_inode2fid(parent);
   202		*plen = sizeof(struct lustre_nfs_fid) / 4;
   203	
   204		return LUSTRE_NFS_FID;
   205	}
   206	
   207	static int ll_nfs_get_name_filldir(struct dir_context *ctx, const char *name,
   208					   int namelen, loff_t hash, u64 ino,
   209					   unsigned type)
   210	{
   211		/* It is hack to access lde_fid for comparison with lgd_fid.
   212		 * So the input 'name' must be part of the 'lu_dirent'. */
 > 213		struct lu_dirent *lde = container_of(name, struct lu_dirent, lde_name);
   214		struct ll_getname_data *lgd =
   215			container_of(ctx, struct ll_getname_data, ctx);
   216		struct lu_fid fid;
   217	
   218		fid_le_to_cpu(&fid, &lde->lde_fid);
   219		if (lu_fid_eq(&fid, &lgd->lgd_fid)) {
   220			memcpy(lgd->lgd_name, name, namelen);
   221			lgd->lgd_name[namelen] = 0;

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: Binary data

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux