[jgunthorpe:iommufd 7/8] drivers/iommu/iommufd/device.c:121:40: warning: variable 'ioaspt' set but not used

From: kernel test robot
Date: Wed Nov 17 2021 - 13:18:39 EST


tree: https://github.com/jgunthorpe/linux iommufd
head: 4d06b5807e799e0293171d872d8c1a40f3b466c5
commit: 1f7a895af0da6f3df99882a45562e0fcd4812365 [7/8] mad musings
config: arc-allyesconfig (attached as .config)
compiler: arceb-elf-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/jgunthorpe/linux/commit/1f7a895af0da6f3df99882a45562e0fcd4812365
git remote add jgunthorpe https://github.com/jgunthorpe/linux
git fetch --no-tags jgunthorpe iommufd
git checkout 1f7a895af0da6f3df99882a45562e0fcd4812365
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=arc

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

drivers/iommu/iommufd/device.c: In function 'iommufd_device_attach_sw':
>> drivers/iommu/iommufd/device.c:121:40: warning: variable 'ioaspt' set but not used [-Wunused-but-set-variable]
121 | struct iommufd_ioas_pagetable *ioaspt;
| ^~~~~~


vim +/ioaspt +121 drivers/iommu/iommufd/device.c

118
119 static int iommufd_device_attach_sw(struct iommufd_device *idev, u32 *pt_id)
120 {
> 121 struct iommufd_ioas_pagetable *ioaspt;
122 struct iommufd_object *obj;
123
124 obj = iommufd_get_object(idev->ictx, *pt_id,
125 IOMMUFD_OBJ_IOAS_PAGETABLE);
126 if (IS_ERR(obj))
127 return PTR_ERR(obj);
128 ioaspt = container_of(obj, struct iommufd_ioas_pagetable, obj);
129 iommufd_put_object_keep_user(obj);
130 //idev->ioaspt = ioaspt;
131 return 0;
132 }
133

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

Attachment: .config.gz
Description: application/gzip