All of lore.kernel.org
 help / color / mirror / Atom feed
* [sashal-linux-stable:queue-4.19 9/399] drivers/net/ethernet/mellanox/mlx4/main.c:3985:2: error: implicit declaration of function 'devlink_reload_enable'; did you mean 'devlink_region_create'?
@ 2019-11-19  0:48 kbuild test robot
  0 siblings, 0 replies; only message in thread
From: kbuild test robot @ 2019-11-19  0:48 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 8587 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git queue-4.19
head:   59898ec8a6ae5632f8ecb2a15e25f1f3d715995b
commit: 85908d02670ea00a6172dfe9ef9bba7ea826ed1b [9/399] devlink: disallow reload operation during device cleanup
config: powerpc-defconfig (attached as .config)
compiler: powerpc64-linux-gcc (GCC) 7.4.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout 85908d02670ea00a6172dfe9ef9bba7ea826ed1b
        # save the attached .config to linux build tree
        GCC_VERSION=7.4.0 make.cross ARCH=powerpc 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   drivers/net/ethernet/mellanox/mlx4/main.c: In function 'mlx4_init_one':
>> drivers/net/ethernet/mellanox/mlx4/main.c:3985:2: error: implicit declaration of function 'devlink_reload_enable'; did you mean 'devlink_region_create'? [-Werror=implicit-function-declaration]
     devlink_reload_enable(devlink);
     ^~~~~~~~~~~~~~~~~~~~~
     devlink_region_create
   drivers/net/ethernet/mellanox/mlx4/main.c: In function 'mlx4_remove_one':
>> drivers/net/ethernet/mellanox/mlx4/main.c:4097:2: error: implicit declaration of function 'devlink_reload_disable'; did you mean 'devlink_region_destroy'? [-Werror=implicit-function-declaration]
     devlink_reload_disable(devlink);
     ^~~~~~~~~~~~~~~~~~~~~~
     devlink_region_destroy
   cc1: some warnings being treated as errors

vim +3985 drivers/net/ethernet/mellanox/mlx4/main.c

  3944	
  3945	static int mlx4_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
  3946	{
  3947		struct devlink *devlink;
  3948		struct mlx4_priv *priv;
  3949		struct mlx4_dev *dev;
  3950		int ret;
  3951	
  3952		printk_once(KERN_INFO "%s", mlx4_version);
  3953	
  3954		devlink = devlink_alloc(&mlx4_devlink_ops, sizeof(*priv));
  3955		if (!devlink)
  3956			return -ENOMEM;
  3957		priv = devlink_priv(devlink);
  3958	
  3959		dev       = &priv->dev;
  3960		dev->persist = kzalloc(sizeof(*dev->persist), GFP_KERNEL);
  3961		if (!dev->persist) {
  3962			ret = -ENOMEM;
  3963			goto err_devlink_free;
  3964		}
  3965		dev->persist->pdev = pdev;
  3966		dev->persist->dev = dev;
  3967		pci_set_drvdata(pdev, dev->persist);
  3968		priv->pci_dev_data = id->driver_data;
  3969		mutex_init(&dev->persist->device_state_mutex);
  3970		mutex_init(&dev->persist->interface_state_mutex);
  3971		mutex_init(&dev->persist->pci_status_mutex);
  3972	
  3973		ret = devlink_register(devlink, &pdev->dev);
  3974		if (ret)
  3975			goto err_persist_free;
  3976		ret = devlink_params_register(devlink, mlx4_devlink_params,
  3977					      ARRAY_SIZE(mlx4_devlink_params));
  3978		if (ret)
  3979			goto err_devlink_unregister;
  3980		mlx4_devlink_set_params_init_values(devlink);
  3981		ret =  __mlx4_init_one(pdev, id->driver_data, priv);
  3982		if (ret)
  3983			goto err_params_unregister;
  3984	
> 3985		devlink_reload_enable(devlink);
  3986		pci_save_state(pdev);
  3987		return 0;
  3988	
  3989	err_params_unregister:
  3990		devlink_params_unregister(devlink, mlx4_devlink_params,
  3991					  ARRAY_SIZE(mlx4_devlink_params));
  3992	err_devlink_unregister:
  3993		devlink_unregister(devlink);
  3994	err_persist_free:
  3995		kfree(dev->persist);
  3996	err_devlink_free:
  3997		devlink_free(devlink);
  3998		return ret;
  3999	}
  4000	
  4001	static void mlx4_clean_dev(struct mlx4_dev *dev)
  4002	{
  4003		struct mlx4_dev_persistent *persist = dev->persist;
  4004		struct mlx4_priv *priv = mlx4_priv(dev);
  4005		unsigned long	flags = (dev->flags & RESET_PERSIST_MASK_FLAGS);
  4006	
  4007		memset(priv, 0, sizeof(*priv));
  4008		priv->dev.persist = persist;
  4009		priv->dev.flags = flags;
  4010	}
  4011	
  4012	static void mlx4_unload_one(struct pci_dev *pdev)
  4013	{
  4014		struct mlx4_dev_persistent *persist = pci_get_drvdata(pdev);
  4015		struct mlx4_dev  *dev  = persist->dev;
  4016		struct mlx4_priv *priv = mlx4_priv(dev);
  4017		int               pci_dev_data;
  4018		int p, i;
  4019	
  4020		if (priv->removed)
  4021			return;
  4022	
  4023		/* saving current ports type for further use */
  4024		for (i = 0; i < dev->caps.num_ports; i++) {
  4025			dev->persist->curr_port_type[i] = dev->caps.port_type[i + 1];
  4026			dev->persist->curr_port_poss_type[i] = dev->caps.
  4027							       possible_type[i + 1];
  4028		}
  4029	
  4030		pci_dev_data = priv->pci_dev_data;
  4031	
  4032		mlx4_stop_sense(dev);
  4033		mlx4_unregister_device(dev);
  4034	
  4035		for (p = 1; p <= dev->caps.num_ports; p++) {
  4036			mlx4_cleanup_port_info(&priv->port[p]);
  4037			mlx4_CLOSE_PORT(dev, p);
  4038		}
  4039	
  4040		if (mlx4_is_master(dev))
  4041			mlx4_free_resource_tracker(dev,
  4042						   RES_TR_FREE_SLAVES_ONLY);
  4043	
  4044		mlx4_cleanup_default_counters(dev);
  4045		if (!mlx4_is_slave(dev))
  4046			mlx4_cleanup_counters_table(dev);
  4047		mlx4_cleanup_qp_table(dev);
  4048		mlx4_cleanup_srq_table(dev);
  4049		mlx4_cleanup_cq_table(dev);
  4050		mlx4_cmd_use_polling(dev);
  4051		mlx4_cleanup_eq_table(dev);
  4052		mlx4_cleanup_mcg_table(dev);
  4053		mlx4_cleanup_mr_table(dev);
  4054		mlx4_cleanup_xrcd_table(dev);
  4055		mlx4_cleanup_pd_table(dev);
  4056	
  4057		if (mlx4_is_master(dev))
  4058			mlx4_free_resource_tracker(dev,
  4059						   RES_TR_FREE_STRUCTS_ONLY);
  4060	
  4061		iounmap(priv->kar);
  4062		mlx4_uar_free(dev, &priv->driver_uar);
  4063		mlx4_cleanup_uar_table(dev);
  4064		if (!mlx4_is_slave(dev))
  4065			mlx4_clear_steering(dev);
  4066		mlx4_free_eq_table(dev);
  4067		if (mlx4_is_master(dev))
  4068			mlx4_multi_func_cleanup(dev);
  4069		mlx4_close_hca(dev);
  4070		mlx4_close_fw(dev);
  4071		if (mlx4_is_slave(dev))
  4072			mlx4_multi_func_cleanup(dev);
  4073		mlx4_cmd_cleanup(dev, MLX4_CMD_CLEANUP_ALL);
  4074	
  4075		if (dev->flags & MLX4_FLAG_MSI_X)
  4076			pci_disable_msix(pdev);
  4077	
  4078		if (!mlx4_is_slave(dev))
  4079			mlx4_free_ownership(dev);
  4080	
  4081		mlx4_slave_destroy_special_qp_cap(dev);
  4082		kfree(dev->dev_vfs);
  4083	
  4084		mlx4_clean_dev(dev);
  4085		priv->pci_dev_data = pci_dev_data;
  4086		priv->removed = 1;
  4087	}
  4088	
  4089	static void mlx4_remove_one(struct pci_dev *pdev)
  4090	{
  4091		struct mlx4_dev_persistent *persist = pci_get_drvdata(pdev);
  4092		struct mlx4_dev  *dev  = persist->dev;
  4093		struct mlx4_priv *priv = mlx4_priv(dev);
  4094		struct devlink *devlink = priv_to_devlink(priv);
  4095		int active_vfs = 0;
  4096	
> 4097		devlink_reload_disable(devlink);
  4098	
  4099		if (mlx4_is_slave(dev))
  4100			persist->interface_state |= MLX4_INTERFACE_STATE_NOWAIT;
  4101	
  4102		mutex_lock(&persist->interface_state_mutex);
  4103		persist->interface_state |= MLX4_INTERFACE_STATE_DELETION;
  4104		mutex_unlock(&persist->interface_state_mutex);
  4105	
  4106		/* Disabling SR-IOV is not allowed while there are active vf's */
  4107		if (mlx4_is_master(dev) && dev->flags & MLX4_FLAG_SRIOV) {
  4108			active_vfs = mlx4_how_many_lives_vf(dev);
  4109			if (active_vfs) {
  4110				pr_warn("Removing PF when there are active VF's !!\n");
  4111				pr_warn("Will not disable SR-IOV.\n");
  4112			}
  4113		}
  4114	
  4115		/* device marked to be under deletion running now without the lock
  4116		 * letting other tasks to be terminated
  4117		 */
  4118		if (persist->interface_state & MLX4_INTERFACE_STATE_UP)
  4119			mlx4_unload_one(pdev);
  4120		else
  4121			mlx4_info(dev, "%s: interface is down\n", __func__);
  4122		mlx4_catas_end(dev);
  4123		mlx4_crdump_end(dev);
  4124		if (dev->flags & MLX4_FLAG_SRIOV && !active_vfs) {
  4125			mlx4_warn(dev, "Disabling SR-IOV\n");
  4126			pci_disable_sriov(pdev);
  4127		}
  4128	
  4129		pci_release_regions(pdev);
  4130		mlx4_pci_disable_device(dev);
  4131		devlink_params_unregister(devlink, mlx4_devlink_params,
  4132					  ARRAY_SIZE(mlx4_devlink_params));
  4133		devlink_unregister(devlink);
  4134		kfree(dev->persist);
  4135		devlink_free(devlink);
  4136	}
  4137	

---
0-DAY kernel test infrastructure                 Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org Intel Corporation

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-11-19  0:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-11-19  0:48 [sashal-linux-stable:queue-4.19 9/399] drivers/net/ethernet/mellanox/mlx4/main.c:3985:2: error: implicit declaration of function 'devlink_reload_enable'; did you mean 'devlink_region_create'? kbuild test robot

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.