All of lore.kernel.org
 help / color / mirror / Atom feed
* [saeed:mlx5-queue 1823/1834] drivers/net/ethernet/mellanox/mlx5/core/fs_core.c:2956 mlx5_init_fs() warn: missing error code 'err'
@ 2021-04-22  6:06 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-04-22  6:06 UTC (permalink / raw)
  To: kbuild

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

CC: kbuild-all(a)lists.01.org
TO: Paul Blakey <paulb@nvidia.com>
CC: Saeed Mahameed <saeedm@nvidia.com>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux.git mlx5-queue
head:   7cb88bf45e588520c8743125cfda21d74de95639
commit: 5de5d1022d1529c26a8a64973edbeb5897762136 [1823/1834] net/mlx5: Move chains ft pool to be used by all firmware steering
:::::: branch date: 12 hours ago
:::::: commit date: 12 hours ago
config: x86_64-randconfig-m001-20210421 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

New smatch warnings:
drivers/net/ethernet/mellanox/mlx5/core/fs_core.c:2956 mlx5_init_fs() warn: missing error code 'err'

Old smatch warnings:
drivers/net/ethernet/mellanox/mlx5/core/fs_core.c:1625 dest_is_valid() error: we previously assumed 'dest' could be null (see line 1614)

vim +/err +2956 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c

5f4183781a303d Aviad Yehezkel    2018-02-18  2940  
2530236303d9e7 Maor Gottlieb     2015-12-10  2941  int mlx5_init_fs(struct mlx5_core_dev *dev)
2530236303d9e7 Maor Gottlieb     2015-12-10  2942  {
fba53f7b571925 Maor Gottlieb     2016-07-04  2943  	struct mlx5_flow_steering *steering;
2530236303d9e7 Maor Gottlieb     2015-12-10  2944  	int err = 0;
2530236303d9e7 Maor Gottlieb     2015-12-10  2945  
43a335e055bb7e Amir Vadai        2016-05-13  2946  	err = mlx5_init_fc_stats(dev);
43a335e055bb7e Amir Vadai        2016-05-13  2947  	if (err)
43a335e055bb7e Amir Vadai        2016-05-13  2948  		return err;
43a335e055bb7e Amir Vadai        2016-05-13  2949  
5de5d1022d1529 Paul Blakey       2021-03-08  2950  	err = mlx5_ft_pool_init(dev);
5de5d1022d1529 Paul Blakey       2021-03-08  2951  	if (err)
5de5d1022d1529 Paul Blakey       2021-03-08  2952  		return err;
5de5d1022d1529 Paul Blakey       2021-03-08  2953  
fba53f7b571925 Maor Gottlieb     2016-07-04  2954  	steering = kzalloc(sizeof(*steering), GFP_KERNEL);
fba53f7b571925 Maor Gottlieb     2016-07-04  2955  	if (!steering)
5de5d1022d1529 Paul Blakey       2021-03-08 @2956  		goto err;
fba53f7b571925 Maor Gottlieb     2016-07-04  2957  	steering->dev = dev;
fba53f7b571925 Maor Gottlieb     2016-07-04  2958  	dev->priv.steering = steering;
fba53f7b571925 Maor Gottlieb     2016-07-04  2959  
a369d4ac4dff92 Maor Gottlieb     2017-08-27  2960  	steering->fgs_cache = kmem_cache_create("mlx5_fs_fgs",
a369d4ac4dff92 Maor Gottlieb     2017-08-27  2961  						sizeof(struct mlx5_flow_group), 0,
a369d4ac4dff92 Maor Gottlieb     2017-08-27  2962  						0, NULL);
a369d4ac4dff92 Maor Gottlieb     2017-08-27  2963  	steering->ftes_cache = kmem_cache_create("mlx5_fs_ftes", sizeof(struct fs_fte), 0,
a369d4ac4dff92 Maor Gottlieb     2017-08-27  2964  						 0, NULL);
a369d4ac4dff92 Maor Gottlieb     2017-08-27  2965  	if (!steering->ftes_cache || !steering->fgs_cache) {
a369d4ac4dff92 Maor Gottlieb     2017-08-27  2966  		err = -ENOMEM;
a369d4ac4dff92 Maor Gottlieb     2017-08-27  2967  		goto err;
a369d4ac4dff92 Maor Gottlieb     2017-08-27  2968  	}
a369d4ac4dff92 Maor Gottlieb     2017-08-27  2969  
ffdb8827ec31f6 Erez Shitrit      2017-04-13  2970  	if ((((MLX5_CAP_GEN(dev, port_type) == MLX5_CAP_PORT_TYPE_ETH) &&
ffdb8827ec31f6 Erez Shitrit      2017-04-13  2971  	      (MLX5_CAP_GEN(dev, nic_flow_table))) ||
ffdb8827ec31f6 Erez Shitrit      2017-04-13  2972  	     ((MLX5_CAP_GEN(dev, port_type) == MLX5_CAP_PORT_TYPE_IB) &&
ffdb8827ec31f6 Erez Shitrit      2017-04-13  2973  	      MLX5_CAP_GEN(dev, ipoib_enhanced_offloads))) &&
876d634d19e416 Maor Gottlieb     2016-06-10  2974  	    MLX5_CAP_FLOWTABLE_NIC_RX(dev, ft_support)) {
fba53f7b571925 Maor Gottlieb     2016-07-04  2975  		err = init_root_ns(steering);
2530236303d9e7 Maor Gottlieb     2015-12-10  2976  		if (err)
43a335e055bb7e Amir Vadai        2016-05-13  2977  			goto err;
2530236303d9e7 Maor Gottlieb     2015-12-10  2978  	}
876d634d19e416 Maor Gottlieb     2016-06-10  2979  
0efc8562491b7d Or Gerlitz        2018-05-31  2980  	if (MLX5_ESWITCH_MANAGER(dev)) {
bd02ef8eec0b98 Maor Gottlieb     2016-06-10  2981  		if (MLX5_CAP_ESW_FLOWTABLE_FDB(dev, ft_support)) {
fba53f7b571925 Maor Gottlieb     2016-07-04  2982  			err = init_fdb_root_ns(steering);
2530236303d9e7 Maor Gottlieb     2015-12-10  2983  			if (err)
efdc810ba39dae Mohamad Haj Yahia 2016-05-03  2984  				goto err;
efdc810ba39dae Mohamad Haj Yahia 2016-05-03  2985  		}
bd02ef8eec0b98 Maor Gottlieb     2016-06-10  2986  	}
2530236303d9e7 Maor Gottlieb     2015-12-10  2987  
87d22483ce68e6 Maor Gottlieb     2016-06-06  2988  	if (MLX5_CAP_FLOWTABLE_SNIFFER_RX(dev, ft_support)) {
87d22483ce68e6 Maor Gottlieb     2016-06-06  2989  		err = init_sniffer_rx_root_ns(steering);
87d22483ce68e6 Maor Gottlieb     2016-06-06  2990  		if (err)
87d22483ce68e6 Maor Gottlieb     2016-06-06  2991  			goto err;
87d22483ce68e6 Maor Gottlieb     2016-06-06  2992  	}
87d22483ce68e6 Maor Gottlieb     2016-06-06  2993  
87d22483ce68e6 Maor Gottlieb     2016-06-06  2994  	if (MLX5_CAP_FLOWTABLE_SNIFFER_TX(dev, ft_support)) {
87d22483ce68e6 Maor Gottlieb     2016-06-06  2995  		err = init_sniffer_tx_root_ns(steering);
87d22483ce68e6 Maor Gottlieb     2016-06-06  2996  		if (err)
87d22483ce68e6 Maor Gottlieb     2016-06-06  2997  			goto err;
87d22483ce68e6 Maor Gottlieb     2016-06-06  2998  	}
87d22483ce68e6 Maor Gottlieb     2016-06-06  2999  
f6f7d6b5bd818c Maor Gottlieb     2019-04-29  3000  	if (MLX5_CAP_FLOWTABLE_RDMA_RX(dev, ft_support) &&
f6f7d6b5bd818c Maor Gottlieb     2019-04-29  3001  	    MLX5_CAP_FLOWTABLE_RDMA_RX(dev, table_miss_action_domain)) {
d83eb50e29de36 Maor Gottlieb     2019-04-29  3002  		err = init_rdma_rx_root_ns(steering);
d83eb50e29de36 Maor Gottlieb     2019-04-29  3003  		if (err)
d83eb50e29de36 Maor Gottlieb     2019-04-29  3004  			goto err;
d83eb50e29de36 Maor Gottlieb     2019-04-29  3005  	}
d83eb50e29de36 Maor Gottlieb     2019-04-29  3006  
24670b1a316618 Michael Guralnik  2020-03-24  3007  	if (MLX5_CAP_FLOWTABLE_RDMA_TX(dev, ft_support)) {
24670b1a316618 Michael Guralnik  2020-03-24  3008  		err = init_rdma_tx_root_ns(steering);
24670b1a316618 Michael Guralnik  2020-03-24  3009  		if (err)
24670b1a316618 Michael Guralnik  2020-03-24  3010  			goto err;
24670b1a316618 Michael Guralnik  2020-03-24  3011  	}
24670b1a316618 Michael Guralnik  2020-03-24  3012  
8c8eea07c1fd46 Raed Salem        2019-10-23  3013  	if (mlx5_fpga_ipsec_device_caps(steering->dev) & MLX5_ACCEL_IPSEC_CAP_DEVICE ||
8c8eea07c1fd46 Raed Salem        2019-10-23  3014  	    MLX5_CAP_FLOWTABLE_NIC_TX(dev, ft_support)) {
5f4183781a303d Aviad Yehezkel    2018-02-18  3015  		err = init_egress_root_ns(steering);
5f4183781a303d Aviad Yehezkel    2018-02-18  3016  		if (err)
5f4183781a303d Aviad Yehezkel    2018-02-18  3017  			goto err;
5f4183781a303d Aviad Yehezkel    2018-02-18  3018  	}
5f4183781a303d Aviad Yehezkel    2018-02-18  3019  
efdc810ba39dae Mohamad Haj Yahia 2016-05-03  3020  	return 0;
efdc810ba39dae Mohamad Haj Yahia 2016-05-03  3021  err:
efdc810ba39dae Mohamad Haj Yahia 2016-05-03  3022  	mlx5_cleanup_fs(dev);
2530236303d9e7 Maor Gottlieb     2015-12-10  3023  	return err;
2530236303d9e7 Maor Gottlieb     2015-12-10  3024  }
508541146af18e Yishai Hadas      2017-04-25  3025  

---
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: 33141 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [saeed:mlx5-queue 1823/1834] drivers/net/ethernet/mellanox/mlx5/core/fs_core.c:2956 mlx5_init_fs() warn: missing error code 'err'
@ 2021-04-22 10:46 Dan Carpenter
  0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2021-04-22 10:46 UTC (permalink / raw)
  To: kbuild

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux.git  mlx5-queue
head:   7cb88bf45e588520c8743125cfda21d74de95639
commit: 5de5d1022d1529c26a8a64973edbeb5897762136 [1823/1834] net/mlx5: Move chains ft pool to be used by all firmware steering
config: x86_64-randconfig-m001-20210421 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

New smatch warnings:
drivers/net/ethernet/mellanox/mlx5/core/fs_core.c:2956 mlx5_init_fs() warn: missing error code 'err'

Old smatch warnings:
drivers/net/ethernet/mellanox/mlx5/core/fs_core.c:1625 dest_is_valid() error: we previously assumed 'dest' could be null (see line 1614)

vim +/err +2956 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c

2530236303d9e7 Maor Gottlieb     2015-12-10  2941  int mlx5_init_fs(struct mlx5_core_dev *dev)
2530236303d9e7 Maor Gottlieb     2015-12-10  2942  {
fba53f7b571925 Maor Gottlieb     2016-07-04  2943  	struct mlx5_flow_steering *steering;
2530236303d9e7 Maor Gottlieb     2015-12-10  2944  	int err = 0;
2530236303d9e7 Maor Gottlieb     2015-12-10  2945  
43a335e055bb7e Amir Vadai        2016-05-13  2946  	err = mlx5_init_fc_stats(dev);
43a335e055bb7e Amir Vadai        2016-05-13  2947  	if (err)
43a335e055bb7e Amir Vadai        2016-05-13  2948  		return err;
43a335e055bb7e Amir Vadai        2016-05-13  2949  
5de5d1022d1529 Paul Blakey       2021-03-08  2950  	err = mlx5_ft_pool_init(dev);
5de5d1022d1529 Paul Blakey       2021-03-08  2951  	if (err)
5de5d1022d1529 Paul Blakey       2021-03-08  2952  		return err;
5de5d1022d1529 Paul Blakey       2021-03-08  2953  
fba53f7b571925 Maor Gottlieb     2016-07-04  2954  	steering = kzalloc(sizeof(*steering), GFP_KERNEL);
fba53f7b571925 Maor Gottlieb     2016-07-04  2955  	if (!steering)
5de5d1022d1529 Paul Blakey       2021-03-08 @2956  		goto err;

Needs an "err = -ENOMEM;"

fba53f7b571925 Maor Gottlieb     2016-07-04  2957  	steering->dev = dev;
fba53f7b571925 Maor Gottlieb     2016-07-04  2958  	dev->priv.steering = steering;
fba53f7b571925 Maor Gottlieb     2016-07-04  2959  
a369d4ac4dff92 Maor Gottlieb     2017-08-27  2960  	steering->fgs_cache = kmem_cache_create("mlx5_fs_fgs",
a369d4ac4dff92 Maor Gottlieb     2017-08-27  2961  						sizeof(struct mlx5_flow_group), 0,
a369d4ac4dff92 Maor Gottlieb     2017-08-27  2962  						0, NULL);
a369d4ac4dff92 Maor Gottlieb     2017-08-27  2963  	steering->ftes_cache = kmem_cache_create("mlx5_fs_ftes", sizeof(struct fs_fte), 0,
a369d4ac4dff92 Maor Gottlieb     2017-08-27  2964  						 0, NULL);
a369d4ac4dff92 Maor Gottlieb     2017-08-27  2965  	if (!steering->ftes_cache || !steering->fgs_cache) {
a369d4ac4dff92 Maor Gottlieb     2017-08-27  2966  		err = -ENOMEM;
a369d4ac4dff92 Maor Gottlieb     2017-08-27  2967  		goto err;
a369d4ac4dff92 Maor Gottlieb     2017-08-27  2968  	}
a369d4ac4dff92 Maor Gottlieb     2017-08-27  2969  
ffdb8827ec31f6 Erez Shitrit      2017-04-13  2970  	if ((((MLX5_CAP_GEN(dev, port_type) == MLX5_CAP_PORT_TYPE_ETH) &&
ffdb8827ec31f6 Erez Shitrit      2017-04-13  2971  	      (MLX5_CAP_GEN(dev, nic_flow_table))) ||
ffdb8827ec31f6 Erez Shitrit      2017-04-13  2972  	     ((MLX5_CAP_GEN(dev, port_type) == MLX5_CAP_PORT_TYPE_IB) &&
ffdb8827ec31f6 Erez Shitrit      2017-04-13  2973  	      MLX5_CAP_GEN(dev, ipoib_enhanced_offloads))) &&
876d634d19e416 Maor Gottlieb     2016-06-10  2974  	    MLX5_CAP_FLOWTABLE_NIC_RX(dev, ft_support)) {
fba53f7b571925 Maor Gottlieb     2016-07-04  2975  		err = init_root_ns(steering);
2530236303d9e7 Maor Gottlieb     2015-12-10  2976  		if (err)
43a335e055bb7e Amir Vadai        2016-05-13  2977  			goto err;
2530236303d9e7 Maor Gottlieb     2015-12-10  2978  	}
876d634d19e416 Maor Gottlieb     2016-06-10  2979  
0efc8562491b7d Or Gerlitz        2018-05-31  2980  	if (MLX5_ESWITCH_MANAGER(dev)) {
bd02ef8eec0b98 Maor Gottlieb     2016-06-10  2981  		if (MLX5_CAP_ESW_FLOWTABLE_FDB(dev, ft_support)) {
fba53f7b571925 Maor Gottlieb     2016-07-04  2982  			err = init_fdb_root_ns(steering);
2530236303d9e7 Maor Gottlieb     2015-12-10  2983  			if (err)
efdc810ba39dae Mohamad Haj Yahia 2016-05-03  2984  				goto err;
efdc810ba39dae Mohamad Haj Yahia 2016-05-03  2985  		}
bd02ef8eec0b98 Maor Gottlieb     2016-06-10  2986  	}
2530236303d9e7 Maor Gottlieb     2015-12-10  2987  
87d22483ce68e6 Maor Gottlieb     2016-06-06  2988  	if (MLX5_CAP_FLOWTABLE_SNIFFER_RX(dev, ft_support)) {
87d22483ce68e6 Maor Gottlieb     2016-06-06  2989  		err = init_sniffer_rx_root_ns(steering);
87d22483ce68e6 Maor Gottlieb     2016-06-06  2990  		if (err)
87d22483ce68e6 Maor Gottlieb     2016-06-06  2991  			goto err;
87d22483ce68e6 Maor Gottlieb     2016-06-06  2992  	}
87d22483ce68e6 Maor Gottlieb     2016-06-06  2993  
87d22483ce68e6 Maor Gottlieb     2016-06-06  2994  	if (MLX5_CAP_FLOWTABLE_SNIFFER_TX(dev, ft_support)) {
87d22483ce68e6 Maor Gottlieb     2016-06-06  2995  		err = init_sniffer_tx_root_ns(steering);
87d22483ce68e6 Maor Gottlieb     2016-06-06  2996  		if (err)
87d22483ce68e6 Maor Gottlieb     2016-06-06  2997  			goto err;
87d22483ce68e6 Maor Gottlieb     2016-06-06  2998  	}
87d22483ce68e6 Maor Gottlieb     2016-06-06  2999  
f6f7d6b5bd818c Maor Gottlieb     2019-04-29  3000  	if (MLX5_CAP_FLOWTABLE_RDMA_RX(dev, ft_support) &&
f6f7d6b5bd818c Maor Gottlieb     2019-04-29  3001  	    MLX5_CAP_FLOWTABLE_RDMA_RX(dev, table_miss_action_domain)) {
d83eb50e29de36 Maor Gottlieb     2019-04-29  3002  		err = init_rdma_rx_root_ns(steering);
d83eb50e29de36 Maor Gottlieb     2019-04-29  3003  		if (err)
d83eb50e29de36 Maor Gottlieb     2019-04-29  3004  			goto err;
d83eb50e29de36 Maor Gottlieb     2019-04-29  3005  	}
d83eb50e29de36 Maor Gottlieb     2019-04-29  3006  
24670b1a316618 Michael Guralnik  2020-03-24  3007  	if (MLX5_CAP_FLOWTABLE_RDMA_TX(dev, ft_support)) {
24670b1a316618 Michael Guralnik  2020-03-24  3008  		err = init_rdma_tx_root_ns(steering);
24670b1a316618 Michael Guralnik  2020-03-24  3009  		if (err)
24670b1a316618 Michael Guralnik  2020-03-24  3010  			goto err;
24670b1a316618 Michael Guralnik  2020-03-24  3011  	}
24670b1a316618 Michael Guralnik  2020-03-24  3012  
8c8eea07c1fd46 Raed Salem        2019-10-23  3013  	if (mlx5_fpga_ipsec_device_caps(steering->dev) & MLX5_ACCEL_IPSEC_CAP_DEVICE ||
8c8eea07c1fd46 Raed Salem        2019-10-23  3014  	    MLX5_CAP_FLOWTABLE_NIC_TX(dev, ft_support)) {
5f4183781a303d Aviad Yehezkel    2018-02-18  3015  		err = init_egress_root_ns(steering);
5f4183781a303d Aviad Yehezkel    2018-02-18  3016  		if (err)
5f4183781a303d Aviad Yehezkel    2018-02-18  3017  			goto err;
5f4183781a303d Aviad Yehezkel    2018-02-18  3018  	}
5f4183781a303d Aviad Yehezkel    2018-02-18  3019  
efdc810ba39dae Mohamad Haj Yahia 2016-05-03  3020  	return 0;
efdc810ba39dae Mohamad Haj Yahia 2016-05-03  3021  err:
efdc810ba39dae Mohamad Haj Yahia 2016-05-03  3022  	mlx5_cleanup_fs(dev);
2530236303d9e7 Maor Gottlieb     2015-12-10  3023  	return err;
2530236303d9e7 Maor Gottlieb     2015-12-10  3024  }

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

_______________________________________________
kbuild mailing list -- kbuild(a)lists.01.org
To unsubscribe send an email to kbuild-leave(a)lists.01.org

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-04-22 10:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-22  6:06 [saeed:mlx5-queue 1823/1834] drivers/net/ethernet/mellanox/mlx5/core/fs_core.c:2956 mlx5_init_fs() warn: missing error code 'err' kernel test robot
2021-04-22 10:46 Dan Carpenter

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.