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

From: kernel test robot
Date: Wed Feb 09 2022 - 00:27:23 EST


tree: https://github.com/jgunthorpe/linux iommufd
head: 6b5b3f20ed6b64824c2d447b4f4555fcb390bf3b
commit: 6b5b3f20ed6b64824c2d447b4f4555fcb390bf3b [31/31] mad musings
config: arc-allyesconfig (https://download.01.org/0day-ci/archive/20220209/202202091306.YxErokC5-lkp@xxxxxxxxx/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/6b5b3f20ed6b64824c2d447b4f4555fcb390bf3b
git remote add jgunthorpe https://github.com/jgunthorpe/linux
git fetch --no-tags jgunthorpe iommufd
git checkout 6b5b3f20ed6b64824c2d447b4f4555fcb390bf3b
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arc SHELL=/bin/bash drivers/iommu/iommufd/

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:122:40: warning: variable 'ioaspt' set but not used [-Wunused-but-set-variable]
122 | struct iommufd_ioas_pagetable *ioaspt;
| ^~~~~~


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

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

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