All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: drivers/vfio/vfio.c:293: warning: expecting prototype for Container objects(). Prototype was for vfio_container_get() instead
Date: Wed, 10 Nov 2021 23:12:39 +0800	[thread overview]
Message-ID: <202111102328.WDUm0Bl7-lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 15833 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(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 29658 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: Jason Gunthorpe <jgg@nvidia.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	Alex Williamson <alex.williamson@redhat.com>,
	Eric Auger <eric.auger@redhat.com>
Subject: drivers/vfio/vfio.c:293: warning: expecting prototype for Container objects(). Prototype was for vfio_container_get() instead
Date: Wed, 10 Nov 2021 23:12:39 +0800	[thread overview]
Message-ID: <202111102328.WDUm0Bl7-lkp@intel.com> (raw)

[-- 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 --]

             reply	other threads:[~2021-11-10 15:12 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-10 15:12 kernel test robot [this message]
2021-11-10 15:12 ` drivers/vfio/vfio.c:293: warning: expecting prototype for Container objects(). Prototype was for vfio_container_get() instead kernel test robot
2021-11-10 16:42 ` Jason Gunthorpe
2021-11-10 16:42   ` Jason Gunthorpe
2021-11-10 23:19   ` Randy Dunlap
2021-11-10 23:19     ` Randy Dunlap
2021-11-10 23:26     ` Jason Gunthorpe
2021-11-10 23:26       ` Jason Gunthorpe
2021-11-11  7:56     ` Cornelia Huck
2021-11-11  7:56       ` Cornelia Huck
2021-11-30 19:30     ` Alex Williamson
2021-11-30 19:30       ` Alex Williamson
  -- strict thread matches above, loose matches on Subject: below --
2021-09-27 20:33 kernel test robot
2021-09-27 20:33 ` kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202111102328.WDUm0Bl7-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.