tree:
https://github.com/awilliam/linux-vfio.git next
head: 2099363255f123f6c9abcfa8531bbec65a8f1820
commit: 704f5082d8457a2166eb4cb4e460510117c70928 [16/27] vfio/fsl-mc: Scan DPRC objects on
vfio-fsl-mc driver bind
config: i386-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
#
https://github.com/awilliam/linux-vfio/commit/704f5082d8457a2166eb4cb4e46...
git remote add vfio
https://github.com/awilliam/linux-vfio.git
git fetch --no-tags vfio next
git checkout 704f5082d8457a2166eb4cb4e460510117c70928
# save the attached .config to linux build tree
make W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
drivers/vfio/fsl-mc/vfio_fsl_mc.c: In function 'vfio_fsl_mc_bus_notifier':
> drivers/vfio/fsl-mc/vfio_fsl_mc.c:100:9: error: 'struct
fsl_mc_device' has no member named 'driver_override'
100 |
mc_dev->driver_override = kasprintf(GFP_KERNEL, "%s",
| ^~
drivers/vfio/fsl-mc/vfio_fsl_mc.c:102:14: error: 'struct fsl_mc_device' has no
member named 'driver_override'
102 | if (!mc_dev->driver_override)
| ^~
drivers/vfio/fsl-mc/vfio_fsl_mc.c: In function 'vfio_fsl_mc_init_device':
> drivers/vfio/fsl-mc/vfio_fsl_mc.c:139:8: error: implicit
declaration of function 'dprc_setup' [-Werror=implicit-function-declaration]
139 | ret = dprc_setup(mc_dev);
| ^~~~~~~~~~
> drivers/vfio/fsl-mc/vfio_fsl_mc.c:145:8: error: implicit
declaration of function 'dprc_scan_container'
[-Werror=implicit-function-declaration]
145 | ret =
dprc_scan_container(mc_dev, false);
| ^~~~~~~~~~~~~~~~~~~
> drivers/vfio/fsl-mc/vfio_fsl_mc.c:154:2: error: implicit
declaration of function 'dprc_remove_devices'
[-Werror=implicit-function-declaration]
154 | dprc_remove_devices(mc_dev,
NULL, 0);
| ^~~~~~~~~~~~~~~~~~~
> drivers/vfio/fsl-mc/vfio_fsl_mc.c:155:2: error: implicit
declaration of function 'dprc_cleanup' [-Werror=implicit-function-declaration]
155 | dprc_cleanup(mc_dev);
| ^~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +100 drivers/vfio/fsl-mc/vfio_fsl_mc.c
88
89 static int vfio_fsl_mc_bus_notifier(struct notifier_block *nb,
90 unsigned long action, void *data)
91 {
92 struct vfio_fsl_mc_device *vdev = container_of(nb,
93 struct vfio_fsl_mc_device, nb);
94 struct device *dev = data;
95 struct fsl_mc_device *mc_dev = to_fsl_mc_device(dev);
96 struct fsl_mc_device *mc_cont = to_fsl_mc_device(mc_dev->dev.parent);
97
98 if (action == BUS_NOTIFY_ADD_DEVICE &&
99 vdev->mc_dev == mc_cont) {
100 mc_dev->driver_override = kasprintf(GFP_KERNEL,
"%s",
101 vfio_fsl_mc_ops.name);
102 if (!mc_dev->driver_override)
103 dev_warn(dev, "VFIO_FSL_MC: Setting driver override for device in dprc %s
failed\n",
104 dev_name(&mc_cont->dev));
105 else
106 dev_info(dev, "VFIO_FSL_MC: Setting driver override for device in dprc
%s\n",
107 dev_name(&mc_cont->dev));
108 } else if (action == BUS_NOTIFY_BOUND_DRIVER &&
109 vdev->mc_dev == mc_cont) {
110 struct fsl_mc_driver *mc_drv = to_fsl_mc_driver(dev->driver);
111
112 if (mc_drv && mc_drv != &vfio_fsl_mc_driver)
113 dev_warn(dev, "VFIO_FSL_MC: Object %s bound to driver %s while DPRC bound
to vfio-fsl-mc\n",
114 dev_name(dev), mc_drv->driver.name);
115 }
116
117 return 0;
118 }
119
120 static int vfio_fsl_mc_init_device(struct vfio_fsl_mc_device *vdev)
121 {
122 struct fsl_mc_device *mc_dev = vdev->mc_dev;
123 int ret;
124
125 /* Non-dprc devices share mc_io from parent */
126 if (!is_fsl_mc_bus_dprc(mc_dev)) {
127 struct fsl_mc_device *mc_cont = to_fsl_mc_device(mc_dev->dev.parent);
128
129 mc_dev->mc_io = mc_cont->mc_io;
130 return 0;
131 }
132
133 vdev->nb.notifier_call = vfio_fsl_mc_bus_notifier;
134 ret = bus_register_notifier(&fsl_mc_bus_type, &vdev->nb);
135 if (ret)
136 return ret;
137
138 /* open DPRC, allocate a MC portal */
139 ret = dprc_setup(mc_dev);
140 if (ret) {
141 dev_err(&mc_dev->dev, "VFIO_FSL_MC: Failed to setup DPRC
(%d)\n", ret);
142 goto out_nc_unreg;
143 }
144
145 ret = dprc_scan_container(mc_dev, false);
146 if (ret)
{
147 dev_err(&mc_dev->dev, "VFIO_FSL_MC: Container scanning failed
(%d)\n", ret);
148 goto out_dprc_cleanup;
149 }
150
151 return 0;
152
153 out_dprc_cleanup:
154 dprc_remove_devices(mc_dev, NULL, 0);
155 dprc_cleanup(mc_dev);
156 out_nc_unreg:
157 bus_unregister_notifier(&fsl_mc_bus_type, &vdev->nb);
158 vdev->nb.notifier_call = NULL;
159
160 return ret;
161 }
162
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org