LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* drivers/vfio/vfio.c:293: warning: expecting prototype for Container objects(). Prototype was for vfio_container_get() instead
@ 2021-09-27 20:33 kernel test robot
0 siblings, 0 replies; 7+ messages in thread
From: kernel test robot @ 2021-09-27 20:33 UTC (permalink / raw)
To: Jason Gunthorpe; +Cc: kbuild-all, linux-kernel, Alex Williamson, Eric Auger
[-- Attachment #1: Type: text/plain, Size: 20383 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 92477dd1faa650e50bd3bb35a6c0b8d09198cc35
commit: 179209fa12709a3df8888c323b37315da2683c24 vfio: IOMMU_API should be selected
date: 7 months ago
config: microblaze-buildonly-randconfig-r004-20210927 (attached as .config)
compiler: microblaze-linux-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://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=179209fa12709a3df8888c323b37315da2683c24
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 179209fa12709a3df8888c323b37315da2683c24
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=microblaze SHELL=/bin/bash arch/microblaze/kernel/ drivers/base/ drivers/char/ drivers/clk/ drivers/clocksource/ drivers/dax/ drivers/firewire/ drivers/gpu/drm/amd/amdgpu/ drivers/gpu/drm/amd/display/amdgpu_dm/ drivers/gpu/drm/amd/display/dc/dce/ drivers/gpu/drm/amd/display/dc/dce110/ drivers/gpu/drm/exynos/ drivers/i3c/ drivers/iio/accel/ drivers/memstick/host/ drivers/misc/ drivers/nvmem/ drivers/pci/ drivers/phy/qualcomm/ drivers/power/supply/ drivers/rapidio/ drivers/rtc/ drivers/soc/qcom/ drivers/thermal/ drivers/tty/ drivers/vfio/ drivers/video/fbdev/ drivers/w1/masters/ drivers/w1/slaves/ fs/ init/ kernel/ lib/ mm/ net/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
drivers/vfio/vfio.c:224: warning: Function parameter or member 'ops' not described in 'vfio_register_iommu_driver'
drivers/vfio/vfio.c:224: warning: expecting prototype for IOMMU driver registration(). Prototype was for vfio_register_iommu_driver() instead
drivers/vfio/vfio.c:273: warning: Function parameter or member 'group' not described in 'vfio_alloc_group_minor'
drivers/vfio/vfio.c:273: warning: expecting prototype for free(). Prototype was for vfio_alloc_group_minor() instead
drivers/vfio/vfio.c:293: warning: Function parameter or member 'container' not described in 'vfio_container_get'
>> drivers/vfio/vfio.c:293: warning: expecting prototype for Container objects(). Prototype was for vfio_container_get() instead
drivers/vfio/vfio.c:325: warning: Function parameter or member 'iommu_group' not described in 'vfio_create_group'
>> drivers/vfio/vfio.c:325: warning: expecting prototype for Group objects(). Prototype was for vfio_create_group() instead
drivers/vfio/vfio.c:540: warning: Function parameter or member 'group' not described in 'vfio_group_create_device'
drivers/vfio/vfio.c:540: warning: Function parameter or member 'dev' not described in 'vfio_group_create_device'
drivers/vfio/vfio.c:540: warning: Function parameter or member 'ops' not described in 'vfio_group_create_device'
drivers/vfio/vfio.c:540: warning: Function parameter or member 'device_data' not described in 'vfio_group_create_device'
drivers/vfio/vfio.c:540: warning: expecting prototype for Device objects(). Prototype was for vfio_group_create_device() instead
drivers/vfio/vfio.c:694: warning: Function parameter or member 'group' not described in 'vfio_group_nb_add_dev'
drivers/vfio/vfio.c:694: warning: Function parameter or member 'dev' not described in 'vfio_group_nb_add_dev'
drivers/vfio/vfio.c:694: warning: expecting prototype for Async device support(). Prototype was for vfio_group_nb_add_dev() instead
drivers/vfio/vfio.c:806: warning: Function parameter or member 'dev' not described in 'vfio_add_group_dev'
drivers/vfio/vfio.c:806: warning: Function parameter or member 'ops' not described in 'vfio_add_group_dev'
drivers/vfio/vfio.c:806: warning: Function parameter or member 'device_data' not described in 'vfio_add_group_dev'
drivers/vfio/vfio.c:806: warning: expecting prototype for VFIO driver API(). Prototype was for vfio_add_group_dev() instead
drivers/vfio/vfio.c:864: warning: Function parameter or member 'dev' not described in 'vfio_device_get_from_dev'
drivers/vfio/vfio.c:864: warning: expecting prototype for Even if the(). Prototype was for vfio_device_get_from_dev() instead
drivers/vfio/vfio.c:1022: warning: Function parameter or member 'container' not described in 'vfio_ioctl_check_extension'
drivers/vfio/vfio.c:1022: warning: Function parameter or member 'arg' not described in 'vfio_ioctl_check_extension'
drivers/vfio/vfio.c:1022: warning: expecting prototype for vfio(). Prototype was for vfio_ioctl_check_extension() instead
drivers/vfio/vfio.c:1298: warning: Function parameter or member 'group' not described in '__vfio_group_unset_container'
drivers/vfio/vfio.c:1298: warning: expecting prototype for GROUP(). Prototype was for __vfio_group_unset_container() instead
drivers/vfio/vfio.c:1633: warning: Function parameter or member 'inode' not described in 'vfio_device_fops_release'
drivers/vfio/vfio.c:1633: warning: Function parameter or member 'filep' not described in 'vfio_device_fops_release'
drivers/vfio/vfio.c:1633: warning: expecting prototype for VFIO Device fd(). Prototype was for vfio_device_fops_release() instead
drivers/vfio/vfio.c:1700: warning: wrong kernel-doc identifier on line:
* External user API, exported by symbols to be linked dynamically.
drivers/vfio/vfio.c:1745: warning: wrong kernel-doc identifier on line:
* External user API, exported by symbols to be linked dynamically.
drivers/vfio/vfio.c:1824: warning: Function parameter or member 'caps' not described in 'vfio_info_cap_add'
drivers/vfio/vfio.c:1824: warning: Function parameter or member 'size' not described in 'vfio_info_cap_add'
drivers/vfio/vfio.c:1824: warning: Function parameter or member 'id' not described in 'vfio_info_cap_add'
drivers/vfio/vfio.c:1824: warning: Function parameter or member 'version' not described in 'vfio_info_cap_add'
>> drivers/vfio/vfio.c:1824: warning: expecting prototype for Sub(). Prototype was for vfio_info_cap_add() instead
drivers/vfio/vfio.c:2361: warning: Function parameter or member 'dev' not described in 'vfio_devnode'
drivers/vfio/vfio.c:2361: warning: Function parameter or member 'mode' not described in 'vfio_devnode'
drivers/vfio/vfio.c:2361: warning: expecting prototype for class support(). Prototype was for vfio_devnode() instead
vim +293 drivers/vfio/vfio.c
03a76b60f8ba27 Alex Williamson 2015-12-21 218
03a76b60f8ba27 Alex Williamson 2015-12-21 219
cba3345cc494ad Alex Williamson 2012-07-31 220 /**
cba3345cc494ad Alex Williamson 2012-07-31 221 * IOMMU driver registration
cba3345cc494ad Alex Williamson 2012-07-31 222 */
cba3345cc494ad Alex Williamson 2012-07-31 223 int vfio_register_iommu_driver(const struct vfio_iommu_driver_ops *ops)
cba3345cc494ad Alex Williamson 2012-07-31 @224 {
cba3345cc494ad Alex Williamson 2012-07-31 225 struct vfio_iommu_driver *driver, *tmp;
cba3345cc494ad Alex Williamson 2012-07-31 226
cba3345cc494ad Alex Williamson 2012-07-31 227 driver = kzalloc(sizeof(*driver), GFP_KERNEL);
cba3345cc494ad Alex Williamson 2012-07-31 228 if (!driver)
cba3345cc494ad Alex Williamson 2012-07-31 229 return -ENOMEM;
cba3345cc494ad Alex Williamson 2012-07-31 230
cba3345cc494ad Alex Williamson 2012-07-31 231 driver->ops = ops;
cba3345cc494ad Alex Williamson 2012-07-31 232
cba3345cc494ad Alex Williamson 2012-07-31 233 mutex_lock(&vfio.iommu_drivers_lock);
cba3345cc494ad Alex Williamson 2012-07-31 234
cba3345cc494ad Alex Williamson 2012-07-31 235 /* Check for duplicates */
cba3345cc494ad Alex Williamson 2012-07-31 236 list_for_each_entry(tmp, &vfio.iommu_drivers_list, vfio_next) {
cba3345cc494ad Alex Williamson 2012-07-31 237 if (tmp->ops == ops) {
cba3345cc494ad Alex Williamson 2012-07-31 238 mutex_unlock(&vfio.iommu_drivers_lock);
cba3345cc494ad Alex Williamson 2012-07-31 239 kfree(driver);
cba3345cc494ad Alex Williamson 2012-07-31 240 return -EINVAL;
cba3345cc494ad Alex Williamson 2012-07-31 241 }
cba3345cc494ad Alex Williamson 2012-07-31 242 }
cba3345cc494ad Alex Williamson 2012-07-31 243
cba3345cc494ad Alex Williamson 2012-07-31 244 list_add(&driver->vfio_next, &vfio.iommu_drivers_list);
cba3345cc494ad Alex Williamson 2012-07-31 245
cba3345cc494ad Alex Williamson 2012-07-31 246 mutex_unlock(&vfio.iommu_drivers_lock);
cba3345cc494ad Alex Williamson 2012-07-31 247
cba3345cc494ad Alex Williamson 2012-07-31 248 return 0;
cba3345cc494ad Alex Williamson 2012-07-31 249 }
cba3345cc494ad Alex Williamson 2012-07-31 250 EXPORT_SYMBOL_GPL(vfio_register_iommu_driver);
cba3345cc494ad Alex Williamson 2012-07-31 251
cba3345cc494ad Alex Williamson 2012-07-31 252 void vfio_unregister_iommu_driver(const struct vfio_iommu_driver_ops *ops)
cba3345cc494ad Alex Williamson 2012-07-31 253 {
cba3345cc494ad Alex Williamson 2012-07-31 254 struct vfio_iommu_driver *driver;
cba3345cc494ad Alex Williamson 2012-07-31 255
cba3345cc494ad Alex Williamson 2012-07-31 256 mutex_lock(&vfio.iommu_drivers_lock);
cba3345cc494ad Alex Williamson 2012-07-31 257 list_for_each_entry(driver, &vfio.iommu_drivers_list, vfio_next) {
cba3345cc494ad Alex Williamson 2012-07-31 258 if (driver->ops == ops) {
cba3345cc494ad Alex Williamson 2012-07-31 259 list_del(&driver->vfio_next);
cba3345cc494ad Alex Williamson 2012-07-31 260 mutex_unlock(&vfio.iommu_drivers_lock);
cba3345cc494ad Alex Williamson 2012-07-31 261 kfree(driver);
cba3345cc494ad Alex Williamson 2012-07-31 262 return;
cba3345cc494ad Alex Williamson 2012-07-31 263 }
cba3345cc494ad Alex Williamson 2012-07-31 264 }
cba3345cc494ad Alex Williamson 2012-07-31 265 mutex_unlock(&vfio.iommu_drivers_lock);
cba3345cc494ad Alex Williamson 2012-07-31 266 }
cba3345cc494ad Alex Williamson 2012-07-31 267 EXPORT_SYMBOL_GPL(vfio_unregister_iommu_driver);
cba3345cc494ad Alex Williamson 2012-07-31 268
cba3345cc494ad Alex Williamson 2012-07-31 269 /**
cba3345cc494ad Alex Williamson 2012-07-31 270 * Group minor allocation/free - both called with vfio.group_lock held
cba3345cc494ad Alex Williamson 2012-07-31 271 */
cba3345cc494ad Alex Williamson 2012-07-31 272 static int vfio_alloc_group_minor(struct vfio_group *group)
cba3345cc494ad Alex Williamson 2012-07-31 273 {
d10999016f4164 Alex Williamson 2013-12-19 274 return idr_alloc(&vfio.group_idr, group, 0, MINORMASK + 1, GFP_KERNEL);
cba3345cc494ad Alex Williamson 2012-07-31 275 }
cba3345cc494ad Alex Williamson 2012-07-31 276
cba3345cc494ad Alex Williamson 2012-07-31 277 static void vfio_free_group_minor(int minor)
cba3345cc494ad Alex Williamson 2012-07-31 278 {
cba3345cc494ad Alex Williamson 2012-07-31 279 idr_remove(&vfio.group_idr, minor);
cba3345cc494ad Alex Williamson 2012-07-31 280 }
cba3345cc494ad Alex Williamson 2012-07-31 281
cba3345cc494ad Alex Williamson 2012-07-31 282 static int vfio_iommu_group_notifier(struct notifier_block *nb,
cba3345cc494ad Alex Williamson 2012-07-31 283 unsigned long action, void *data);
cba3345cc494ad Alex Williamson 2012-07-31 284 static void vfio_group_get(struct vfio_group *group);
cba3345cc494ad Alex Williamson 2012-07-31 285
cba3345cc494ad Alex Williamson 2012-07-31 286 /**
cba3345cc494ad Alex Williamson 2012-07-31 287 * Container objects - containers are created when /dev/vfio/vfio is
cba3345cc494ad Alex Williamson 2012-07-31 288 * opened, but their lifecycle extends until the last user is done, so
cba3345cc494ad Alex Williamson 2012-07-31 289 * it's freed via kref. Must support container/group/device being
cba3345cc494ad Alex Williamson 2012-07-31 290 * closed in any order.
cba3345cc494ad Alex Williamson 2012-07-31 291 */
cba3345cc494ad Alex Williamson 2012-07-31 292 static void vfio_container_get(struct vfio_container *container)
cba3345cc494ad Alex Williamson 2012-07-31 @293 {
cba3345cc494ad Alex Williamson 2012-07-31 294 kref_get(&container->kref);
cba3345cc494ad Alex Williamson 2012-07-31 295 }
cba3345cc494ad Alex Williamson 2012-07-31 296
cba3345cc494ad Alex Williamson 2012-07-31 297 static void vfio_container_release(struct kref *kref)
cba3345cc494ad Alex Williamson 2012-07-31 298 {
cba3345cc494ad Alex Williamson 2012-07-31 299 struct vfio_container *container;
cba3345cc494ad Alex Williamson 2012-07-31 300 container = container_of(kref, struct vfio_container, kref);
cba3345cc494ad Alex Williamson 2012-07-31 301
cba3345cc494ad Alex Williamson 2012-07-31 302 kfree(container);
cba3345cc494ad Alex Williamson 2012-07-31 303 }
cba3345cc494ad Alex Williamson 2012-07-31 304
cba3345cc494ad Alex Williamson 2012-07-31 305 static void vfio_container_put(struct vfio_container *container)
cba3345cc494ad Alex Williamson 2012-07-31 306 {
cba3345cc494ad Alex Williamson 2012-07-31 307 kref_put(&container->kref, vfio_container_release);
cba3345cc494ad Alex Williamson 2012-07-31 308 }
cba3345cc494ad Alex Williamson 2012-07-31 309
9df7b25ab71cee Jiang Liu 2012-12-07 310 static void vfio_group_unlock_and_free(struct vfio_group *group)
9df7b25ab71cee Jiang Liu 2012-12-07 311 {
9df7b25ab71cee Jiang Liu 2012-12-07 312 mutex_unlock(&vfio.group_lock);
9df7b25ab71cee Jiang Liu 2012-12-07 313 /*
9df7b25ab71cee Jiang Liu 2012-12-07 314 * Unregister outside of lock. A spurious callback is harmless now
9df7b25ab71cee Jiang Liu 2012-12-07 315 * that the group is no longer in vfio.group_list.
9df7b25ab71cee Jiang Liu 2012-12-07 316 */
9df7b25ab71cee Jiang Liu 2012-12-07 317 iommu_group_unregister_notifier(group->iommu_group, &group->nb);
9df7b25ab71cee Jiang Liu 2012-12-07 318 kfree(group);
9df7b25ab71cee Jiang Liu 2012-12-07 319 }
9df7b25ab71cee Jiang Liu 2012-12-07 320
cba3345cc494ad Alex Williamson 2012-07-31 321 /**
cba3345cc494ad Alex Williamson 2012-07-31 322 * Group objects - create, release, get, put, search
cba3345cc494ad Alex Williamson 2012-07-31 323 */
16ab8a5cbea463 Alex Williamson 2016-01-27 324 static struct vfio_group *vfio_create_group(struct iommu_group *iommu_group)
cba3345cc494ad Alex Williamson 2012-07-31 @325 {
cba3345cc494ad Alex Williamson 2012-07-31 326 struct vfio_group *group, *tmp;
cba3345cc494ad Alex Williamson 2012-07-31 327 struct device *dev;
cba3345cc494ad Alex Williamson 2012-07-31 328 int ret, minor;
cba3345cc494ad Alex Williamson 2012-07-31 329
cba3345cc494ad Alex Williamson 2012-07-31 330 group = kzalloc(sizeof(*group), GFP_KERNEL);
cba3345cc494ad Alex Williamson 2012-07-31 331 if (!group)
cba3345cc494ad Alex Williamson 2012-07-31 332 return ERR_PTR(-ENOMEM);
cba3345cc494ad Alex Williamson 2012-07-31 333
cba3345cc494ad Alex Williamson 2012-07-31 334 kref_init(&group->kref);
cba3345cc494ad Alex Williamson 2012-07-31 335 INIT_LIST_HEAD(&group->device_list);
cba3345cc494ad Alex Williamson 2012-07-31 336 mutex_init(&group->device_lock);
60720a0fc6469e Alex Williamson 2015-02-06 337 INIT_LIST_HEAD(&group->unbound_list);
60720a0fc6469e Alex Williamson 2015-02-06 338 mutex_init(&group->unbound_lock);
cba3345cc494ad Alex Williamson 2012-07-31 339 atomic_set(&group->container_users, 0);
6d6768c61b39a2 Alex Williamson 2013-06-25 340 atomic_set(&group->opened, 0);
6586b561a91cd8 Alex Williamson 2017-08-17 341 init_waitqueue_head(&group->container_q);
cba3345cc494ad Alex Williamson 2012-07-31 342 group->iommu_group = iommu_group;
16ab8a5cbea463 Alex Williamson 2016-01-27 343 #ifdef CONFIG_VFIO_NOIOMMU
16ab8a5cbea463 Alex Williamson 2016-01-27 344 group->noiommu = (iommu_group_get_iommudata(iommu_group) == &noiommu);
16ab8a5cbea463 Alex Williamson 2016-01-27 345 #endif
ccd46dbae77dbf Jike Song 2016-12-01 346 BLOCKING_INIT_NOTIFIER_HEAD(&group->notifier);
cba3345cc494ad Alex Williamson 2012-07-31 347
cba3345cc494ad Alex Williamson 2012-07-31 348 group->nb.notifier_call = vfio_iommu_group_notifier;
cba3345cc494ad Alex Williamson 2012-07-31 349
cba3345cc494ad Alex Williamson 2012-07-31 350 /*
cba3345cc494ad Alex Williamson 2012-07-31 351 * blocking notifiers acquire a rwsem around registering and hold
cba3345cc494ad Alex Williamson 2012-07-31 352 * it around callback. Therefore, need to register outside of
cba3345cc494ad Alex Williamson 2012-07-31 353 * vfio.group_lock to avoid A-B/B-A contention. Our callback won't
cba3345cc494ad Alex Williamson 2012-07-31 354 * do anything unless it can find the group in vfio.group_list, so
cba3345cc494ad Alex Williamson 2012-07-31 355 * no harm in registering early.
cba3345cc494ad Alex Williamson 2012-07-31 356 */
cba3345cc494ad Alex Williamson 2012-07-31 357 ret = iommu_group_register_notifier(iommu_group, &group->nb);
cba3345cc494ad Alex Williamson 2012-07-31 358 if (ret) {
cba3345cc494ad Alex Williamson 2012-07-31 359 kfree(group);
cba3345cc494ad Alex Williamson 2012-07-31 360 return ERR_PTR(ret);
cba3345cc494ad Alex Williamson 2012-07-31 361 }
cba3345cc494ad Alex Williamson 2012-07-31 362
cba3345cc494ad Alex Williamson 2012-07-31 363 mutex_lock(&vfio.group_lock);
cba3345cc494ad Alex Williamson 2012-07-31 364
cba3345cc494ad Alex Williamson 2012-07-31 365 /* Did we race creating this group? */
cba3345cc494ad Alex Williamson 2012-07-31 366 list_for_each_entry(tmp, &vfio.group_list, vfio_next) {
cba3345cc494ad Alex Williamson 2012-07-31 367 if (tmp->iommu_group == iommu_group) {
cba3345cc494ad Alex Williamson 2012-07-31 368 vfio_group_get(tmp);
9df7b25ab71cee Jiang Liu 2012-12-07 369 vfio_group_unlock_and_free(group);
cba3345cc494ad Alex Williamson 2012-07-31 370 return tmp;
cba3345cc494ad Alex Williamson 2012-07-31 371 }
cba3345cc494ad Alex Williamson 2012-07-31 372 }
cba3345cc494ad Alex Williamson 2012-07-31 373
2f51bf4be99386 Zhen Lei 2015-03-16 374 minor = vfio_alloc_group_minor(group);
2f51bf4be99386 Zhen Lei 2015-03-16 375 if (minor < 0) {
2f51bf4be99386 Zhen Lei 2015-03-16 376 vfio_group_unlock_and_free(group);
2f51bf4be99386 Zhen Lei 2015-03-16 377 return ERR_PTR(minor);
2f51bf4be99386 Zhen Lei 2015-03-16 378 }
2f51bf4be99386 Zhen Lei 2015-03-16 379
d10999016f4164 Alex Williamson 2013-12-19 380 dev = device_create(vfio.class, NULL,
d10999016f4164 Alex Williamson 2013-12-19 381 MKDEV(MAJOR(vfio.group_devt), minor),
03a76b60f8ba27 Alex Williamson 2015-12-21 382 group, "%s%d", group->noiommu ? "noiommu-" : "",
03a76b60f8ba27 Alex Williamson 2015-12-21 383 iommu_group_id(iommu_group));
cba3345cc494ad Alex Williamson 2012-07-31 384 if (IS_ERR(dev)) {
cba3345cc494ad Alex Williamson 2012-07-31 385 vfio_free_group_minor(minor);
9df7b25ab71cee Jiang Liu 2012-12-07 386 vfio_group_unlock_and_free(group);
7b3a10df1d4bd8 Dan Carpenter 2017-05-18 387 return ERR_CAST(dev);
cba3345cc494ad Alex Williamson 2012-07-31 388 }
cba3345cc494ad Alex Williamson 2012-07-31 389
cba3345cc494ad Alex Williamson 2012-07-31 390 group->minor = minor;
cba3345cc494ad Alex Williamson 2012-07-31 391 group->dev = dev;
cba3345cc494ad Alex Williamson 2012-07-31 392
cba3345cc494ad Alex Williamson 2012-07-31 393 list_add(&group->vfio_next, &vfio.group_list);
cba3345cc494ad Alex Williamson 2012-07-31 394
cba3345cc494ad Alex Williamson 2012-07-31 395 mutex_unlock(&vfio.group_lock);
cba3345cc494ad Alex Williamson 2012-07-31 396
cba3345cc494ad Alex Williamson 2012-07-31 397 return group;
cba3345cc494ad Alex Williamson 2012-07-31 398 }
cba3345cc494ad Alex Williamson 2012-07-31 399
:::::: The code at line 293 was first introduced by commit
:::::: cba3345cc494ad286ca8823f44b2c16cae496679 vfio: VFIO core
:::::: TO: Alex Williamson <alex.williamson@redhat.com>
:::::: CC: Alex Williamson <alex.williamson@redhat.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 29658 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: drivers/vfio/vfio.c:293: warning: expecting prototype for Container objects(). Prototype was for vfio_container_get() instead
2021-11-10 23:19 ` Randy Dunlap
2021-11-10 23:26 ` Jason Gunthorpe
2021-11-11 7:56 ` Cornelia Huck
@ 2021-11-30 19:30 ` Alex Williamson
2 siblings, 0 replies; 7+ messages in thread
From: Alex Williamson @ 2021-11-30 19:30 UTC (permalink / raw)
To: Randy Dunlap
Cc: Jason Gunthorpe, kernel test robot, kbuild-all, linux-kernel,
Eric Auger, Cornelia Huck, kvm
On Wed, 10 Nov 2021 15:19:40 -0800
Randy Dunlap <rdunlap@infradead.org> wrote:
> On 11/10/21 8:42 AM, Jason Gunthorpe wrote:
> > On Wed, Nov 10, 2021 at 11:12:39PM +0800, kernel test robot wrote:
> >> Hi Jason,
> >>
> >> FYI, the error/warning still remains.
> >
> > This is just a long standing kdoc misuse.
> >
> > vfio is not W=1 kdoc clean.
> >
> > Until someone takes a project to fix this comprehensively there is not
> > much point in reporting new complaints related the existing mis-use..
>
> Hi,
>
> Can we just remove all misused "/**" comments in vfio.c until
> someone cares enough to use proper kernel-doc there?
>
> ---
> From: Randy Dunlap <rdunlap@infradead.org>
> Subject: [PATCH] vfio/vfio: remove all kernel-doc notation
>
> vfio.c abuses (misuses) "/**", which indicates the beginning of
> kernel-doc notation in the kernel tree. This causes a bunch of
> kernel-doc complaints about this source file, so quieten all of
> them by changing all "/**" to "/*".
>
> vfio.c:236: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
> * IOMMU driver registration
> vfio.c:236: warning: missing initial short description on line:
> * IOMMU driver registration
> vfio.c:295: warning: expecting prototype for Container objects(). Prototype was for vfio_container_get() instead
> vfio.c:317: warning: expecting prototype for Group objects(). Prototype was for __vfio_group_get_from_iommu() instead
> vfio.c:496: warning: Function parameter or member 'device' not described in 'vfio_device_put'
> vfio.c:496: warning: expecting prototype for Device objects(). Prototype was for vfio_device_put() instead
> vfio.c:599: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
> * Async device support
> vfio.c:599: warning: missing initial short description on line:
> * Async device support
> vfio.c:693: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
> * VFIO driver API
> vfio.c:693: warning: missing initial short description on line:
> * VFIO driver API
> vfio.c:835: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
> * Get a reference to the vfio_device for a device. Even if the
> vfio.c:835: warning: missing initial short description on line:
> * Get a reference to the vfio_device for a device. Even if the
> vfio.c:969: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
> * VFIO base fd, /dev/vfio/vfio
> vfio.c:969: warning: missing initial short description on line:
> * VFIO base fd, /dev/vfio/vfio
> vfio.c:1187: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
> * VFIO Group fd, /dev/vfio/$GROUP
> vfio.c:1187: warning: missing initial short description on line:
> * VFIO Group fd, /dev/vfio/$GROUP
> vfio.c:1540: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
> * VFIO Device fd
> vfio.c:1540: warning: missing initial short description on line:
> * VFIO Device fd
> vfio.c:1615: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
> * External user API, exported by symbols to be linked dynamically.
> vfio.c:1615: warning: missing initial short description on line:
> * External user API, exported by symbols to be linked dynamically.
> vfio.c:1663: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
> * External user API, exported by symbols to be linked dynamically.
> vfio.c:1663: warning: missing initial short description on line:
> * External user API, exported by symbols to be linked dynamically.
> vfio.c:1742: warning: Function parameter or member 'caps' not described in 'vfio_info_cap_add'
> vfio.c:1742: warning: Function parameter or member 'size' not described in 'vfio_info_cap_add'
> vfio.c:1742: warning: Function parameter or member 'id' not described in 'vfio_info_cap_add'
> vfio.c:1742: warning: Function parameter or member 'version' not described in 'vfio_info_cap_add'
> vfio.c:1742: warning: expecting prototype for Sub(). Prototype was for vfio_info_cap_add() instead
> vfio.c:2276: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
> * Module/class support
> vfio.c:2276: warning: missing initial short description on line:
> * Module/class support
>
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Reported-by: kernel test robot <lkp@intel.com>
> Cc: Jason Gunthorpe <jgg@nvidia.com>
> Cc: Alex Williamson <alex.williamson@redhat.com>
> Cc: Eric Auger <eric.auger@redhat.com>
> Cc: Cornelia Huck <cohuck@redhat.com>
> Cc: kvm@vger.kernel.org
> ---
> drivers/vfio/vfio.c | 28 ++++++++++++++--------------
> 1 file changed, 14 insertions(+), 14 deletions(-)
These were never intended to be kernel-doc, thanks for the cleanup.
I've scraped this into my for-linus branch with Jason and Connie's acks
for v5.16. Thanks,
Alex
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: drivers/vfio/vfio.c:293: warning: expecting prototype for Container objects(). Prototype was for vfio_container_get() instead
2021-11-10 23:19 ` Randy Dunlap
2021-11-10 23:26 ` Jason Gunthorpe
@ 2021-11-11 7:56 ` Cornelia Huck
2021-11-30 19:30 ` Alex Williamson
2 siblings, 0 replies; 7+ messages in thread
From: Cornelia Huck @ 2021-11-11 7:56 UTC (permalink / raw)
To: Randy Dunlap, Jason Gunthorpe, kernel test robot
Cc: kbuild-all, linux-kernel, Alex Williamson, Eric Auger, kvm
On Wed, Nov 10 2021, Randy Dunlap <rdunlap@infradead.org> wrote:
> On 11/10/21 8:42 AM, Jason Gunthorpe wrote:
>> On Wed, Nov 10, 2021 at 11:12:39PM +0800, kernel test robot wrote:
>>> Hi Jason,
>>>
>>> FYI, the error/warning still remains.
>>
>> This is just a long standing kdoc misuse.
>>
>> vfio is not W=1 kdoc clean.
>>
>> Until someone takes a project to fix this comprehensively there is not
>> much point in reporting new complaints related the existing mis-use..
>
> Hi,
>
> Can we just remove all misused "/**" comments in vfio.c until
> someone cares enough to use proper kernel-doc there?
>
> ---
> From: Randy Dunlap <rdunlap@infradead.org>
> Subject: [PATCH] vfio/vfio: remove all kernel-doc notation
>
> vfio.c abuses (misuses) "/**", which indicates the beginning of
> kernel-doc notation in the kernel tree. This causes a bunch of
> kernel-doc complaints about this source file, so quieten all of
> them by changing all "/**" to "/*".
>
> vfio.c:236: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
> * IOMMU driver registration
> vfio.c:236: warning: missing initial short description on line:
> * IOMMU driver registration
> vfio.c:295: warning: expecting prototype for Container objects(). Prototype was for vfio_container_get() instead
> vfio.c:317: warning: expecting prototype for Group objects(). Prototype was for __vfio_group_get_from_iommu() instead
> vfio.c:496: warning: Function parameter or member 'device' not described in 'vfio_device_put'
> vfio.c:496: warning: expecting prototype for Device objects(). Prototype was for vfio_device_put() instead
> vfio.c:599: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
> * Async device support
> vfio.c:599: warning: missing initial short description on line:
> * Async device support
> vfio.c:693: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
> * VFIO driver API
> vfio.c:693: warning: missing initial short description on line:
> * VFIO driver API
> vfio.c:835: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
> * Get a reference to the vfio_device for a device. Even if the
> vfio.c:835: warning: missing initial short description on line:
> * Get a reference to the vfio_device for a device. Even if the
> vfio.c:969: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
> * VFIO base fd, /dev/vfio/vfio
> vfio.c:969: warning: missing initial short description on line:
> * VFIO base fd, /dev/vfio/vfio
> vfio.c:1187: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
> * VFIO Group fd, /dev/vfio/$GROUP
> vfio.c:1187: warning: missing initial short description on line:
> * VFIO Group fd, /dev/vfio/$GROUP
> vfio.c:1540: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
> * VFIO Device fd
> vfio.c:1540: warning: missing initial short description on line:
> * VFIO Device fd
> vfio.c:1615: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
> * External user API, exported by symbols to be linked dynamically.
> vfio.c:1615: warning: missing initial short description on line:
> * External user API, exported by symbols to be linked dynamically.
> vfio.c:1663: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
> * External user API, exported by symbols to be linked dynamically.
> vfio.c:1663: warning: missing initial short description on line:
> * External user API, exported by symbols to be linked dynamically.
> vfio.c:1742: warning: Function parameter or member 'caps' not described in 'vfio_info_cap_add'
> vfio.c:1742: warning: Function parameter or member 'size' not described in 'vfio_info_cap_add'
> vfio.c:1742: warning: Function parameter or member 'id' not described in 'vfio_info_cap_add'
> vfio.c:1742: warning: Function parameter or member 'version' not described in 'vfio_info_cap_add'
> vfio.c:1742: warning: expecting prototype for Sub(). Prototype was for vfio_info_cap_add() instead
> vfio.c:2276: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
> * Module/class support
> vfio.c:2276: warning: missing initial short description on line:
> * Module/class support
>
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Reported-by: kernel test robot <lkp@intel.com>
> Cc: Jason Gunthorpe <jgg@nvidia.com>
> Cc: Alex Williamson <alex.williamson@redhat.com>
> Cc: Eric Auger <eric.auger@redhat.com>
> Cc: Cornelia Huck <cohuck@redhat.com>
> Cc: kvm@vger.kernel.org
> ---
> drivers/vfio/vfio.c | 28 ++++++++++++++--------------
> 1 file changed, 14 insertions(+), 14 deletions(-)
It's been like that since the code was introduced, these were probably
never intended to be kerneldoc comments.
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: drivers/vfio/vfio.c:293: warning: expecting prototype for Container objects(). Prototype was for vfio_container_get() instead
2021-11-10 23:19 ` Randy Dunlap
@ 2021-11-10 23:26 ` Jason Gunthorpe
2021-11-11 7:56 ` Cornelia Huck
2021-11-30 19:30 ` Alex Williamson
2 siblings, 0 replies; 7+ messages in thread
From: Jason Gunthorpe @ 2021-11-10 23:26 UTC (permalink / raw)
To: Randy Dunlap
Cc: kernel test robot, kbuild-all, linux-kernel, Alex Williamson,
Eric Auger, Cornelia Huck, kvm
On Wed, Nov 10, 2021 at 03:19:40PM -0800, Randy Dunlap wrote:
> On 11/10/21 8:42 AM, Jason Gunthorpe wrote:
> > On Wed, Nov 10, 2021 at 11:12:39PM +0800, kernel test robot wrote:
> > > Hi Jason,
> > >
> > > FYI, the error/warning still remains.
> >
> > This is just a long standing kdoc misuse.
> >
> > vfio is not W=1 kdoc clean.
> >
> > Until someone takes a project to fix this comprehensively there is not
> > much point in reporting new complaints related the existing mis-use..
>
> Hi,
>
> Can we just remove all misused "/**" comments in vfio.c until
> someone cares enough to use proper kernel-doc there?
No objection from me
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Jason
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: drivers/vfio/vfio.c:293: warning: expecting prototype for Container objects(). Prototype was for vfio_container_get() instead
2021-11-10 16:42 ` Jason Gunthorpe
@ 2021-11-10 23:19 ` Randy Dunlap
2021-11-10 23:26 ` Jason Gunthorpe
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Randy Dunlap @ 2021-11-10 23:19 UTC (permalink / raw)
To: Jason Gunthorpe, kernel test robot
Cc: kbuild-all, linux-kernel, Alex Williamson, Eric Auger,
Cornelia Huck, kvm
On 11/10/21 8:42 AM, Jason Gunthorpe wrote:
> On Wed, Nov 10, 2021 at 11:12:39PM +0800, kernel test robot wrote:
>> Hi Jason,
>>
>> FYI, the error/warning still remains.
>
> This is just a long standing kdoc misuse.
>
> vfio is not W=1 kdoc clean.
>
> Until someone takes a project to fix this comprehensively there is not
> much point in reporting new complaints related the existing mis-use..
Hi,
Can we just remove all misused "/**" comments in vfio.c until
someone cares enough to use proper kernel-doc there?
---
From: Randy Dunlap <rdunlap@infradead.org>
Subject: [PATCH] vfio/vfio: remove all kernel-doc notation
vfio.c abuses (misuses) "/**", which indicates the beginning of
kernel-doc notation in the kernel tree. This causes a bunch of
kernel-doc complaints about this source file, so quieten all of
them by changing all "/**" to "/*".
vfio.c:236: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
* IOMMU driver registration
vfio.c:236: warning: missing initial short description on line:
* IOMMU driver registration
vfio.c:295: warning: expecting prototype for Container objects(). Prototype was for vfio_container_get() instead
vfio.c:317: warning: expecting prototype for Group objects(). Prototype was for __vfio_group_get_from_iommu() instead
vfio.c:496: warning: Function parameter or member 'device' not described in 'vfio_device_put'
vfio.c:496: warning: expecting prototype for Device objects(). Prototype was for vfio_device_put() instead
vfio.c:599: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
* Async device support
vfio.c:599: warning: missing initial short description on line:
* Async device support
vfio.c:693: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
* VFIO driver API
vfio.c:693: warning: missing initial short description on line:
* VFIO driver API
vfio.c:835: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
* Get a reference to the vfio_device for a device. Even if the
vfio.c:835: warning: missing initial short description on line:
* Get a reference to the vfio_device for a device. Even if the
vfio.c:969: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
* VFIO base fd, /dev/vfio/vfio
vfio.c:969: warning: missing initial short description on line:
* VFIO base fd, /dev/vfio/vfio
vfio.c:1187: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
* VFIO Group fd, /dev/vfio/$GROUP
vfio.c:1187: warning: missing initial short description on line:
* VFIO Group fd, /dev/vfio/$GROUP
vfio.c:1540: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
* VFIO Device fd
vfio.c:1540: warning: missing initial short description on line:
* VFIO Device fd
vfio.c:1615: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
* External user API, exported by symbols to be linked dynamically.
vfio.c:1615: warning: missing initial short description on line:
* External user API, exported by symbols to be linked dynamically.
vfio.c:1663: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
* External user API, exported by symbols to be linked dynamically.
vfio.c:1663: warning: missing initial short description on line:
* External user API, exported by symbols to be linked dynamically.
vfio.c:1742: warning: Function parameter or member 'caps' not described in 'vfio_info_cap_add'
vfio.c:1742: warning: Function parameter or member 'size' not described in 'vfio_info_cap_add'
vfio.c:1742: warning: Function parameter or member 'id' not described in 'vfio_info_cap_add'
vfio.c:1742: warning: Function parameter or member 'version' not described in 'vfio_info_cap_add'
vfio.c:1742: warning: expecting prototype for Sub(). Prototype was for vfio_info_cap_add() instead
vfio.c:2276: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
* Module/class support
vfio.c:2276: warning: missing initial short description on line:
* Module/class support
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Reported-by: kernel test robot <lkp@intel.com>
Cc: Jason Gunthorpe <jgg@nvidia.com>
Cc: Alex Williamson <alex.williamson@redhat.com>
Cc: Eric Auger <eric.auger@redhat.com>
Cc: Cornelia Huck <cohuck@redhat.com>
Cc: kvm@vger.kernel.org
---
drivers/vfio/vfio.c | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)
--- linux-next-20211110.orig/drivers/vfio/vfio.c
+++ linux-next-20211110/drivers/vfio/vfio.c
@@ -232,7 +232,7 @@ static inline bool vfio_iommu_driver_all
}
#endif /* CONFIG_VFIO_NOIOMMU */
-/**
+/*
* IOMMU driver registration
*/
int vfio_register_iommu_driver(const struct vfio_iommu_driver_ops *ops)
@@ -285,7 +285,7 @@ static int vfio_iommu_group_notifier(str
unsigned long action, void *data);
static void vfio_group_get(struct vfio_group *group);
-/**
+/*
* Container objects - containers are created when /dev/vfio/vfio is
* opened, but their lifecycle extends until the last user is done, so
* it's freed via kref. Must support container/group/device being
@@ -309,7 +309,7 @@ static void vfio_container_put(struct vf
kref_put(&container->kref, vfio_container_release);
}
-/**
+/*
* Group objects - create, release, get, put, search
*/
static struct vfio_group *
@@ -488,7 +488,7 @@ static struct vfio_group *vfio_group_get
return group;
}
-/**
+/*
* Device objects - create, release, get, put, search
*/
/* Device reference always implies a group reference */
@@ -595,7 +595,7 @@ static int vfio_dev_viable(struct device
return ret;
}
-/**
+/*
* Async device support
*/
static int vfio_group_nb_add_dev(struct vfio_group *group, struct device *dev)
@@ -689,7 +689,7 @@ static int vfio_iommu_group_notifier(str
return NOTIFY_OK;
}
-/**
+/*
* VFIO driver API
*/
void vfio_init_group_dev(struct vfio_device *device, struct device *dev,
@@ -831,7 +831,7 @@ int vfio_register_emulated_iommu_dev(str
}
EXPORT_SYMBOL_GPL(vfio_register_emulated_iommu_dev);
-/**
+/*
* Get a reference to the vfio_device for a device. Even if the
* caller thinks they own the device, they could be racing with a
* release call path, so we can't trust drvdata for the shortcut.
@@ -965,7 +965,7 @@ void vfio_unregister_group_dev(struct vf
}
EXPORT_SYMBOL_GPL(vfio_unregister_group_dev);
-/**
+/*
* VFIO base fd, /dev/vfio/vfio
*/
static long vfio_ioctl_check_extension(struct vfio_container *container,
@@ -1183,7 +1183,7 @@ static const struct file_operations vfio
.compat_ioctl = compat_ptr_ioctl,
};
-/**
+/*
* VFIO Group fd, /dev/vfio/$GROUP
*/
static void __vfio_group_unset_container(struct vfio_group *group)
@@ -1536,7 +1536,7 @@ static const struct file_operations vfio
.release = vfio_group_fops_release,
};
-/**
+/*
* VFIO Device fd
*/
static int vfio_device_fops_release(struct inode *inode, struct file *filep)
@@ -1611,7 +1611,7 @@ static const struct file_operations vfio
.mmap = vfio_device_fops_mmap,
};
-/**
+/*
* External user API, exported by symbols to be linked dynamically.
*
* The protocol includes:
@@ -1659,7 +1659,7 @@ struct vfio_group *vfio_group_get_extern
}
EXPORT_SYMBOL_GPL(vfio_group_get_external_user);
-/**
+/*
* External user API, exported by symbols to be linked dynamically.
* The external user passes in a device pointer
* to verify that:
@@ -1725,7 +1725,7 @@ long vfio_external_check_extension(struc
}
EXPORT_SYMBOL_GPL(vfio_external_check_extension);
-/**
+/*
* Sub-module support
*/
/*
@@ -2272,7 +2272,7 @@ struct iommu_domain *vfio_group_iommu_do
}
EXPORT_SYMBOL_GPL(vfio_group_iommu_domain);
-/**
+/*
* Module/class support
*/
static char *vfio_devnode(struct device *dev, umode_t *mode)
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: drivers/vfio/vfio.c:293: warning: expecting prototype for Container objects(). Prototype was for vfio_container_get() instead
2021-11-10 15:12 kernel test robot
@ 2021-11-10 16:42 ` Jason Gunthorpe
2021-11-10 23:19 ` Randy Dunlap
0 siblings, 1 reply; 7+ messages in thread
From: Jason Gunthorpe @ 2021-11-10 16:42 UTC (permalink / raw)
To: kernel test robot; +Cc: kbuild-all, linux-kernel, Alex Williamson, Eric Auger
On Wed, Nov 10, 2021 at 11:12:39PM +0800, kernel test robot wrote:
> Hi Jason,
>
> FYI, the error/warning still remains.
This is just a long standing kdoc misuse.
vfio is not W=1 kdoc clean.
Until someone takes a project to fix this comprehensively there is not
much point in reporting new complaints related the existing mis-use..
Jason
^ permalink raw reply [flat|nested] 7+ messages in thread
* drivers/vfio/vfio.c:293: warning: expecting prototype for Container objects(). Prototype was for vfio_container_get() instead
@ 2021-11-10 15:12 kernel test robot
2021-11-10 16:42 ` Jason Gunthorpe
0 siblings, 1 reply; 7+ messages in thread
From: kernel test robot @ 2021-11-10 15:12 UTC (permalink / raw)
To: Jason Gunthorpe; +Cc: kbuild-all, linux-kernel, Alex Williamson, Eric Auger
[-- Attachment #1: Type: text/plain, Size: 15634 bytes --]
Hi Jason,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: cb690f5238d71f543f4ce874aa59237cf53a877c
commit: 179209fa12709a3df8888c323b37315da2683c24 vfio: IOMMU_API should be selected
date: 8 months ago
config: microblaze-buildonly-randconfig-r004-20210927 (attached as .config)
compiler: microblaze-linux-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://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=179209fa12709a3df8888c323b37315da2683c24
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 179209fa12709a3df8888c323b37315da2683c24
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=microblaze SHELL=/bin/bash arch/microblaze/kernel/ drivers/base/ drivers/char/ drivers/clk/ drivers/clocksource/ drivers/dax/ drivers/firewire/ drivers/gpu/drm/amd/amdgpu/ drivers/gpu/drm/amd/display/amdgpu_dm/ drivers/gpu/drm/amd/display/dc/dce/ drivers/gpu/drm/amd/display/dc/dce110/ drivers/gpu/drm/exynos/ drivers/i3c/ drivers/iio/accel/ drivers/memstick/host/ drivers/misc/ drivers/nvmem/ drivers/pci/ drivers/phy/qualcomm/ drivers/power/supply/ drivers/rapidio/ drivers/rtc/ drivers/soc/qcom/ drivers/thermal/ drivers/tty/ drivers/vfio/ drivers/video/fbdev/ drivers/w1/masters/ drivers/w1/slaves/ fs/ init/ kernel/ lib/ mm/ net/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
drivers/vfio/vfio.c:224: warning: Function parameter or member 'ops' not described in 'vfio_register_iommu_driver'
drivers/vfio/vfio.c:224: warning: expecting prototype for IOMMU driver registration(). Prototype was for vfio_register_iommu_driver() instead
drivers/vfio/vfio.c:273: warning: Function parameter or member 'group' not described in 'vfio_alloc_group_minor'
drivers/vfio/vfio.c:273: warning: expecting prototype for free(). Prototype was for vfio_alloc_group_minor() instead
drivers/vfio/vfio.c:293: warning: Function parameter or member 'container' not described in 'vfio_container_get'
>> drivers/vfio/vfio.c:293: warning: expecting prototype for Container objects(). Prototype was for vfio_container_get() instead
drivers/vfio/vfio.c:325: warning: Function parameter or member 'iommu_group' not described in 'vfio_create_group'
>> drivers/vfio/vfio.c:325: warning: expecting prototype for Group objects(). Prototype was for vfio_create_group() instead
drivers/vfio/vfio.c:540: warning: Function parameter or member 'group' not described in 'vfio_group_create_device'
drivers/vfio/vfio.c:540: warning: Function parameter or member 'dev' not described in 'vfio_group_create_device'
drivers/vfio/vfio.c:540: warning: Function parameter or member 'ops' not described in 'vfio_group_create_device'
drivers/vfio/vfio.c:540: warning: Function parameter or member 'device_data' not described in 'vfio_group_create_device'
drivers/vfio/vfio.c:540: warning: expecting prototype for Device objects(). Prototype was for vfio_group_create_device() instead
drivers/vfio/vfio.c:694: warning: Function parameter or member 'group' not described in 'vfio_group_nb_add_dev'
drivers/vfio/vfio.c:694: warning: Function parameter or member 'dev' not described in 'vfio_group_nb_add_dev'
drivers/vfio/vfio.c:694: warning: expecting prototype for Async device support(). Prototype was for vfio_group_nb_add_dev() instead
drivers/vfio/vfio.c:806: warning: Function parameter or member 'dev' not described in 'vfio_add_group_dev'
drivers/vfio/vfio.c:806: warning: Function parameter or member 'ops' not described in 'vfio_add_group_dev'
drivers/vfio/vfio.c:806: warning: Function parameter or member 'device_data' not described in 'vfio_add_group_dev'
drivers/vfio/vfio.c:806: warning: expecting prototype for VFIO driver API(). Prototype was for vfio_add_group_dev() instead
drivers/vfio/vfio.c:864: warning: Function parameter or member 'dev' not described in 'vfio_device_get_from_dev'
drivers/vfio/vfio.c:864: warning: expecting prototype for Even if the(). Prototype was for vfio_device_get_from_dev() instead
drivers/vfio/vfio.c:1022: warning: Function parameter or member 'container' not described in 'vfio_ioctl_check_extension'
drivers/vfio/vfio.c:1022: warning: Function parameter or member 'arg' not described in 'vfio_ioctl_check_extension'
drivers/vfio/vfio.c:1022: warning: expecting prototype for vfio(). Prototype was for vfio_ioctl_check_extension() instead
drivers/vfio/vfio.c:1298: warning: Function parameter or member 'group' not described in '__vfio_group_unset_container'
drivers/vfio/vfio.c:1298: warning: expecting prototype for GROUP(). Prototype was for __vfio_group_unset_container() instead
drivers/vfio/vfio.c:1633: warning: Function parameter or member 'inode' not described in 'vfio_device_fops_release'
drivers/vfio/vfio.c:1633: warning: Function parameter or member 'filep' not described in 'vfio_device_fops_release'
drivers/vfio/vfio.c:1633: warning: expecting prototype for VFIO Device fd(). Prototype was for vfio_device_fops_release() instead
drivers/vfio/vfio.c:1700: warning: wrong kernel-doc identifier on line:
* External user API, exported by symbols to be linked dynamically.
drivers/vfio/vfio.c:1745: warning: wrong kernel-doc identifier on line:
* External user API, exported by symbols to be linked dynamically.
drivers/vfio/vfio.c:1824: warning: Function parameter or member 'caps' not described in 'vfio_info_cap_add'
drivers/vfio/vfio.c:1824: warning: Function parameter or member 'size' not described in 'vfio_info_cap_add'
drivers/vfio/vfio.c:1824: warning: Function parameter or member 'id' not described in 'vfio_info_cap_add'
drivers/vfio/vfio.c:1824: warning: Function parameter or member 'version' not described in 'vfio_info_cap_add'
>> drivers/vfio/vfio.c:1824: warning: expecting prototype for Sub(). Prototype was for vfio_info_cap_add() instead
drivers/vfio/vfio.c:2361: warning: Function parameter or member 'dev' not described in 'vfio_devnode'
drivers/vfio/vfio.c:2361: warning: Function parameter or member 'mode' not described in 'vfio_devnode'
drivers/vfio/vfio.c:2361: warning: expecting prototype for class support(). Prototype was for vfio_devnode() instead
vim +293 drivers/vfio/vfio.c
cba3345cc494ad Alex Williamson 2012-07-31 285
cba3345cc494ad Alex Williamson 2012-07-31 286 /**
cba3345cc494ad Alex Williamson 2012-07-31 287 * Container objects - containers are created when /dev/vfio/vfio is
cba3345cc494ad Alex Williamson 2012-07-31 288 * opened, but their lifecycle extends until the last user is done, so
cba3345cc494ad Alex Williamson 2012-07-31 289 * it's freed via kref. Must support container/group/device being
cba3345cc494ad Alex Williamson 2012-07-31 290 * closed in any order.
cba3345cc494ad Alex Williamson 2012-07-31 291 */
cba3345cc494ad Alex Williamson 2012-07-31 292 static void vfio_container_get(struct vfio_container *container)
cba3345cc494ad Alex Williamson 2012-07-31 @293 {
cba3345cc494ad Alex Williamson 2012-07-31 294 kref_get(&container->kref);
cba3345cc494ad Alex Williamson 2012-07-31 295 }
cba3345cc494ad Alex Williamson 2012-07-31 296
cba3345cc494ad Alex Williamson 2012-07-31 297 static void vfio_container_release(struct kref *kref)
cba3345cc494ad Alex Williamson 2012-07-31 298 {
cba3345cc494ad Alex Williamson 2012-07-31 299 struct vfio_container *container;
cba3345cc494ad Alex Williamson 2012-07-31 300 container = container_of(kref, struct vfio_container, kref);
cba3345cc494ad Alex Williamson 2012-07-31 301
cba3345cc494ad Alex Williamson 2012-07-31 302 kfree(container);
cba3345cc494ad Alex Williamson 2012-07-31 303 }
cba3345cc494ad Alex Williamson 2012-07-31 304
cba3345cc494ad Alex Williamson 2012-07-31 305 static void vfio_container_put(struct vfio_container *container)
cba3345cc494ad Alex Williamson 2012-07-31 306 {
cba3345cc494ad Alex Williamson 2012-07-31 307 kref_put(&container->kref, vfio_container_release);
cba3345cc494ad Alex Williamson 2012-07-31 308 }
cba3345cc494ad Alex Williamson 2012-07-31 309
9df7b25ab71cee Jiang Liu 2012-12-07 310 static void vfio_group_unlock_and_free(struct vfio_group *group)
9df7b25ab71cee Jiang Liu 2012-12-07 311 {
9df7b25ab71cee Jiang Liu 2012-12-07 312 mutex_unlock(&vfio.group_lock);
9df7b25ab71cee Jiang Liu 2012-12-07 313 /*
9df7b25ab71cee Jiang Liu 2012-12-07 314 * Unregister outside of lock. A spurious callback is harmless now
9df7b25ab71cee Jiang Liu 2012-12-07 315 * that the group is no longer in vfio.group_list.
9df7b25ab71cee Jiang Liu 2012-12-07 316 */
9df7b25ab71cee Jiang Liu 2012-12-07 317 iommu_group_unregister_notifier(group->iommu_group, &group->nb);
9df7b25ab71cee Jiang Liu 2012-12-07 318 kfree(group);
9df7b25ab71cee Jiang Liu 2012-12-07 319 }
9df7b25ab71cee Jiang Liu 2012-12-07 320
cba3345cc494ad Alex Williamson 2012-07-31 321 /**
cba3345cc494ad Alex Williamson 2012-07-31 322 * Group objects - create, release, get, put, search
cba3345cc494ad Alex Williamson 2012-07-31 323 */
16ab8a5cbea463 Alex Williamson 2016-01-27 324 static struct vfio_group *vfio_create_group(struct iommu_group *iommu_group)
cba3345cc494ad Alex Williamson 2012-07-31 @325 {
cba3345cc494ad Alex Williamson 2012-07-31 326 struct vfio_group *group, *tmp;
cba3345cc494ad Alex Williamson 2012-07-31 327 struct device *dev;
cba3345cc494ad Alex Williamson 2012-07-31 328 int ret, minor;
cba3345cc494ad Alex Williamson 2012-07-31 329
cba3345cc494ad Alex Williamson 2012-07-31 330 group = kzalloc(sizeof(*group), GFP_KERNEL);
cba3345cc494ad Alex Williamson 2012-07-31 331 if (!group)
cba3345cc494ad Alex Williamson 2012-07-31 332 return ERR_PTR(-ENOMEM);
cba3345cc494ad Alex Williamson 2012-07-31 333
cba3345cc494ad Alex Williamson 2012-07-31 334 kref_init(&group->kref);
cba3345cc494ad Alex Williamson 2012-07-31 335 INIT_LIST_HEAD(&group->device_list);
cba3345cc494ad Alex Williamson 2012-07-31 336 mutex_init(&group->device_lock);
60720a0fc6469e Alex Williamson 2015-02-06 337 INIT_LIST_HEAD(&group->unbound_list);
60720a0fc6469e Alex Williamson 2015-02-06 338 mutex_init(&group->unbound_lock);
cba3345cc494ad Alex Williamson 2012-07-31 339 atomic_set(&group->container_users, 0);
6d6768c61b39a2 Alex Williamson 2013-06-25 340 atomic_set(&group->opened, 0);
6586b561a91cd8 Alex Williamson 2017-08-17 341 init_waitqueue_head(&group->container_q);
cba3345cc494ad Alex Williamson 2012-07-31 342 group->iommu_group = iommu_group;
16ab8a5cbea463 Alex Williamson 2016-01-27 343 #ifdef CONFIG_VFIO_NOIOMMU
16ab8a5cbea463 Alex Williamson 2016-01-27 344 group->noiommu = (iommu_group_get_iommudata(iommu_group) == &noiommu);
16ab8a5cbea463 Alex Williamson 2016-01-27 345 #endif
ccd46dbae77dbf Jike Song 2016-12-01 346 BLOCKING_INIT_NOTIFIER_HEAD(&group->notifier);
cba3345cc494ad Alex Williamson 2012-07-31 347
cba3345cc494ad Alex Williamson 2012-07-31 348 group->nb.notifier_call = vfio_iommu_group_notifier;
cba3345cc494ad Alex Williamson 2012-07-31 349
cba3345cc494ad Alex Williamson 2012-07-31 350 /*
cba3345cc494ad Alex Williamson 2012-07-31 351 * blocking notifiers acquire a rwsem around registering and hold
cba3345cc494ad Alex Williamson 2012-07-31 352 * it around callback. Therefore, need to register outside of
cba3345cc494ad Alex Williamson 2012-07-31 353 * vfio.group_lock to avoid A-B/B-A contention. Our callback won't
cba3345cc494ad Alex Williamson 2012-07-31 354 * do anything unless it can find the group in vfio.group_list, so
cba3345cc494ad Alex Williamson 2012-07-31 355 * no harm in registering early.
cba3345cc494ad Alex Williamson 2012-07-31 356 */
cba3345cc494ad Alex Williamson 2012-07-31 357 ret = iommu_group_register_notifier(iommu_group, &group->nb);
cba3345cc494ad Alex Williamson 2012-07-31 358 if (ret) {
cba3345cc494ad Alex Williamson 2012-07-31 359 kfree(group);
cba3345cc494ad Alex Williamson 2012-07-31 360 return ERR_PTR(ret);
cba3345cc494ad Alex Williamson 2012-07-31 361 }
cba3345cc494ad Alex Williamson 2012-07-31 362
cba3345cc494ad Alex Williamson 2012-07-31 363 mutex_lock(&vfio.group_lock);
cba3345cc494ad Alex Williamson 2012-07-31 364
cba3345cc494ad Alex Williamson 2012-07-31 365 /* Did we race creating this group? */
cba3345cc494ad Alex Williamson 2012-07-31 366 list_for_each_entry(tmp, &vfio.group_list, vfio_next) {
cba3345cc494ad Alex Williamson 2012-07-31 367 if (tmp->iommu_group == iommu_group) {
cba3345cc494ad Alex Williamson 2012-07-31 368 vfio_group_get(tmp);
9df7b25ab71cee Jiang Liu 2012-12-07 369 vfio_group_unlock_and_free(group);
cba3345cc494ad Alex Williamson 2012-07-31 370 return tmp;
cba3345cc494ad Alex Williamson 2012-07-31 371 }
cba3345cc494ad Alex Williamson 2012-07-31 372 }
cba3345cc494ad Alex Williamson 2012-07-31 373
2f51bf4be99386 Zhen Lei 2015-03-16 374 minor = vfio_alloc_group_minor(group);
2f51bf4be99386 Zhen Lei 2015-03-16 375 if (minor < 0) {
2f51bf4be99386 Zhen Lei 2015-03-16 376 vfio_group_unlock_and_free(group);
2f51bf4be99386 Zhen Lei 2015-03-16 377 return ERR_PTR(minor);
2f51bf4be99386 Zhen Lei 2015-03-16 378 }
2f51bf4be99386 Zhen Lei 2015-03-16 379
d10999016f4164 Alex Williamson 2013-12-19 380 dev = device_create(vfio.class, NULL,
d10999016f4164 Alex Williamson 2013-12-19 381 MKDEV(MAJOR(vfio.group_devt), minor),
03a76b60f8ba27 Alex Williamson 2015-12-21 382 group, "%s%d", group->noiommu ? "noiommu-" : "",
03a76b60f8ba27 Alex Williamson 2015-12-21 383 iommu_group_id(iommu_group));
cba3345cc494ad Alex Williamson 2012-07-31 384 if (IS_ERR(dev)) {
cba3345cc494ad Alex Williamson 2012-07-31 385 vfio_free_group_minor(minor);
9df7b25ab71cee Jiang Liu 2012-12-07 386 vfio_group_unlock_and_free(group);
7b3a10df1d4bd8 Dan Carpenter 2017-05-18 387 return ERR_CAST(dev);
cba3345cc494ad Alex Williamson 2012-07-31 388 }
cba3345cc494ad Alex Williamson 2012-07-31 389
cba3345cc494ad Alex Williamson 2012-07-31 390 group->minor = minor;
cba3345cc494ad Alex Williamson 2012-07-31 391 group->dev = dev;
cba3345cc494ad Alex Williamson 2012-07-31 392
cba3345cc494ad Alex Williamson 2012-07-31 393 list_add(&group->vfio_next, &vfio.group_list);
cba3345cc494ad Alex Williamson 2012-07-31 394
cba3345cc494ad Alex Williamson 2012-07-31 395 mutex_unlock(&vfio.group_lock);
cba3345cc494ad Alex Williamson 2012-07-31 396
cba3345cc494ad Alex Williamson 2012-07-31 397 return group;
cba3345cc494ad Alex Williamson 2012-07-31 398 }
cba3345cc494ad Alex Williamson 2012-07-31 399
:::::: The code at line 293 was first introduced by commit
:::::: cba3345cc494ad286ca8823f44b2c16cae496679 vfio: VFIO core
:::::: TO: Alex Williamson <alex.williamson@redhat.com>
:::::: CC: Alex Williamson <alex.williamson@redhat.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 29658 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2021-11-30 19:32 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-27 20:33 drivers/vfio/vfio.c:293: warning: expecting prototype for Container objects(). Prototype was for vfio_container_get() instead kernel test robot
2021-11-10 15:12 kernel test robot
2021-11-10 16:42 ` Jason Gunthorpe
2021-11-10 23:19 ` Randy Dunlap
2021-11-10 23:26 ` Jason Gunthorpe
2021-11-11 7:56 ` Cornelia Huck
2021-11-30 19:30 ` Alex Williamson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).