diff mbox series

[net-next,v4,2/5] i40e: Remove string printing for i40e_status

Message ID 20230105134946.66077-3-jan.sokolowski@intel.com
State Changes Requested
Headers show
Series i40e_status removal series | expand

Commit Message

Jan Sokolowski Jan. 5, 2023, 1:49 p.m. UTC
Remove the i40e_stat_str() function which prints the string
representation of the i40e_status error code. With upcoming changes
moving away from i40e_status, there will be no need for this function

Signed-off-by: Jan Sokolowski <jan.sokolowski@intel.com>
---
 drivers/net/ethernet/intel/i40e/i40e_client.c |   8 +-
 drivers/net/ethernet/intel/i40e/i40e_common.c |  78 -----
 drivers/net/ethernet/intel/i40e/i40e_dcb_nl.c |  16 +-
 .../net/ethernet/intel/i40e/i40e_ethtool.c    |  41 ++-
 drivers/net/ethernet/intel/i40e/i40e_main.c   | 312 +++++++++---------
 drivers/net/ethernet/intel/i40e/i40e_nvm.c    |   4 +-
 .../net/ethernet/intel/i40e/i40e_prototype.h  |   1 -
 .../ethernet/intel/i40e/i40e_virtchnl_pf.c    |  28 +-
 8 files changed, 204 insertions(+), 284 deletions(-)

Comments

kernel test robot Jan. 5, 2023, 6:48 p.m. UTC | #1
Hi Jan,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on tnguy-next-queue/dev-queue]
[cannot apply to net-next/master linus/master v6.2-rc2 next-20230105]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Jan-Sokolowski/i40e-Remove-unused-i40e-status-codes/20230106-002804
base:   https://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue.git dev-queue
patch link:    https://lore.kernel.org/r/20230105134946.66077-3-jan.sokolowski%40intel.com
patch subject: [Intel-wired-lan] [PATCH net-next v4 2/5] i40e: Remove string printing for i40e_status
config: mips-allmodconfig
compiler: mips-linux-gcc (GCC) 12.1.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://github.com/intel-lab-lkp/linux/commit/80e54cad3a1865add2838b6c8f81d44d7f05a32d
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Jan-Sokolowski/i40e-Remove-unused-i40e-status-codes/20230106-002804
        git checkout 80e54cad3a1865add2838b6c8f81d44d7f05a32d
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=mips olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash drivers/net/ethernet/intel/i40e/

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

All warnings (new ones prefixed by >>):

   drivers/net/ethernet/intel/i40e/i40e_main.c: In function 'i40e_add_vsi':
>> drivers/net/ethernet/intel/i40e/i40e_main.c:14082:25: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
   14082 |                         if (ret)
         |                         ^~
   drivers/net/ethernet/intel/i40e/i40e_main.c:14084:33: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
   14084 |                                 goto err;
         |                                 ^~~~


vim +/if +14082 drivers/net/ethernet/intel/i40e/i40e_main.c

c827b2f24fc1d3 Sebastian Czapla    2022-12-20  14026  
41c445ff0f482b Jesse Brandeburg    2013-09-11  14027  /**
41c445ff0f482b Jesse Brandeburg    2013-09-11  14028   * i40e_add_vsi - Add a VSI to the switch
41c445ff0f482b Jesse Brandeburg    2013-09-11  14029   * @vsi: the VSI being configured
41c445ff0f482b Jesse Brandeburg    2013-09-11  14030   *
41c445ff0f482b Jesse Brandeburg    2013-09-11  14031   * This initializes a VSI context depending on the VSI type to be added and
41c445ff0f482b Jesse Brandeburg    2013-09-11  14032   * passes it down to the add_vsi aq command.
41c445ff0f482b Jesse Brandeburg    2013-09-11  14033   **/
41c445ff0f482b Jesse Brandeburg    2013-09-11  14034  static int i40e_add_vsi(struct i40e_vsi *vsi)
41c445ff0f482b Jesse Brandeburg    2013-09-11  14035  {
41c445ff0f482b Jesse Brandeburg    2013-09-11  14036  	int ret = -ENODEV;
41c445ff0f482b Jesse Brandeburg    2013-09-11  14037  	struct i40e_pf *pf = vsi->back;
41c445ff0f482b Jesse Brandeburg    2013-09-11  14038  	struct i40e_hw *hw = &pf->hw;
41c445ff0f482b Jesse Brandeburg    2013-09-11  14039  	struct i40e_vsi_context ctxt;
278e7d0b9d6864 Jacob Keller        2016-10-05  14040  	struct i40e_mac_filter *f;
278e7d0b9d6864 Jacob Keller        2016-10-05  14041  	struct hlist_node *h;
278e7d0b9d6864 Jacob Keller        2016-10-05  14042  	int bkt;
216590355cb0e7 Kiran Patil         2015-09-30  14043  
41c445ff0f482b Jesse Brandeburg    2013-09-11  14044  	u8 enabled_tc = 0x1; /* TC0 enabled */
41c445ff0f482b Jesse Brandeburg    2013-09-11  14045  	int f_count = 0;
41c445ff0f482b Jesse Brandeburg    2013-09-11  14046  
41c445ff0f482b Jesse Brandeburg    2013-09-11  14047  	memset(&ctxt, 0, sizeof(ctxt));
41c445ff0f482b Jesse Brandeburg    2013-09-11  14048  	switch (vsi->type) {
41c445ff0f482b Jesse Brandeburg    2013-09-11  14049  	case I40E_VSI_MAIN:
41c445ff0f482b Jesse Brandeburg    2013-09-11  14050  		/* The PF's main VSI is already setup as part of the
41c445ff0f482b Jesse Brandeburg    2013-09-11  14051  		 * device initialization, so we'll not bother with
41c445ff0f482b Jesse Brandeburg    2013-09-11  14052  		 * the add_vsi call, but we will retrieve the current
41c445ff0f482b Jesse Brandeburg    2013-09-11  14053  		 * VSI context.
41c445ff0f482b Jesse Brandeburg    2013-09-11  14054  		 */
41c445ff0f482b Jesse Brandeburg    2013-09-11  14055  		ctxt.seid = pf->main_vsi_seid;
41c445ff0f482b Jesse Brandeburg    2013-09-11  14056  		ctxt.pf_num = pf->hw.pf_id;
41c445ff0f482b Jesse Brandeburg    2013-09-11  14057  		ctxt.vf_num = 0;
41c445ff0f482b Jesse Brandeburg    2013-09-11  14058  		ret = i40e_aq_get_vsi_params(&pf->hw, &ctxt, NULL);
41c445ff0f482b Jesse Brandeburg    2013-09-11  14059  		ctxt.flags = I40E_AQ_VSI_TYPE_PF;
41c445ff0f482b Jesse Brandeburg    2013-09-11  14060  		if (ret) {
41c445ff0f482b Jesse Brandeburg    2013-09-11  14061  			dev_info(&pf->pdev->dev,
80e54cad3a1865 Jan Sokolowski      2023-01-05  14062  				 "couldn't get PF vsi config, err %d aq_err %s\n",
80e54cad3a1865 Jan Sokolowski      2023-01-05  14063  				 ret,
f1c7e72e390391 Shannon Nelson      2015-06-04  14064  				 i40e_aq_str(&pf->hw,
f1c7e72e390391 Shannon Nelson      2015-06-04  14065  					     pf->hw.aq.asq_last_status));
41c445ff0f482b Jesse Brandeburg    2013-09-11  14066  			return -ENOENT;
41c445ff0f482b Jesse Brandeburg    2013-09-11  14067  		}
1a2f62489b5dc1 Jesse Brandeburg    2015-03-31  14068  		vsi->info = ctxt.info;
41c445ff0f482b Jesse Brandeburg    2013-09-11  14069  		vsi->info.valid_sections = 0;
41c445ff0f482b Jesse Brandeburg    2013-09-11  14070  
41c445ff0f482b Jesse Brandeburg    2013-09-11  14071  		vsi->seid = ctxt.seid;
41c445ff0f482b Jesse Brandeburg    2013-09-11  14072  		vsi->id = ctxt.vsi_number;
41c445ff0f482b Jesse Brandeburg    2013-09-11  14073  
41c445ff0f482b Jesse Brandeburg    2013-09-11  14074  		enabled_tc = i40e_pf_get_tc_map(pf);
41c445ff0f482b Jesse Brandeburg    2013-09-11  14075  
64615b5418bac1 Mitch Williams      2017-08-29  14076  		/* Source pruning is enabled by default, so the flag is
64615b5418bac1 Mitch Williams      2017-08-29  14077  		 * negative logic - if it's set, we need to fiddle with
64615b5418bac1 Mitch Williams      2017-08-29  14078  		 * the VSI to disable source pruning.
64615b5418bac1 Mitch Williams      2017-08-29  14079  		 */
64615b5418bac1 Mitch Williams      2017-08-29  14080  		if (pf->flags & I40E_FLAG_SOURCE_PRUNING_DISABLED) {
c827b2f24fc1d3 Sebastian Czapla    2022-12-20  14081  			ret = i40e_configure_source_pruning(vsi, false);
c827b2f24fc1d3 Sebastian Czapla    2022-12-20 @14082  			if (ret)
80e54cad3a1865 Jan Sokolowski      2023-01-05  14083  				ret = -ENOENT;
64615b5418bac1 Mitch Williams      2017-08-29  14084  				goto err;
64615b5418bac1 Mitch Williams      2017-08-29  14085  		}
64615b5418bac1 Mitch Williams      2017-08-29  14086  
41c445ff0f482b Jesse Brandeburg    2013-09-11  14087  		/* MFP mode setup queue map and update VSI */
63d7e5a413d841 Neerav Parikh       2014-12-14  14088  		if ((pf->flags & I40E_FLAG_MFP_ENABLED) &&
63d7e5a413d841 Neerav Parikh       2014-12-14  14089  		    !(pf->hw.func_caps.iscsi)) { /* NIC type PF */
41c445ff0f482b Jesse Brandeburg    2013-09-11  14090  			memset(&ctxt, 0, sizeof(ctxt));
41c445ff0f482b Jesse Brandeburg    2013-09-11  14091  			ctxt.seid = pf->main_vsi_seid;
41c445ff0f482b Jesse Brandeburg    2013-09-11  14092  			ctxt.pf_num = pf->hw.pf_id;
41c445ff0f482b Jesse Brandeburg    2013-09-11  14093  			ctxt.vf_num = 0;
41c445ff0f482b Jesse Brandeburg    2013-09-11  14094  			i40e_vsi_setup_queue_map(vsi, &ctxt, enabled_tc, false);
41c445ff0f482b Jesse Brandeburg    2013-09-11  14095  			ret = i40e_aq_update_vsi_params(hw, &ctxt, NULL);
41c445ff0f482b Jesse Brandeburg    2013-09-11  14096  			if (ret) {
41c445ff0f482b Jesse Brandeburg    2013-09-11  14097  				dev_info(&pf->pdev->dev,
80e54cad3a1865 Jan Sokolowski      2023-01-05  14098  					 "update vsi failed, err %d aq_err %s\n",
80e54cad3a1865 Jan Sokolowski      2023-01-05  14099  					 ret,
f1c7e72e390391 Shannon Nelson      2015-06-04  14100  					 i40e_aq_str(&pf->hw,
f1c7e72e390391 Shannon Nelson      2015-06-04  14101  						    pf->hw.aq.asq_last_status));
41c445ff0f482b Jesse Brandeburg    2013-09-11  14102  				ret = -ENOENT;
41c445ff0f482b Jesse Brandeburg    2013-09-11  14103  				goto err;
41c445ff0f482b Jesse Brandeburg    2013-09-11  14104  			}
41c445ff0f482b Jesse Brandeburg    2013-09-11  14105  			/* update the local VSI info queue map */
41c445ff0f482b Jesse Brandeburg    2013-09-11  14106  			i40e_vsi_update_queue_map(vsi, &ctxt);
41c445ff0f482b Jesse Brandeburg    2013-09-11  14107  			vsi->info.valid_sections = 0;
41c445ff0f482b Jesse Brandeburg    2013-09-11  14108  		} else {
41c445ff0f482b Jesse Brandeburg    2013-09-11  14109  			/* Default/Main VSI is only enabled for TC0
41c445ff0f482b Jesse Brandeburg    2013-09-11  14110  			 * reconfigure it to enable all TCs that are
41c445ff0f482b Jesse Brandeburg    2013-09-11  14111  			 * available on the port in SFP mode.
63d7e5a413d841 Neerav Parikh       2014-12-14  14112  			 * For MFP case the iSCSI PF would use this
63d7e5a413d841 Neerav Parikh       2014-12-14  14113  			 * flow to enable LAN+iSCSI TC.
41c445ff0f482b Jesse Brandeburg    2013-09-11  14114  			 */
41c445ff0f482b Jesse Brandeburg    2013-09-11  14115  			ret = i40e_vsi_config_tc(vsi, enabled_tc);
41c445ff0f482b Jesse Brandeburg    2013-09-11  14116  			if (ret) {
19279235bea221 Carolyn Wyborny     2017-07-14  14117  				/* Single TC condition is not fatal,
19279235bea221 Carolyn Wyborny     2017-07-14  14118  				 * message and continue
19279235bea221 Carolyn Wyborny     2017-07-14  14119  				 */
41c445ff0f482b Jesse Brandeburg    2013-09-11  14120  				dev_info(&pf->pdev->dev,
80e54cad3a1865 Jan Sokolowski      2023-01-05  14121  					 "failed to configure TCs for main VSI tc_map 0x%08x, err %d aq_err %s\n",
f1c7e72e390391 Shannon Nelson      2015-06-04  14122  					 enabled_tc,
80e54cad3a1865 Jan Sokolowski      2023-01-05  14123  					 ret,
f1c7e72e390391 Shannon Nelson      2015-06-04  14124  					 i40e_aq_str(&pf->hw,
f1c7e72e390391 Shannon Nelson      2015-06-04  14125  						    pf->hw.aq.asq_last_status));
41c445ff0f482b Jesse Brandeburg    2013-09-11  14126  			}
41c445ff0f482b Jesse Brandeburg    2013-09-11  14127  		}
41c445ff0f482b Jesse Brandeburg    2013-09-11  14128  		break;
41c445ff0f482b Jesse Brandeburg    2013-09-11  14129  
41c445ff0f482b Jesse Brandeburg    2013-09-11  14130  	case I40E_VSI_FDIR:
cbf613252496ed Anjali Singhai Jain 2014-01-17  14131  		ctxt.pf_num = hw->pf_id;
cbf613252496ed Anjali Singhai Jain 2014-01-17  14132  		ctxt.vf_num = 0;
cbf613252496ed Anjali Singhai Jain 2014-01-17  14133  		ctxt.uplink_seid = vsi->uplink_seid;
2b18e5914d5210 Neerav Parikh       2015-01-24  14134  		ctxt.connection_type = I40E_AQ_VSI_CONN_TYPE_NORMAL;
cbf613252496ed Anjali Singhai Jain 2014-01-17  14135  		ctxt.flags = I40E_AQ_VSI_TYPE_PF;
fc60861e9b0038 Anjali Singhai Jain 2015-05-08  14136  		if ((pf->flags & I40E_FLAG_VEB_MODE_ENABLED) &&
fc60861e9b0038 Anjali Singhai Jain 2015-05-08  14137  		    (i40e_is_vsi_uplink_mode_veb(vsi))) {
79c21a827e9808 Anjali Singhai Jain 2014-11-13  14138  			ctxt.info.valid_sections |=
79c21a827e9808 Anjali Singhai Jain 2014-11-13  14139  			     cpu_to_le16(I40E_AQ_VSI_PROP_SWITCH_VALID);
79c21a827e9808 Anjali Singhai Jain 2014-11-13  14140  			ctxt.info.switch_id =
79c21a827e9808 Anjali Singhai Jain 2014-11-13  14141  			   cpu_to_le16(I40E_AQ_VSI_SW_ID_FLAG_ALLOW_LB);
51616018dd1b49 Neerav Parikh       2015-02-06  14142  		}
41c445ff0f482b Jesse Brandeburg    2013-09-11  14143  		i40e_vsi_setup_queue_map(vsi, &ctxt, enabled_tc, true);
41c445ff0f482b Jesse Brandeburg    2013-09-11  14144  		break;
41c445ff0f482b Jesse Brandeburg    2013-09-11  14145  
41c445ff0f482b Jesse Brandeburg    2013-09-11  14146  	case I40E_VSI_VMDQ2:
41c445ff0f482b Jesse Brandeburg    2013-09-11  14147  		ctxt.pf_num = hw->pf_id;
41c445ff0f482b Jesse Brandeburg    2013-09-11  14148  		ctxt.vf_num = 0;
41c445ff0f482b Jesse Brandeburg    2013-09-11  14149  		ctxt.uplink_seid = vsi->uplink_seid;
2b18e5914d5210 Neerav Parikh       2015-01-24  14150  		ctxt.connection_type = I40E_AQ_VSI_CONN_TYPE_NORMAL;
41c445ff0f482b Jesse Brandeburg    2013-09-11  14151  		ctxt.flags = I40E_AQ_VSI_TYPE_VMDQ2;
41c445ff0f482b Jesse Brandeburg    2013-09-11  14152  
41c445ff0f482b Jesse Brandeburg    2013-09-11  14153  		/* This VSI is connected to VEB so the switch_id
41c445ff0f482b Jesse Brandeburg    2013-09-11  14154  		 * should be set to zero by default.
41c445ff0f482b Jesse Brandeburg    2013-09-11  14155  		 */
51616018dd1b49 Neerav Parikh       2015-02-06  14156  		if (i40e_is_vsi_uplink_mode_veb(vsi)) {
51616018dd1b49 Neerav Parikh       2015-02-06  14157  			ctxt.info.valid_sections |=
51616018dd1b49 Neerav Parikh       2015-02-06  14158  				cpu_to_le16(I40E_AQ_VSI_PROP_SWITCH_VALID);
51616018dd1b49 Neerav Parikh       2015-02-06  14159  			ctxt.info.switch_id =
51616018dd1b49 Neerav Parikh       2015-02-06  14160  				cpu_to_le16(I40E_AQ_VSI_SW_ID_FLAG_ALLOW_LB);
51616018dd1b49 Neerav Parikh       2015-02-06  14161  		}
41c445ff0f482b Jesse Brandeburg    2013-09-11  14162  
41c445ff0f482b Jesse Brandeburg    2013-09-11  14163  		/* Setup the VSI tx/rx queue map for TC0 only for now */
41c445ff0f482b Jesse Brandeburg    2013-09-11  14164  		i40e_vsi_setup_queue_map(vsi, &ctxt, enabled_tc, true);
41c445ff0f482b Jesse Brandeburg    2013-09-11  14165  		break;
41c445ff0f482b Jesse Brandeburg    2013-09-11  14166  
41c445ff0f482b Jesse Brandeburg    2013-09-11  14167  	case I40E_VSI_SRIOV:
41c445ff0f482b Jesse Brandeburg    2013-09-11  14168  		ctxt.pf_num = hw->pf_id;
41c445ff0f482b Jesse Brandeburg    2013-09-11  14169  		ctxt.vf_num = vsi->vf_id + hw->func_caps.vf_base_id;
41c445ff0f482b Jesse Brandeburg    2013-09-11  14170  		ctxt.uplink_seid = vsi->uplink_seid;
2b18e5914d5210 Neerav Parikh       2015-01-24  14171  		ctxt.connection_type = I40E_AQ_VSI_CONN_TYPE_NORMAL;
41c445ff0f482b Jesse Brandeburg    2013-09-11  14172  		ctxt.flags = I40E_AQ_VSI_TYPE_VF;
41c445ff0f482b Jesse Brandeburg    2013-09-11  14173  
41c445ff0f482b Jesse Brandeburg    2013-09-11  14174  		/* This VSI is connected to VEB so the switch_id
41c445ff0f482b Jesse Brandeburg    2013-09-11  14175  		 * should be set to zero by default.
41c445ff0f482b Jesse Brandeburg    2013-09-11  14176  		 */
51616018dd1b49 Neerav Parikh       2015-02-06  14177  		if (i40e_is_vsi_uplink_mode_veb(vsi)) {
51616018dd1b49 Neerav Parikh       2015-02-06  14178  			ctxt.info.valid_sections |=
51616018dd1b49 Neerav Parikh       2015-02-06  14179  				cpu_to_le16(I40E_AQ_VSI_PROP_SWITCH_VALID);
51616018dd1b49 Neerav Parikh       2015-02-06  14180  			ctxt.info.switch_id =
51616018dd1b49 Neerav Parikh       2015-02-06  14181  				cpu_to_le16(I40E_AQ_VSI_SW_ID_FLAG_ALLOW_LB);
51616018dd1b49 Neerav Parikh       2015-02-06  14182  		}
41c445ff0f482b Jesse Brandeburg    2013-09-11  14183  
e3219ce6a77546 Anjali Singhai Jain 2016-01-20  14184  		if (vsi->back->flags & I40E_FLAG_IWARP_ENABLED) {
e3219ce6a77546 Anjali Singhai Jain 2016-01-20  14185  			ctxt.info.valid_sections |=
e3219ce6a77546 Anjali Singhai Jain 2016-01-20  14186  				cpu_to_le16(I40E_AQ_VSI_PROP_QUEUE_OPT_VALID);
e3219ce6a77546 Anjali Singhai Jain 2016-01-20  14187  			ctxt.info.queueing_opt_flags |=
4b28cdba4859c2 Ashish Shah         2016-05-03  14188  				(I40E_AQ_VSI_QUE_OPT_TCP_ENA |
4b28cdba4859c2 Ashish Shah         2016-05-03  14189  				 I40E_AQ_VSI_QUE_OPT_RSS_LUT_VSI);
e3219ce6a77546 Anjali Singhai Jain 2016-01-20  14190  		}
e3219ce6a77546 Anjali Singhai Jain 2016-01-20  14191  
41c445ff0f482b Jesse Brandeburg    2013-09-11  14192  		ctxt.info.valid_sections |= cpu_to_le16(I40E_AQ_VSI_PROP_VLAN_VALID);
41c445ff0f482b Jesse Brandeburg    2013-09-11  14193  		ctxt.info.port_vlan_flags |= I40E_AQ_VSI_PVLAN_MODE_ALL;
c674d1250bfc04 Mitch Williams      2014-05-20  14194  		if (pf->vf[vsi->vf_id].spoofchk) {
c674d1250bfc04 Mitch Williams      2014-05-20  14195  			ctxt.info.valid_sections |=
c674d1250bfc04 Mitch Williams      2014-05-20  14196  				cpu_to_le16(I40E_AQ_VSI_PROP_SECURITY_VALID);
c674d1250bfc04 Mitch Williams      2014-05-20  14197  			ctxt.info.sec_flags |=
c674d1250bfc04 Mitch Williams      2014-05-20  14198  				(I40E_AQ_VSI_SEC_FLAG_ENABLE_VLAN_CHK |
c674d1250bfc04 Mitch Williams      2014-05-20  14199  				 I40E_AQ_VSI_SEC_FLAG_ENABLE_MAC_CHK);
c674d1250bfc04 Mitch Williams      2014-05-20  14200  		}
41c445ff0f482b Jesse Brandeburg    2013-09-11  14201  		/* Setup the VSI tx/rx queue map for TC0 only for now */
41c445ff0f482b Jesse Brandeburg    2013-09-11  14202  		i40e_vsi_setup_queue_map(vsi, &ctxt, enabled_tc, true);
41c445ff0f482b Jesse Brandeburg    2013-09-11  14203  		break;
41c445ff0f482b Jesse Brandeburg    2013-09-11  14204  
e3219ce6a77546 Anjali Singhai Jain 2016-01-20  14205  	case I40E_VSI_IWARP:
e3219ce6a77546 Anjali Singhai Jain 2016-01-20  14206  		/* send down message to iWARP */
e3219ce6a77546 Anjali Singhai Jain 2016-01-20  14207  		break;
e3219ce6a77546 Anjali Singhai Jain 2016-01-20  14208  
41c445ff0f482b Jesse Brandeburg    2013-09-11  14209  	default:
41c445ff0f482b Jesse Brandeburg    2013-09-11  14210  		return -ENODEV;
41c445ff0f482b Jesse Brandeburg    2013-09-11  14211  	}
41c445ff0f482b Jesse Brandeburg    2013-09-11  14212  
41c445ff0f482b Jesse Brandeburg    2013-09-11  14213  	if (vsi->type != I40E_VSI_MAIN) {
41c445ff0f482b Jesse Brandeburg    2013-09-11  14214  		ret = i40e_aq_add_vsi(hw, &ctxt, NULL);
41c445ff0f482b Jesse Brandeburg    2013-09-11  14215  		if (ret) {
41c445ff0f482b Jesse Brandeburg    2013-09-11  14216  			dev_info(&vsi->back->pdev->dev,
80e54cad3a1865 Jan Sokolowski      2023-01-05  14217  				 "add vsi failed, err %d aq_err %s\n",
80e54cad3a1865 Jan Sokolowski      2023-01-05  14218  				 ret,
f1c7e72e390391 Shannon Nelson      2015-06-04  14219  				 i40e_aq_str(&pf->hw,
f1c7e72e390391 Shannon Nelson      2015-06-04  14220  					     pf->hw.aq.asq_last_status));
41c445ff0f482b Jesse Brandeburg    2013-09-11  14221  			ret = -ENOENT;
41c445ff0f482b Jesse Brandeburg    2013-09-11  14222  			goto err;
41c445ff0f482b Jesse Brandeburg    2013-09-11  14223  		}
1a2f62489b5dc1 Jesse Brandeburg    2015-03-31  14224  		vsi->info = ctxt.info;
41c445ff0f482b Jesse Brandeburg    2013-09-11  14225  		vsi->info.valid_sections = 0;
41c445ff0f482b Jesse Brandeburg    2013-09-11  14226  		vsi->seid = ctxt.seid;
41c445ff0f482b Jesse Brandeburg    2013-09-11  14227  		vsi->id = ctxt.vsi_number;
41c445ff0f482b Jesse Brandeburg    2013-09-11  14228  	}
41c445ff0f482b Jesse Brandeburg    2013-09-11  14229  
c3c7ea27bec070 Mitch Williams      2016-06-20  14230  	vsi->active_filters = 0;
0da36b9774cc24 Jacob Keller        2017-04-19  14231  	clear_bit(__I40E_VSI_OVERFLOW_PROMISC, vsi->state);
278e7d0b9d6864 Jacob Keller        2016-10-05  14232  	spin_lock_bh(&vsi->mac_filter_hash_lock);
41c445ff0f482b Jesse Brandeburg    2013-09-11  14233  	/* If macvlan filters already exist, force them to get loaded */
278e7d0b9d6864 Jacob Keller        2016-10-05  14234  	hash_for_each_safe(vsi->mac_filter_hash, bkt, h, f, hlist) {
c3c7ea27bec070 Mitch Williams      2016-06-20  14235  		f->state = I40E_FILTER_NEW;
41c445ff0f482b Jesse Brandeburg    2013-09-11  14236  		f_count++;
216590355cb0e7 Kiran Patil         2015-09-30  14237  	}
278e7d0b9d6864 Jacob Keller        2016-10-05  14238  	spin_unlock_bh(&vsi->mac_filter_hash_lock);
216590355cb0e7 Kiran Patil         2015-09-30  14239  
41c445ff0f482b Jesse Brandeburg    2013-09-11  14240  	if (f_count) {
41c445ff0f482b Jesse Brandeburg    2013-09-11  14241  		vsi->flags |= I40E_VSI_FLAG_FILTER_CHANGED;
bfe040c3851ad0 Jacob Keller        2018-03-16  14242  		set_bit(__I40E_MACVLAN_SYNC_PENDING, pf->state);
41c445ff0f482b Jesse Brandeburg    2013-09-11  14243  	}
41c445ff0f482b Jesse Brandeburg    2013-09-11  14244  
41c445ff0f482b Jesse Brandeburg    2013-09-11  14245  	/* Update VSI BW information */
41c445ff0f482b Jesse Brandeburg    2013-09-11  14246  	ret = i40e_vsi_get_bw_info(vsi);
41c445ff0f482b Jesse Brandeburg    2013-09-11  14247  	if (ret) {
41c445ff0f482b Jesse Brandeburg    2013-09-11  14248  		dev_info(&pf->pdev->dev,
80e54cad3a1865 Jan Sokolowski      2023-01-05  14249  			 "couldn't get vsi bw info, err %d aq_err %s\n",
80e54cad3a1865 Jan Sokolowski      2023-01-05  14250  			 ret,
f1c7e72e390391 Shannon Nelson      2015-06-04  14251  			 i40e_aq_str(&pf->hw, pf->hw.aq.asq_last_status));
41c445ff0f482b Jesse Brandeburg    2013-09-11  14252  		/* VSI is already added so not tearing that up */
41c445ff0f482b Jesse Brandeburg    2013-09-11  14253  		ret = 0;
41c445ff0f482b Jesse Brandeburg    2013-09-11  14254  	}
41c445ff0f482b Jesse Brandeburg    2013-09-11  14255  
41c445ff0f482b Jesse Brandeburg    2013-09-11  14256  err:
41c445ff0f482b Jesse Brandeburg    2013-09-11  14257  	return ret;
41c445ff0f482b Jesse Brandeburg    2013-09-11  14258  }
41c445ff0f482b Jesse Brandeburg    2013-09-11  14259
kernel test robot Jan. 5, 2023, 7:08 p.m. UTC | #2
Hi Jan,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on tnguy-next-queue/dev-queue]
[cannot apply to net-next/master linus/master v6.2-rc2 next-20230105]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Jan-Sokolowski/i40e-Remove-unused-i40e-status-codes/20230106-002804
base:   https://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue.git dev-queue
patch link:    https://lore.kernel.org/r/20230105134946.66077-3-jan.sokolowski%40intel.com
patch subject: [Intel-wired-lan] [PATCH net-next v4 2/5] i40e: Remove string printing for i40e_status
config: x86_64-rhel-8.3-rust
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
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://github.com/intel-lab-lkp/linux/commit/80e54cad3a1865add2838b6c8f81d44d7f05a32d
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Jan-Sokolowski/i40e-Remove-unused-i40e-status-codes/20230106-002804
        git checkout 80e54cad3a1865add2838b6c8f81d44d7f05a32d
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/net/ethernet/intel/i40e/

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

All warnings (new ones prefixed by >>):

>> drivers/net/ethernet/intel/i40e/i40e_main.c:14084:5: warning: misleading indentation; statement is not part of the previous 'if' [-Wmisleading-indentation]
                                   goto err;
                                   ^
   drivers/net/ethernet/intel/i40e/i40e_main.c:14082:4: note: previous statement is here
                           if (ret)
                           ^
   1 warning generated.


vim +/if +14084 drivers/net/ethernet/intel/i40e/i40e_main.c

c827b2f24fc1d3 Sebastian Czapla    2022-12-20  14026  
41c445ff0f482b Jesse Brandeburg    2013-09-11  14027  /**
41c445ff0f482b Jesse Brandeburg    2013-09-11  14028   * i40e_add_vsi - Add a VSI to the switch
41c445ff0f482b Jesse Brandeburg    2013-09-11  14029   * @vsi: the VSI being configured
41c445ff0f482b Jesse Brandeburg    2013-09-11  14030   *
41c445ff0f482b Jesse Brandeburg    2013-09-11  14031   * This initializes a VSI context depending on the VSI type to be added and
41c445ff0f482b Jesse Brandeburg    2013-09-11  14032   * passes it down to the add_vsi aq command.
41c445ff0f482b Jesse Brandeburg    2013-09-11  14033   **/
41c445ff0f482b Jesse Brandeburg    2013-09-11  14034  static int i40e_add_vsi(struct i40e_vsi *vsi)
41c445ff0f482b Jesse Brandeburg    2013-09-11  14035  {
41c445ff0f482b Jesse Brandeburg    2013-09-11  14036  	int ret = -ENODEV;
41c445ff0f482b Jesse Brandeburg    2013-09-11  14037  	struct i40e_pf *pf = vsi->back;
41c445ff0f482b Jesse Brandeburg    2013-09-11  14038  	struct i40e_hw *hw = &pf->hw;
41c445ff0f482b Jesse Brandeburg    2013-09-11  14039  	struct i40e_vsi_context ctxt;
278e7d0b9d6864 Jacob Keller        2016-10-05  14040  	struct i40e_mac_filter *f;
278e7d0b9d6864 Jacob Keller        2016-10-05  14041  	struct hlist_node *h;
278e7d0b9d6864 Jacob Keller        2016-10-05  14042  	int bkt;
216590355cb0e7 Kiran Patil         2015-09-30  14043  
41c445ff0f482b Jesse Brandeburg    2013-09-11  14044  	u8 enabled_tc = 0x1; /* TC0 enabled */
41c445ff0f482b Jesse Brandeburg    2013-09-11  14045  	int f_count = 0;
41c445ff0f482b Jesse Brandeburg    2013-09-11  14046  
41c445ff0f482b Jesse Brandeburg    2013-09-11  14047  	memset(&ctxt, 0, sizeof(ctxt));
41c445ff0f482b Jesse Brandeburg    2013-09-11  14048  	switch (vsi->type) {
41c445ff0f482b Jesse Brandeburg    2013-09-11  14049  	case I40E_VSI_MAIN:
41c445ff0f482b Jesse Brandeburg    2013-09-11  14050  		/* The PF's main VSI is already setup as part of the
41c445ff0f482b Jesse Brandeburg    2013-09-11  14051  		 * device initialization, so we'll not bother with
41c445ff0f482b Jesse Brandeburg    2013-09-11  14052  		 * the add_vsi call, but we will retrieve the current
41c445ff0f482b Jesse Brandeburg    2013-09-11  14053  		 * VSI context.
41c445ff0f482b Jesse Brandeburg    2013-09-11  14054  		 */
41c445ff0f482b Jesse Brandeburg    2013-09-11  14055  		ctxt.seid = pf->main_vsi_seid;
41c445ff0f482b Jesse Brandeburg    2013-09-11  14056  		ctxt.pf_num = pf->hw.pf_id;
41c445ff0f482b Jesse Brandeburg    2013-09-11  14057  		ctxt.vf_num = 0;
41c445ff0f482b Jesse Brandeburg    2013-09-11  14058  		ret = i40e_aq_get_vsi_params(&pf->hw, &ctxt, NULL);
41c445ff0f482b Jesse Brandeburg    2013-09-11  14059  		ctxt.flags = I40E_AQ_VSI_TYPE_PF;
41c445ff0f482b Jesse Brandeburg    2013-09-11  14060  		if (ret) {
41c445ff0f482b Jesse Brandeburg    2013-09-11  14061  			dev_info(&pf->pdev->dev,
80e54cad3a1865 Jan Sokolowski      2023-01-05  14062  				 "couldn't get PF vsi config, err %d aq_err %s\n",
80e54cad3a1865 Jan Sokolowski      2023-01-05  14063  				 ret,
f1c7e72e390391 Shannon Nelson      2015-06-04  14064  				 i40e_aq_str(&pf->hw,
f1c7e72e390391 Shannon Nelson      2015-06-04  14065  					     pf->hw.aq.asq_last_status));
41c445ff0f482b Jesse Brandeburg    2013-09-11  14066  			return -ENOENT;
41c445ff0f482b Jesse Brandeburg    2013-09-11  14067  		}
1a2f62489b5dc1 Jesse Brandeburg    2015-03-31  14068  		vsi->info = ctxt.info;
41c445ff0f482b Jesse Brandeburg    2013-09-11  14069  		vsi->info.valid_sections = 0;
41c445ff0f482b Jesse Brandeburg    2013-09-11  14070  
41c445ff0f482b Jesse Brandeburg    2013-09-11  14071  		vsi->seid = ctxt.seid;
41c445ff0f482b Jesse Brandeburg    2013-09-11  14072  		vsi->id = ctxt.vsi_number;
41c445ff0f482b Jesse Brandeburg    2013-09-11  14073  
41c445ff0f482b Jesse Brandeburg    2013-09-11  14074  		enabled_tc = i40e_pf_get_tc_map(pf);
41c445ff0f482b Jesse Brandeburg    2013-09-11  14075  
64615b5418bac1 Mitch Williams      2017-08-29  14076  		/* Source pruning is enabled by default, so the flag is
64615b5418bac1 Mitch Williams      2017-08-29  14077  		 * negative logic - if it's set, we need to fiddle with
64615b5418bac1 Mitch Williams      2017-08-29  14078  		 * the VSI to disable source pruning.
64615b5418bac1 Mitch Williams      2017-08-29  14079  		 */
64615b5418bac1 Mitch Williams      2017-08-29  14080  		if (pf->flags & I40E_FLAG_SOURCE_PRUNING_DISABLED) {
c827b2f24fc1d3 Sebastian Czapla    2022-12-20  14081  			ret = i40e_configure_source_pruning(vsi, false);
c827b2f24fc1d3 Sebastian Czapla    2022-12-20  14082  			if (ret)
80e54cad3a1865 Jan Sokolowski      2023-01-05  14083  				ret = -ENOENT;
64615b5418bac1 Mitch Williams      2017-08-29 @14084  				goto err;
64615b5418bac1 Mitch Williams      2017-08-29  14085  		}
64615b5418bac1 Mitch Williams      2017-08-29  14086  
41c445ff0f482b Jesse Brandeburg    2013-09-11  14087  		/* MFP mode setup queue map and update VSI */
63d7e5a413d841 Neerav Parikh       2014-12-14  14088  		if ((pf->flags & I40E_FLAG_MFP_ENABLED) &&
63d7e5a413d841 Neerav Parikh       2014-12-14  14089  		    !(pf->hw.func_caps.iscsi)) { /* NIC type PF */
41c445ff0f482b Jesse Brandeburg    2013-09-11  14090  			memset(&ctxt, 0, sizeof(ctxt));
41c445ff0f482b Jesse Brandeburg    2013-09-11  14091  			ctxt.seid = pf->main_vsi_seid;
41c445ff0f482b Jesse Brandeburg    2013-09-11  14092  			ctxt.pf_num = pf->hw.pf_id;
41c445ff0f482b Jesse Brandeburg    2013-09-11  14093  			ctxt.vf_num = 0;
41c445ff0f482b Jesse Brandeburg    2013-09-11  14094  			i40e_vsi_setup_queue_map(vsi, &ctxt, enabled_tc, false);
41c445ff0f482b Jesse Brandeburg    2013-09-11  14095  			ret = i40e_aq_update_vsi_params(hw, &ctxt, NULL);
41c445ff0f482b Jesse Brandeburg    2013-09-11  14096  			if (ret) {
41c445ff0f482b Jesse Brandeburg    2013-09-11  14097  				dev_info(&pf->pdev->dev,
80e54cad3a1865 Jan Sokolowski      2023-01-05  14098  					 "update vsi failed, err %d aq_err %s\n",
80e54cad3a1865 Jan Sokolowski      2023-01-05  14099  					 ret,
f1c7e72e390391 Shannon Nelson      2015-06-04  14100  					 i40e_aq_str(&pf->hw,
f1c7e72e390391 Shannon Nelson      2015-06-04  14101  						    pf->hw.aq.asq_last_status));
41c445ff0f482b Jesse Brandeburg    2013-09-11  14102  				ret = -ENOENT;
41c445ff0f482b Jesse Brandeburg    2013-09-11  14103  				goto err;
41c445ff0f482b Jesse Brandeburg    2013-09-11  14104  			}
41c445ff0f482b Jesse Brandeburg    2013-09-11  14105  			/* update the local VSI info queue map */
41c445ff0f482b Jesse Brandeburg    2013-09-11  14106  			i40e_vsi_update_queue_map(vsi, &ctxt);
41c445ff0f482b Jesse Brandeburg    2013-09-11  14107  			vsi->info.valid_sections = 0;
41c445ff0f482b Jesse Brandeburg    2013-09-11  14108  		} else {
41c445ff0f482b Jesse Brandeburg    2013-09-11  14109  			/* Default/Main VSI is only enabled for TC0
41c445ff0f482b Jesse Brandeburg    2013-09-11  14110  			 * reconfigure it to enable all TCs that are
41c445ff0f482b Jesse Brandeburg    2013-09-11  14111  			 * available on the port in SFP mode.
63d7e5a413d841 Neerav Parikh       2014-12-14  14112  			 * For MFP case the iSCSI PF would use this
63d7e5a413d841 Neerav Parikh       2014-12-14  14113  			 * flow to enable LAN+iSCSI TC.
41c445ff0f482b Jesse Brandeburg    2013-09-11  14114  			 */
41c445ff0f482b Jesse Brandeburg    2013-09-11  14115  			ret = i40e_vsi_config_tc(vsi, enabled_tc);
41c445ff0f482b Jesse Brandeburg    2013-09-11  14116  			if (ret) {
19279235bea221 Carolyn Wyborny     2017-07-14  14117  				/* Single TC condition is not fatal,
19279235bea221 Carolyn Wyborny     2017-07-14  14118  				 * message and continue
19279235bea221 Carolyn Wyborny     2017-07-14  14119  				 */
41c445ff0f482b Jesse Brandeburg    2013-09-11  14120  				dev_info(&pf->pdev->dev,
80e54cad3a1865 Jan Sokolowski      2023-01-05  14121  					 "failed to configure TCs for main VSI tc_map 0x%08x, err %d aq_err %s\n",
f1c7e72e390391 Shannon Nelson      2015-06-04  14122  					 enabled_tc,
80e54cad3a1865 Jan Sokolowski      2023-01-05  14123  					 ret,
f1c7e72e390391 Shannon Nelson      2015-06-04  14124  					 i40e_aq_str(&pf->hw,
f1c7e72e390391 Shannon Nelson      2015-06-04  14125  						    pf->hw.aq.asq_last_status));
41c445ff0f482b Jesse Brandeburg    2013-09-11  14126  			}
41c445ff0f482b Jesse Brandeburg    2013-09-11  14127  		}
41c445ff0f482b Jesse Brandeburg    2013-09-11  14128  		break;
41c445ff0f482b Jesse Brandeburg    2013-09-11  14129  
41c445ff0f482b Jesse Brandeburg    2013-09-11  14130  	case I40E_VSI_FDIR:
cbf613252496ed Anjali Singhai Jain 2014-01-17  14131  		ctxt.pf_num = hw->pf_id;
cbf613252496ed Anjali Singhai Jain 2014-01-17  14132  		ctxt.vf_num = 0;
cbf613252496ed Anjali Singhai Jain 2014-01-17  14133  		ctxt.uplink_seid = vsi->uplink_seid;
2b18e5914d5210 Neerav Parikh       2015-01-24  14134  		ctxt.connection_type = I40E_AQ_VSI_CONN_TYPE_NORMAL;
cbf613252496ed Anjali Singhai Jain 2014-01-17  14135  		ctxt.flags = I40E_AQ_VSI_TYPE_PF;
fc60861e9b0038 Anjali Singhai Jain 2015-05-08  14136  		if ((pf->flags & I40E_FLAG_VEB_MODE_ENABLED) &&
fc60861e9b0038 Anjali Singhai Jain 2015-05-08  14137  		    (i40e_is_vsi_uplink_mode_veb(vsi))) {
79c21a827e9808 Anjali Singhai Jain 2014-11-13  14138  			ctxt.info.valid_sections |=
79c21a827e9808 Anjali Singhai Jain 2014-11-13  14139  			     cpu_to_le16(I40E_AQ_VSI_PROP_SWITCH_VALID);
79c21a827e9808 Anjali Singhai Jain 2014-11-13  14140  			ctxt.info.switch_id =
79c21a827e9808 Anjali Singhai Jain 2014-11-13  14141  			   cpu_to_le16(I40E_AQ_VSI_SW_ID_FLAG_ALLOW_LB);
51616018dd1b49 Neerav Parikh       2015-02-06  14142  		}
41c445ff0f482b Jesse Brandeburg    2013-09-11  14143  		i40e_vsi_setup_queue_map(vsi, &ctxt, enabled_tc, true);
41c445ff0f482b Jesse Brandeburg    2013-09-11  14144  		break;
41c445ff0f482b Jesse Brandeburg    2013-09-11  14145  
41c445ff0f482b Jesse Brandeburg    2013-09-11  14146  	case I40E_VSI_VMDQ2:
41c445ff0f482b Jesse Brandeburg    2013-09-11  14147  		ctxt.pf_num = hw->pf_id;
41c445ff0f482b Jesse Brandeburg    2013-09-11  14148  		ctxt.vf_num = 0;
41c445ff0f482b Jesse Brandeburg    2013-09-11  14149  		ctxt.uplink_seid = vsi->uplink_seid;
2b18e5914d5210 Neerav Parikh       2015-01-24  14150  		ctxt.connection_type = I40E_AQ_VSI_CONN_TYPE_NORMAL;
41c445ff0f482b Jesse Brandeburg    2013-09-11  14151  		ctxt.flags = I40E_AQ_VSI_TYPE_VMDQ2;
41c445ff0f482b Jesse Brandeburg    2013-09-11  14152  
41c445ff0f482b Jesse Brandeburg    2013-09-11  14153  		/* This VSI is connected to VEB so the switch_id
41c445ff0f482b Jesse Brandeburg    2013-09-11  14154  		 * should be set to zero by default.
41c445ff0f482b Jesse Brandeburg    2013-09-11  14155  		 */
51616018dd1b49 Neerav Parikh       2015-02-06  14156  		if (i40e_is_vsi_uplink_mode_veb(vsi)) {
51616018dd1b49 Neerav Parikh       2015-02-06  14157  			ctxt.info.valid_sections |=
51616018dd1b49 Neerav Parikh       2015-02-06  14158  				cpu_to_le16(I40E_AQ_VSI_PROP_SWITCH_VALID);
51616018dd1b49 Neerav Parikh       2015-02-06  14159  			ctxt.info.switch_id =
51616018dd1b49 Neerav Parikh       2015-02-06  14160  				cpu_to_le16(I40E_AQ_VSI_SW_ID_FLAG_ALLOW_LB);
51616018dd1b49 Neerav Parikh       2015-02-06  14161  		}
41c445ff0f482b Jesse Brandeburg    2013-09-11  14162  
41c445ff0f482b Jesse Brandeburg    2013-09-11  14163  		/* Setup the VSI tx/rx queue map for TC0 only for now */
41c445ff0f482b Jesse Brandeburg    2013-09-11  14164  		i40e_vsi_setup_queue_map(vsi, &ctxt, enabled_tc, true);
41c445ff0f482b Jesse Brandeburg    2013-09-11  14165  		break;
41c445ff0f482b Jesse Brandeburg    2013-09-11  14166  
41c445ff0f482b Jesse Brandeburg    2013-09-11  14167  	case I40E_VSI_SRIOV:
41c445ff0f482b Jesse Brandeburg    2013-09-11  14168  		ctxt.pf_num = hw->pf_id;
41c445ff0f482b Jesse Brandeburg    2013-09-11  14169  		ctxt.vf_num = vsi->vf_id + hw->func_caps.vf_base_id;
41c445ff0f482b Jesse Brandeburg    2013-09-11  14170  		ctxt.uplink_seid = vsi->uplink_seid;
2b18e5914d5210 Neerav Parikh       2015-01-24  14171  		ctxt.connection_type = I40E_AQ_VSI_CONN_TYPE_NORMAL;
41c445ff0f482b Jesse Brandeburg    2013-09-11  14172  		ctxt.flags = I40E_AQ_VSI_TYPE_VF;
41c445ff0f482b Jesse Brandeburg    2013-09-11  14173  
41c445ff0f482b Jesse Brandeburg    2013-09-11  14174  		/* This VSI is connected to VEB so the switch_id
41c445ff0f482b Jesse Brandeburg    2013-09-11  14175  		 * should be set to zero by default.
41c445ff0f482b Jesse Brandeburg    2013-09-11  14176  		 */
51616018dd1b49 Neerav Parikh       2015-02-06  14177  		if (i40e_is_vsi_uplink_mode_veb(vsi)) {
51616018dd1b49 Neerav Parikh       2015-02-06  14178  			ctxt.info.valid_sections |=
51616018dd1b49 Neerav Parikh       2015-02-06  14179  				cpu_to_le16(I40E_AQ_VSI_PROP_SWITCH_VALID);
51616018dd1b49 Neerav Parikh       2015-02-06  14180  			ctxt.info.switch_id =
51616018dd1b49 Neerav Parikh       2015-02-06  14181  				cpu_to_le16(I40E_AQ_VSI_SW_ID_FLAG_ALLOW_LB);
51616018dd1b49 Neerav Parikh       2015-02-06  14182  		}
41c445ff0f482b Jesse Brandeburg    2013-09-11  14183  
e3219ce6a77546 Anjali Singhai Jain 2016-01-20  14184  		if (vsi->back->flags & I40E_FLAG_IWARP_ENABLED) {
e3219ce6a77546 Anjali Singhai Jain 2016-01-20  14185  			ctxt.info.valid_sections |=
e3219ce6a77546 Anjali Singhai Jain 2016-01-20  14186  				cpu_to_le16(I40E_AQ_VSI_PROP_QUEUE_OPT_VALID);
e3219ce6a77546 Anjali Singhai Jain 2016-01-20  14187  			ctxt.info.queueing_opt_flags |=
4b28cdba4859c2 Ashish Shah         2016-05-03  14188  				(I40E_AQ_VSI_QUE_OPT_TCP_ENA |
4b28cdba4859c2 Ashish Shah         2016-05-03  14189  				 I40E_AQ_VSI_QUE_OPT_RSS_LUT_VSI);
e3219ce6a77546 Anjali Singhai Jain 2016-01-20  14190  		}
e3219ce6a77546 Anjali Singhai Jain 2016-01-20  14191  
41c445ff0f482b Jesse Brandeburg    2013-09-11  14192  		ctxt.info.valid_sections |= cpu_to_le16(I40E_AQ_VSI_PROP_VLAN_VALID);
41c445ff0f482b Jesse Brandeburg    2013-09-11  14193  		ctxt.info.port_vlan_flags |= I40E_AQ_VSI_PVLAN_MODE_ALL;
c674d1250bfc04 Mitch Williams      2014-05-20  14194  		if (pf->vf[vsi->vf_id].spoofchk) {
c674d1250bfc04 Mitch Williams      2014-05-20  14195  			ctxt.info.valid_sections |=
c674d1250bfc04 Mitch Williams      2014-05-20  14196  				cpu_to_le16(I40E_AQ_VSI_PROP_SECURITY_VALID);
c674d1250bfc04 Mitch Williams      2014-05-20  14197  			ctxt.info.sec_flags |=
c674d1250bfc04 Mitch Williams      2014-05-20  14198  				(I40E_AQ_VSI_SEC_FLAG_ENABLE_VLAN_CHK |
c674d1250bfc04 Mitch Williams      2014-05-20  14199  				 I40E_AQ_VSI_SEC_FLAG_ENABLE_MAC_CHK);
c674d1250bfc04 Mitch Williams      2014-05-20  14200  		}
41c445ff0f482b Jesse Brandeburg    2013-09-11  14201  		/* Setup the VSI tx/rx queue map for TC0 only for now */
41c445ff0f482b Jesse Brandeburg    2013-09-11  14202  		i40e_vsi_setup_queue_map(vsi, &ctxt, enabled_tc, true);
41c445ff0f482b Jesse Brandeburg    2013-09-11  14203  		break;
41c445ff0f482b Jesse Brandeburg    2013-09-11  14204  
e3219ce6a77546 Anjali Singhai Jain 2016-01-20  14205  	case I40E_VSI_IWARP:
e3219ce6a77546 Anjali Singhai Jain 2016-01-20  14206  		/* send down message to iWARP */
e3219ce6a77546 Anjali Singhai Jain 2016-01-20  14207  		break;
e3219ce6a77546 Anjali Singhai Jain 2016-01-20  14208  
41c445ff0f482b Jesse Brandeburg    2013-09-11  14209  	default:
41c445ff0f482b Jesse Brandeburg    2013-09-11  14210  		return -ENODEV;
41c445ff0f482b Jesse Brandeburg    2013-09-11  14211  	}
41c445ff0f482b Jesse Brandeburg    2013-09-11  14212  
41c445ff0f482b Jesse Brandeburg    2013-09-11  14213  	if (vsi->type != I40E_VSI_MAIN) {
41c445ff0f482b Jesse Brandeburg    2013-09-11  14214  		ret = i40e_aq_add_vsi(hw, &ctxt, NULL);
41c445ff0f482b Jesse Brandeburg    2013-09-11  14215  		if (ret) {
41c445ff0f482b Jesse Brandeburg    2013-09-11  14216  			dev_info(&vsi->back->pdev->dev,
80e54cad3a1865 Jan Sokolowski      2023-01-05  14217  				 "add vsi failed, err %d aq_err %s\n",
80e54cad3a1865 Jan Sokolowski      2023-01-05  14218  				 ret,
f1c7e72e390391 Shannon Nelson      2015-06-04  14219  				 i40e_aq_str(&pf->hw,
f1c7e72e390391 Shannon Nelson      2015-06-04  14220  					     pf->hw.aq.asq_last_status));
41c445ff0f482b Jesse Brandeburg    2013-09-11  14221  			ret = -ENOENT;
41c445ff0f482b Jesse Brandeburg    2013-09-11  14222  			goto err;
41c445ff0f482b Jesse Brandeburg    2013-09-11  14223  		}
1a2f62489b5dc1 Jesse Brandeburg    2015-03-31  14224  		vsi->info = ctxt.info;
41c445ff0f482b Jesse Brandeburg    2013-09-11  14225  		vsi->info.valid_sections = 0;
41c445ff0f482b Jesse Brandeburg    2013-09-11  14226  		vsi->seid = ctxt.seid;
41c445ff0f482b Jesse Brandeburg    2013-09-11  14227  		vsi->id = ctxt.vsi_number;
41c445ff0f482b Jesse Brandeburg    2013-09-11  14228  	}
41c445ff0f482b Jesse Brandeburg    2013-09-11  14229  
c3c7ea27bec070 Mitch Williams      2016-06-20  14230  	vsi->active_filters = 0;
0da36b9774cc24 Jacob Keller        2017-04-19  14231  	clear_bit(__I40E_VSI_OVERFLOW_PROMISC, vsi->state);
278e7d0b9d6864 Jacob Keller        2016-10-05  14232  	spin_lock_bh(&vsi->mac_filter_hash_lock);
41c445ff0f482b Jesse Brandeburg    2013-09-11  14233  	/* If macvlan filters already exist, force them to get loaded */
278e7d0b9d6864 Jacob Keller        2016-10-05  14234  	hash_for_each_safe(vsi->mac_filter_hash, bkt, h, f, hlist) {
c3c7ea27bec070 Mitch Williams      2016-06-20  14235  		f->state = I40E_FILTER_NEW;
41c445ff0f482b Jesse Brandeburg    2013-09-11  14236  		f_count++;
216590355cb0e7 Kiran Patil         2015-09-30  14237  	}
278e7d0b9d6864 Jacob Keller        2016-10-05  14238  	spin_unlock_bh(&vsi->mac_filter_hash_lock);
216590355cb0e7 Kiran Patil         2015-09-30  14239  
41c445ff0f482b Jesse Brandeburg    2013-09-11  14240  	if (f_count) {
41c445ff0f482b Jesse Brandeburg    2013-09-11  14241  		vsi->flags |= I40E_VSI_FLAG_FILTER_CHANGED;
bfe040c3851ad0 Jacob Keller        2018-03-16  14242  		set_bit(__I40E_MACVLAN_SYNC_PENDING, pf->state);
41c445ff0f482b Jesse Brandeburg    2013-09-11  14243  	}
41c445ff0f482b Jesse Brandeburg    2013-09-11  14244  
41c445ff0f482b Jesse Brandeburg    2013-09-11  14245  	/* Update VSI BW information */
41c445ff0f482b Jesse Brandeburg    2013-09-11  14246  	ret = i40e_vsi_get_bw_info(vsi);
41c445ff0f482b Jesse Brandeburg    2013-09-11  14247  	if (ret) {
41c445ff0f482b Jesse Brandeburg    2013-09-11  14248  		dev_info(&pf->pdev->dev,
80e54cad3a1865 Jan Sokolowski      2023-01-05  14249  			 "couldn't get vsi bw info, err %d aq_err %s\n",
80e54cad3a1865 Jan Sokolowski      2023-01-05  14250  			 ret,
f1c7e72e390391 Shannon Nelson      2015-06-04  14251  			 i40e_aq_str(&pf->hw, pf->hw.aq.asq_last_status));
41c445ff0f482b Jesse Brandeburg    2013-09-11  14252  		/* VSI is already added so not tearing that up */
41c445ff0f482b Jesse Brandeburg    2013-09-11  14253  		ret = 0;
41c445ff0f482b Jesse Brandeburg    2013-09-11  14254  	}
41c445ff0f482b Jesse Brandeburg    2013-09-11  14255  
41c445ff0f482b Jesse Brandeburg    2013-09-11  14256  err:
41c445ff0f482b Jesse Brandeburg    2013-09-11  14257  	return ret;
41c445ff0f482b Jesse Brandeburg    2013-09-11  14258  }
41c445ff0f482b Jesse Brandeburg    2013-09-11  14259
diff mbox series

Patch

diff --git a/drivers/net/ethernet/intel/i40e/i40e_client.c b/drivers/net/ethernet/intel/i40e/i40e_client.c
index 6ea43ef40540..685cf5d82dc6 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_client.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_client.c
@@ -686,8 +686,8 @@  static int i40e_client_update_vsi_ctxt(struct i40e_info *ldev,
 	ctxt.flags = I40E_AQ_VSI_TYPE_PF;
 	if (err) {
 		dev_info(&pf->pdev->dev,
-			 "couldn't get PF vsi config, err %s aq_err %s\n",
-			 i40e_stat_str(&pf->hw, err),
+			 "couldn't get PF vsi config, err %d aq_err %s\n",
+			 err,
 			 i40e_aq_str(&pf->hw,
 				     pf->hw.aq.asq_last_status));
 		return -ENOENT;
@@ -714,8 +714,8 @@  static int i40e_client_update_vsi_ctxt(struct i40e_info *ldev,
 		err = i40e_aq_update_vsi_params(&vsi->back->hw, &ctxt, NULL);
 		if (err) {
 			dev_info(&pf->pdev->dev,
-				 "update VSI ctxt for PE failed, err %s aq_err %s\n",
-				 i40e_stat_str(&pf->hw, err),
+				 "update VSI ctxt for PE failed, err %d aq_err %s\n",
+				 err,
 				 i40e_aq_str(&pf->hw,
 					     pf->hw.aq.asq_last_status));
 		}
diff --git a/drivers/net/ethernet/intel/i40e/i40e_common.c b/drivers/net/ethernet/intel/i40e/i40e_common.c
index 0b77307841b0..5210e1e2fd44 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_common.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_common.c
@@ -124,84 +124,6 @@  const char *i40e_aq_str(struct i40e_hw *hw, enum i40e_admin_queue_err aq_err)
 	return hw->err_str;
 }
 
-/**
- * i40e_stat_str - convert status err code to a string
- * @hw: pointer to the HW structure
- * @stat_err: the status error code to convert
- **/
-const char *i40e_stat_str(struct i40e_hw *hw, i40e_status stat_err)
-{
-	switch (stat_err) {
-	case 0:
-		return "OK";
-	case I40E_ERR_NVM:
-		return "I40E_ERR_NVM";
-	case I40E_ERR_NVM_CHECKSUM:
-		return "I40E_ERR_NVM_CHECKSUM";
-	case I40E_ERR_CONFIG:
-		return "I40E_ERR_CONFIG";
-	case I40E_ERR_PARAM:
-		return "I40E_ERR_PARAM";
-	case I40E_ERR_UNKNOWN_PHY:
-		return "I40E_ERR_UNKNOWN_PHY";
-	case I40E_ERR_INVALID_MAC_ADDR:
-		return "I40E_ERR_INVALID_MAC_ADDR";
-	case I40E_ERR_DEVICE_NOT_SUPPORTED:
-		return "I40E_ERR_DEVICE_NOT_SUPPORTED";
-	case I40E_ERR_RESET_FAILED:
-		return "I40E_ERR_RESET_FAILED";
-	case I40E_ERR_NO_AVAILABLE_VSI:
-		return "I40E_ERR_NO_AVAILABLE_VSI";
-	case I40E_ERR_NO_MEMORY:
-		return "I40E_ERR_NO_MEMORY";
-	case I40E_ERR_BAD_PTR:
-		return "I40E_ERR_BAD_PTR";
-	case I40E_ERR_INVALID_SIZE:
-		return "I40E_ERR_INVALID_SIZE";
-	case I40E_ERR_QUEUE_EMPTY:
-		return "I40E_ERR_QUEUE_EMPTY";
-	case I40E_ERR_TIMEOUT:
-		return "I40E_ERR_TIMEOUT";
-	case I40E_ERR_INVALID_SD_INDEX:
-		return "I40E_ERR_INVALID_SD_INDEX";
-	case I40E_ERR_INVALID_PAGE_DESC_INDEX:
-		return "I40E_ERR_INVALID_PAGE_DESC_INDEX";
-	case I40E_ERR_INVALID_SD_TYPE:
-		return "I40E_ERR_INVALID_SD_TYPE";
-	case I40E_ERR_INVALID_HMC_OBJ_INDEX:
-		return "I40E_ERR_INVALID_HMC_OBJ_INDEX";
-	case I40E_ERR_INVALID_HMC_OBJ_COUNT:
-		return "I40E_ERR_INVALID_HMC_OBJ_COUNT";
-	case I40E_ERR_ADMIN_QUEUE_ERROR:
-		return "I40E_ERR_ADMIN_QUEUE_ERROR";
-	case I40E_ERR_ADMIN_QUEUE_TIMEOUT:
-		return "I40E_ERR_ADMIN_QUEUE_TIMEOUT";
-	case I40E_ERR_BUF_TOO_SHORT:
-		return "I40E_ERR_BUF_TOO_SHORT";
-	case I40E_ERR_ADMIN_QUEUE_FULL:
-		return "I40E_ERR_ADMIN_QUEUE_FULL";
-	case I40E_ERR_ADMIN_QUEUE_NO_WORK:
-		return "I40E_ERR_ADMIN_QUEUE_NO_WORK";
-	case I40E_ERR_NVM_BLANK_MODE:
-		return "I40E_ERR_NVM_BLANK_MODE";
-	case I40E_ERR_NOT_IMPLEMENTED:
-		return "I40E_ERR_NOT_IMPLEMENTED";
-	case I40E_ERR_DIAG_TEST_FAILED:
-		return "I40E_ERR_DIAG_TEST_FAILED";
-	case I40E_ERR_NOT_READY:
-		return "I40E_ERR_NOT_READY";
-	case I40E_NOT_SUPPORTED:
-		return "I40E_NOT_SUPPORTED";
-	case I40E_ERR_FIRMWARE_API_VERSION:
-		return "I40E_ERR_FIRMWARE_API_VERSION";
-	case I40E_ERR_ADMIN_QUEUE_CRITICAL_ERROR:
-		return "I40E_ERR_ADMIN_QUEUE_CRITICAL_ERROR";
-	}
-
-	snprintf(hw->err_str, sizeof(hw->err_str), "%d", stat_err);
-	return hw->err_str;
-}
-
 /**
  * i40e_debug_aq
  * @hw: debug mask related to admin queue
diff --git a/drivers/net/ethernet/intel/i40e/i40e_dcb_nl.c b/drivers/net/ethernet/intel/i40e/i40e_dcb_nl.c
index e32c61909b31..bba70bd5703b 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_dcb_nl.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_dcb_nl.c
@@ -135,8 +135,8 @@  static int i40e_dcbnl_ieee_setets(struct net_device *netdev,
 	ret = i40e_hw_dcb_config(pf, &pf->tmp_cfg);
 	if (ret) {
 		dev_info(&pf->pdev->dev,
-			 "Failed setting DCB ETS configuration err %s aq_err %s\n",
-			 i40e_stat_str(&pf->hw, ret),
+			 "Failed setting DCB ETS configuration err %d aq_err %s\n",
+			 ret,
 			 i40e_aq_str(&pf->hw, pf->hw.aq.asq_last_status));
 		return -EINVAL;
 	}
@@ -174,8 +174,8 @@  static int i40e_dcbnl_ieee_setpfc(struct net_device *netdev,
 	ret = i40e_hw_dcb_config(pf, &pf->tmp_cfg);
 	if (ret) {
 		dev_info(&pf->pdev->dev,
-			 "Failed setting DCB PFC configuration err %s aq_err %s\n",
-			 i40e_stat_str(&pf->hw, ret),
+			 "Failed setting DCB PFC configuration err %d aq_err %s\n",
+			 ret,
 			 i40e_aq_str(&pf->hw, pf->hw.aq.asq_last_status));
 		return -EINVAL;
 	}
@@ -225,8 +225,8 @@  static int i40e_dcbnl_ieee_setapp(struct net_device *netdev,
 	ret = i40e_hw_dcb_config(pf, &pf->tmp_cfg);
 	if (ret) {
 		dev_info(&pf->pdev->dev,
-			 "Failed setting DCB configuration err %s aq_err %s\n",
-			 i40e_stat_str(&pf->hw, ret),
+			 "Failed setting DCB configuration err %d aq_err %s\n",
+			 ret,
 			 i40e_aq_str(&pf->hw, pf->hw.aq.asq_last_status));
 		return -EINVAL;
 	}
@@ -290,8 +290,8 @@  static int i40e_dcbnl_ieee_delapp(struct net_device *netdev,
 	ret = i40e_hw_dcb_config(pf, &pf->tmp_cfg);
 	if (ret) {
 		dev_info(&pf->pdev->dev,
-			 "Failed setting DCB configuration err %s aq_err %s\n",
-			 i40e_stat_str(&pf->hw, ret),
+			 "Failed setting DCB configuration err %d aq_err %s\n",
+			 ret,
 			 i40e_aq_str(&pf->hw, pf->hw.aq.asq_last_status));
 		return -EINVAL;
 	}
diff --git a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
index 781824e2c011..fbebb81658fb 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
@@ -1456,8 +1456,8 @@  static int i40e_set_link_ksettings(struct net_device *netdev,
 		status = i40e_aq_set_phy_config(hw, &config, NULL);
 		if (status) {
 			netdev_info(netdev,
-				    "Set phy config failed, err %s aq_err %s\n",
-				    i40e_stat_str(hw, status),
+				    "Set phy config failed, err %d aq_err %s\n",
+				    status,
 				    i40e_aq_str(hw, hw->aq.asq_last_status));
 			err = -EAGAIN;
 			goto done;
@@ -1466,8 +1466,8 @@  static int i40e_set_link_ksettings(struct net_device *netdev,
 		status = i40e_update_link_info(hw);
 		if (status)
 			netdev_dbg(netdev,
-				   "Updating link info failed with err %s aq_err %s\n",
-				   i40e_stat_str(hw, status),
+				   "Updating link info failed with err %d aq_err %s\n",
+				   status,
 				   i40e_aq_str(hw, hw->aq.asq_last_status));
 
 	} else {
@@ -1518,8 +1518,8 @@  static int i40e_set_fec_cfg(struct net_device *netdev, u8 fec_cfg)
 		status = i40e_aq_set_phy_config(hw, &config, NULL);
 		if (status) {
 			netdev_info(netdev,
-				    "Set phy config failed, err %s aq_err %s\n",
-				    i40e_stat_str(hw, status),
+				    "Set phy config failed, err %d aq_err %s\n",
+				    status,
 				    i40e_aq_str(hw, hw->aq.asq_last_status));
 			err = -EAGAIN;
 			goto done;
@@ -1532,8 +1532,8 @@  static int i40e_set_fec_cfg(struct net_device *netdev, u8 fec_cfg)
 			 * (e.g. no physical connection etc.)
 			 */
 			netdev_dbg(netdev,
-				   "Updating link info failed with err %s aq_err %s\n",
-				   i40e_stat_str(hw, status),
+				   "Updating link info failed with err %d aq_err %s\n",
+				   status,
 				   i40e_aq_str(hw, hw->aq.asq_last_status));
 	}
 
@@ -1639,8 +1639,8 @@  static int i40e_nway_reset(struct net_device *netdev)
 
 	ret = i40e_aq_set_link_restart_an(hw, link_up, NULL);
 	if (ret) {
-		netdev_info(netdev, "link restart failed, err %s aq_err %s\n",
-			    i40e_stat_str(hw, ret),
+		netdev_info(netdev, "link restart failed, err %d aq_err %s\n",
+			    ret,
 			    i40e_aq_str(hw, hw->aq.asq_last_status));
 		return -EIO;
 	}
@@ -1756,20 +1756,20 @@  static int i40e_set_pauseparam(struct net_device *netdev,
 	status = i40e_set_fc(hw, &aq_failures, link_up);
 
 	if (aq_failures & I40E_SET_FC_AQ_FAIL_GET) {
-		netdev_info(netdev, "Set fc failed on the get_phy_capabilities call with err %s aq_err %s\n",
-			    i40e_stat_str(hw, status),
+		netdev_info(netdev, "Set fc failed on the get_phy_capabilities call with err %d aq_err %s\n",
+			    status,
 			    i40e_aq_str(hw, hw->aq.asq_last_status));
 		err = -EAGAIN;
 	}
 	if (aq_failures & I40E_SET_FC_AQ_FAIL_SET) {
-		netdev_info(netdev, "Set fc failed on the set_phy_config call with err %s aq_err %s\n",
-			    i40e_stat_str(hw, status),
+		netdev_info(netdev, "Set fc failed on the set_phy_config call with err %d aq_err %s\n",
+			    status,
 			    i40e_aq_str(hw, hw->aq.asq_last_status));
 		err = -EAGAIN;
 	}
 	if (aq_failures & I40E_SET_FC_AQ_FAIL_UPDATE) {
-		netdev_info(netdev, "Set fc failed on the get_link_info call with err %s aq_err %s\n",
-			    i40e_stat_str(hw, status),
+		netdev_info(netdev, "Set fc failed on the get_link_info call with err %d aq_err %s\n",
+			    status,
 			    i40e_aq_str(hw, hw->aq.asq_last_status));
 		err = -EAGAIN;
 	}
@@ -5364,8 +5364,8 @@  static int i40e_set_priv_flags(struct net_device *dev, u32 flags)
 						0, NULL);
 		if (ret && pf->hw.aq.asq_last_status != I40E_AQ_RC_ESRCH) {
 			dev_info(&pf->pdev->dev,
-				 "couldn't set switch config bits, err %s aq_err %s\n",
-				 i40e_stat_str(&pf->hw, ret),
+				 "couldn't set switch config bits, err %d aq_err %s\n",
+				 ret,
 				 i40e_aq_str(&pf->hw,
 					     pf->hw.aq.asq_last_status));
 			/* not a fatal problem, just keep going */
@@ -5437,9 +5437,8 @@  static int i40e_set_priv_flags(struct net_device *dev, u32 flags)
 					return -EBUSY;
 				default:
 					dev_warn(&pf->pdev->dev,
-						 "Starting FW LLDP agent failed: error: %s, %s\n",
-						 i40e_stat_str(&pf->hw,
-							       status),
+						 "Starting FW LLDP agent failed: error: %d, %s\n",
+						 status,
 						 i40e_aq_str(&pf->hw,
 							     adq_err));
 					return -EINVAL;
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index 3c62b5701f3f..a3bbcd8015fe 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -1824,8 +1824,8 @@  static int i40e_set_mac(struct net_device *netdev, void *p)
 		ret = i40e_aq_mac_address_write(hw, I40E_AQC_WRITE_TYPE_LAA_WOL,
 						addr->sa_data, NULL);
 		if (ret)
-			netdev_info(netdev, "Ignoring error from firmware on LAA update, status %s, AQ ret %s\n",
-				    i40e_stat_str(hw, ret),
+			netdev_info(netdev, "Ignoring error from firmware on LAA update, status %d, AQ ret %s\n",
+				    ret,
 				    i40e_aq_str(hw, hw->aq.asq_last_status));
 	}
 
@@ -1856,8 +1856,8 @@  static int i40e_config_rss_aq(struct i40e_vsi *vsi, const u8 *seed,
 		ret = i40e_aq_set_rss_key(hw, vsi->id, seed_dw);
 		if (ret) {
 			dev_info(&pf->pdev->dev,
-				 "Cannot set RSS key, err %s aq_err %s\n",
-				 i40e_stat_str(hw, ret),
+				 "Cannot set RSS key, err %d aq_err %s\n",
+				 ret,
 				 i40e_aq_str(hw, hw->aq.asq_last_status));
 			return ret;
 		}
@@ -1868,8 +1868,8 @@  static int i40e_config_rss_aq(struct i40e_vsi *vsi, const u8 *seed,
 		ret = i40e_aq_set_rss_lut(hw, vsi->id, pf_lut, lut, lut_size);
 		if (ret) {
 			dev_info(&pf->pdev->dev,
-				 "Cannot set RSS lut, err %s aq_err %s\n",
-				 i40e_stat_str(hw, ret),
+				 "Cannot set RSS lut, err %d aq_err %s\n",
+				 ret,
 				 i40e_aq_str(hw, hw->aq.asq_last_status));
 			return ret;
 		}
@@ -2360,8 +2360,8 @@  void i40e_aqc_del_filters(struct i40e_vsi *vsi, const char *vsi_name,
 	if (aq_ret && !(aq_status == I40E_AQ_RC_ENOENT)) {
 		*retval = -EIO;
 		dev_info(&vsi->back->pdev->dev,
-			 "ignoring delete macvlan error on %s, err %s, aq_err %s\n",
-			 vsi_name, i40e_stat_str(hw, aq_ret),
+			 "ignoring delete macvlan error on %s, err %d, aq_err %s\n",
+			 vsi_name, aq_ret,
 			 i40e_aq_str(hw, aq_status));
 	}
 }
@@ -2490,8 +2490,8 @@  static int i40e_set_promiscuous(struct i40e_pf *pf, bool promisc)
 							   NULL);
 		if (aq_ret) {
 			dev_info(&pf->pdev->dev,
-				 "Set default VSI failed, err %s, aq_err %s\n",
-				 i40e_stat_str(hw, aq_ret),
+				 "Set default VSI failed, err %d, aq_err %s\n",
+				 aq_ret,
 				 i40e_aq_str(hw, hw->aq.asq_last_status));
 		}
 	} else {
@@ -2502,8 +2502,8 @@  static int i40e_set_promiscuous(struct i40e_pf *pf, bool promisc)
 						  true);
 		if (aq_ret) {
 			dev_info(&pf->pdev->dev,
-				 "set unicast promisc failed, err %s, aq_err %s\n",
-				 i40e_stat_str(hw, aq_ret),
+				 "set unicast promisc failed, err %d, aq_err %s\n",
+				 aq_ret,
 				 i40e_aq_str(hw, hw->aq.asq_last_status));
 		}
 		aq_ret = i40e_aq_set_vsi_multicast_promiscuous(
@@ -2512,8 +2512,8 @@  static int i40e_set_promiscuous(struct i40e_pf *pf, bool promisc)
 						  promisc, NULL);
 		if (aq_ret) {
 			dev_info(&pf->pdev->dev,
-				 "set multicast promisc failed, err %s, aq_err %s\n",
-				 i40e_stat_str(hw, aq_ret),
+				 "set multicast promisc failed, err %d, aq_err %s\n",
+				 aq_ret,
 				 i40e_aq_str(hw, hw->aq.asq_last_status));
 		}
 	}
@@ -2816,9 +2816,9 @@  int i40e_sync_vsi_filters(struct i40e_vsi *vsi)
 			retval = i40e_aq_rc_to_posix(aq_ret,
 						     hw->aq.asq_last_status);
 			dev_info(&pf->pdev->dev,
-				 "set multi promisc failed on %s, err %s aq_err %s\n",
+				 "set multi promisc failed on %s, err %d aq_err %s\n",
 				 vsi_name,
-				 i40e_stat_str(hw, aq_ret),
+				 aq_ret,
 				 i40e_aq_str(hw, hw->aq.asq_last_status));
 		} else {
 			dev_info(&pf->pdev->dev, "%s allmulti mode.\n",
@@ -2836,10 +2836,10 @@  int i40e_sync_vsi_filters(struct i40e_vsi *vsi)
 			retval = i40e_aq_rc_to_posix(aq_ret,
 						     hw->aq.asq_last_status);
 			dev_info(&pf->pdev->dev,
-				 "Setting promiscuous %s failed on %s, err %s aq_err %s\n",
+				 "Setting promiscuous %s failed on %s, err %d aq_err %s\n",
 				 cur_promisc ? "on" : "off",
 				 vsi_name,
-				 i40e_stat_str(hw, aq_ret),
+				 aq_ret,
 				 i40e_aq_str(hw, hw->aq.asq_last_status));
 		}
 	}
@@ -2987,8 +2987,8 @@  void i40e_vlan_stripping_enable(struct i40e_vsi *vsi)
 	ret = i40e_aq_update_vsi_params(&vsi->back->hw, &ctxt, NULL);
 	if (ret) {
 		dev_info(&vsi->back->pdev->dev,
-			 "update vlan stripping failed, err %s aq_err %s\n",
-			 i40e_stat_str(&vsi->back->hw, ret),
+			 "update vlan stripping failed, err %d aq_err %s\n",
+			 ret,
 			 i40e_aq_str(&vsi->back->hw,
 				     vsi->back->hw.aq.asq_last_status));
 	}
@@ -3022,8 +3022,8 @@  void i40e_vlan_stripping_disable(struct i40e_vsi *vsi)
 	ret = i40e_aq_update_vsi_params(&vsi->back->hw, &ctxt, NULL);
 	if (ret) {
 		dev_info(&vsi->back->pdev->dev,
-			 "update vlan stripping failed, err %s aq_err %s\n",
-			 i40e_stat_str(&vsi->back->hw, ret),
+			 "update vlan stripping failed, err %d aq_err %s\n",
+			 ret,
 			 i40e_aq_str(&vsi->back->hw,
 				     vsi->back->hw.aq.asq_last_status));
 	}
@@ -3267,8 +3267,8 @@  int i40e_vsi_add_pvid(struct i40e_vsi *vsi, u16 vid)
 	ret = i40e_aq_update_vsi_params(&vsi->back->hw, &ctxt, NULL);
 	if (ret) {
 		dev_info(&vsi->back->pdev->dev,
-			 "add pvid failed, err %s aq_err %s\n",
-			 i40e_stat_str(&vsi->back->hw, ret),
+			 "add pvid failed, err %d aq_err %s\n",
+			 ret,
 			 i40e_aq_str(&vsi->back->hw,
 				     vsi->back->hw.aq.asq_last_status));
 		return -ENOENT;
@@ -5541,8 +5541,8 @@  static int i40e_vsi_get_bw_info(struct i40e_vsi *vsi)
 	ret = i40e_aq_query_vsi_bw_config(hw, vsi->seid, &bw_config, NULL);
 	if (ret) {
 		dev_info(&pf->pdev->dev,
-			 "couldn't get PF vsi bw config, err %s aq_err %s\n",
-			 i40e_stat_str(&pf->hw, ret),
+			 "couldn't get PF vsi bw config, err %d aq_err %s\n",
+			 ret,
 			 i40e_aq_str(&pf->hw, pf->hw.aq.asq_last_status));
 		return -EINVAL;
 	}
@@ -5552,8 +5552,8 @@  static int i40e_vsi_get_bw_info(struct i40e_vsi *vsi)
 					       NULL);
 	if (ret) {
 		dev_info(&pf->pdev->dev,
-			 "couldn't get PF vsi ets bw config, err %s aq_err %s\n",
-			 i40e_stat_str(&pf->hw, ret),
+			 "couldn't get PF vsi ets bw config, err %d aq_err %s\n",
+			 ret,
 			 i40e_aq_str(&pf->hw, pf->hw.aq.asq_last_status));
 		return -EINVAL;
 	}
@@ -5742,8 +5742,8 @@  int i40e_update_adq_vsi_queues(struct i40e_vsi *vsi, int vsi_offset)
 
 	ret = i40e_aq_update_vsi_params(hw, &ctxt, NULL);
 	if (ret) {
-		dev_info(&pf->pdev->dev, "Update vsi config failed, err %s aq_err %s\n",
-			 i40e_stat_str(hw, ret),
+		dev_info(&pf->pdev->dev, "Update vsi config failed, err %d aq_err %s\n",
+			 ret,
 			 i40e_aq_str(hw, hw->aq.asq_last_status));
 		return ret;
 	}
@@ -5798,8 +5798,8 @@  static int i40e_vsi_config_tc(struct i40e_vsi *vsi, u8 enabled_tc)
 						  &bw_config, NULL);
 		if (ret) {
 			dev_info(&pf->pdev->dev,
-				 "Failed querying vsi bw info, err %s aq_err %s\n",
-				 i40e_stat_str(hw, ret),
+				 "Failed querying vsi bw info, err %d aq_err %s\n",
+				 ret,
 				 i40e_aq_str(hw, hw->aq.asq_last_status));
 			goto out;
 		}
@@ -5865,8 +5865,8 @@  static int i40e_vsi_config_tc(struct i40e_vsi *vsi, u8 enabled_tc)
 	ret = i40e_aq_update_vsi_params(hw, &ctxt, NULL);
 	if (ret) {
 		dev_info(&pf->pdev->dev,
-			 "Update vsi tc config failed, err %s aq_err %s\n",
-			 i40e_stat_str(hw, ret),
+			 "Update vsi tc config failed, err %d aq_err %s\n",
+			 ret,
 			 i40e_aq_str(hw, hw->aq.asq_last_status));
 		goto out;
 	}
@@ -5878,8 +5878,8 @@  static int i40e_vsi_config_tc(struct i40e_vsi *vsi, u8 enabled_tc)
 	ret = i40e_vsi_get_bw_info(vsi);
 	if (ret) {
 		dev_info(&pf->pdev->dev,
-			 "Failed updating vsi bw info, err %s aq_err %s\n",
-			 i40e_stat_str(hw, ret),
+			 "Failed updating vsi bw info, err %d aq_err %s\n",
+			 ret,
 			 i40e_aq_str(hw, hw->aq.asq_last_status));
 		goto out;
 	}
@@ -5970,8 +5970,8 @@  int i40e_set_bw_limit(struct i40e_vsi *vsi, u16 seid, u64 max_tx_rate)
 					  I40E_MAX_BW_INACTIVE_ACCUM, NULL);
 	if (ret)
 		dev_err(&pf->pdev->dev,
-			"Failed set tx rate (%llu Mbps) for vsi->seid %u, err %s aq_err %s\n",
-			max_tx_rate, seid, i40e_stat_str(&pf->hw, ret),
+			"Failed set tx rate (%llu Mbps) for vsi->seid %u, err %d aq_err %s\n",
+			max_tx_rate, seid, ret,
 			i40e_aq_str(&pf->hw, pf->hw.aq.asq_last_status));
 	return ret;
 }
@@ -6046,8 +6046,8 @@  static void i40e_remove_queue_channels(struct i40e_vsi *vsi)
 			last_aq_status = pf->hw.aq.asq_last_status;
 			if (ret)
 				dev_info(&pf->pdev->dev,
-					 "Failed to delete cloud filter, err %s aq_err %s\n",
-					 i40e_stat_str(&pf->hw, ret),
+					 "Failed to delete cloud filter, err %d aq_err %s\n",
+					 ret,
 					 i40e_aq_str(&pf->hw, last_aq_status));
 			kfree(cfilter);
 		}
@@ -6181,8 +6181,8 @@  static int i40e_vsi_reconfig_rss(struct i40e_vsi *vsi, u16 rss_size)
 	ret = i40e_config_rss(vsi, seed, lut, vsi->rss_table_size);
 	if (ret) {
 		dev_info(&pf->pdev->dev,
-			 "Cannot set RSS lut, err %s aq_err %s\n",
-			 i40e_stat_str(hw, ret),
+			 "Cannot set RSS lut, err %d aq_err %s\n",
+			 ret,
 			 i40e_aq_str(hw, hw->aq.asq_last_status));
 		kfree(lut);
 		return ret;
@@ -6280,8 +6280,8 @@  static int i40e_add_channel(struct i40e_pf *pf, u16 uplink_seid,
 	ret = i40e_aq_add_vsi(hw, &ctxt, NULL);
 	if (ret) {
 		dev_info(&pf->pdev->dev,
-			 "add new vsi failed, err %s aq_err %s\n",
-			 i40e_stat_str(&pf->hw, ret),
+			 "add new vsi failed, err %d aq_err %s\n",
+			 ret,
 			 i40e_aq_str(&pf->hw,
 				     pf->hw.aq.asq_last_status));
 		return -ENOENT;
@@ -6526,8 +6526,8 @@  static int i40e_validate_and_set_switch_mode(struct i40e_vsi *vsi)
 					mode, NULL);
 	if (ret && hw->aq.asq_last_status != I40E_AQ_RC_ESRCH)
 		dev_err(&pf->pdev->dev,
-			"couldn't set switch config bits, err %s aq_err %s\n",
-			i40e_stat_str(hw, ret),
+			"couldn't set switch config bits, err %d aq_err %s\n",
+			ret,
 			i40e_aq_str(hw,
 				    hw->aq.asq_last_status));
 
@@ -6727,8 +6727,8 @@  int i40e_veb_config_tc(struct i40e_veb *veb, u8 enabled_tc)
 						   &bw_data, NULL);
 	if (ret) {
 		dev_info(&pf->pdev->dev,
-			 "VEB bw config failed, err %s aq_err %s\n",
-			 i40e_stat_str(&pf->hw, ret),
+			 "VEB bw config failed, err %d aq_err %s\n",
+			 ret,
 			 i40e_aq_str(&pf->hw, pf->hw.aq.asq_last_status));
 		goto out;
 	}
@@ -6737,8 +6737,8 @@  int i40e_veb_config_tc(struct i40e_veb *veb, u8 enabled_tc)
 	ret = i40e_veb_get_bw_info(veb);
 	if (ret) {
 		dev_info(&pf->pdev->dev,
-			 "Failed getting veb bw config, err %s aq_err %s\n",
-			 i40e_stat_str(&pf->hw, ret),
+			 "Failed getting veb bw config, err %d aq_err %s\n",
+			 ret,
 			 i40e_aq_str(&pf->hw, pf->hw.aq.asq_last_status));
 	}
 
@@ -6821,8 +6821,8 @@  static int i40e_resume_port_tx(struct i40e_pf *pf)
 	ret = i40e_aq_resume_port_tx(hw, NULL);
 	if (ret) {
 		dev_info(&pf->pdev->dev,
-			 "Resume Port Tx failed, err %s aq_err %s\n",
-			  i40e_stat_str(&pf->hw, ret),
+			 "Resume Port Tx failed, err %d aq_err %s\n",
+			  ret,
 			  i40e_aq_str(&pf->hw, pf->hw.aq.asq_last_status));
 		/* Schedule PF reset to recover */
 		set_bit(__I40E_PF_RESET_REQUESTED, pf->state);
@@ -6846,8 +6846,8 @@  static int i40e_suspend_port_tx(struct i40e_pf *pf)
 	ret = i40e_aq_suspend_port_tx(hw, pf->mac_seid, NULL);
 	if (ret) {
 		dev_info(&pf->pdev->dev,
-			 "Suspend Port Tx failed, err %s aq_err %s\n",
-			 i40e_stat_str(&pf->hw, ret),
+			 "Suspend Port Tx failed, err %d aq_err %s\n",
+			 ret,
 			 i40e_aq_str(&pf->hw, pf->hw.aq.asq_last_status));
 		/* Schedule PF reset to recover */
 		set_bit(__I40E_PF_RESET_REQUESTED, pf->state);
@@ -6886,8 +6886,8 @@  static int i40e_hw_set_dcb_config(struct i40e_pf *pf,
 	ret = i40e_set_dcb_config(&pf->hw);
 	if (ret) {
 		dev_info(&pf->pdev->dev,
-			 "Set DCB Config failed, err %s aq_err %s\n",
-			 i40e_stat_str(&pf->hw, ret),
+			 "Set DCB Config failed, err %d aq_err %s\n",
+			 ret,
 			 i40e_aq_str(&pf->hw, pf->hw.aq.asq_last_status));
 		goto out;
 	}
@@ -7003,8 +7003,8 @@  int i40e_hw_dcb_config(struct i40e_pf *pf, struct i40e_dcbx_config *new_cfg)
 		 i40e_aqc_opc_modify_switching_comp_ets, NULL);
 	if (ret) {
 		dev_info(&pf->pdev->dev,
-			 "Modify Port ETS failed, err %s aq_err %s\n",
-			 i40e_stat_str(&pf->hw, ret),
+			 "Modify Port ETS failed, err %d aq_err %s\n",
+			 ret,
 			 i40e_aq_str(&pf->hw, pf->hw.aq.asq_last_status));
 		goto out;
 	}
@@ -7041,8 +7041,8 @@  int i40e_hw_dcb_config(struct i40e_pf *pf, struct i40e_dcbx_config *new_cfg)
 	ret = i40e_aq_dcb_updated(&pf->hw, NULL);
 	if (ret) {
 		dev_info(&pf->pdev->dev,
-			 "DCB Updated failed, err %s aq_err %s\n",
-			 i40e_stat_str(&pf->hw, ret),
+			 "DCB Updated failed, err %d aq_err %s\n",
+			 ret,
 			 i40e_aq_str(&pf->hw, pf->hw.aq.asq_last_status));
 		goto out;
 	}
@@ -7125,8 +7125,8 @@  int i40e_dcb_sw_default_config(struct i40e_pf *pf)
 		 i40e_aqc_opc_enable_switching_comp_ets, NULL);
 	if (err) {
 		dev_info(&pf->pdev->dev,
-			 "Enable Port ETS failed, err %s aq_err %s\n",
-			 i40e_stat_str(&pf->hw, err),
+			 "Enable Port ETS failed, err %d aq_err %s\n",
+			 err,
 			 i40e_aq_str(&pf->hw, pf->hw.aq.asq_last_status));
 		err = -ENOENT;
 		goto out;
@@ -7205,8 +7205,8 @@  static int i40e_init_pf_dcb(struct i40e_pf *pf)
 		pf->flags |= I40E_FLAG_DISABLE_FW_LLDP;
 	} else {
 		dev_info(&pf->pdev->dev,
-			 "Query for DCB configuration failed, err %s aq_err %s\n",
-			 i40e_stat_str(&pf->hw, err),
+			 "Query for DCB configuration failed, err %d aq_err %s\n",
+			 err,
 			 i40e_aq_str(&pf->hw, pf->hw.aq.asq_last_status));
 	}
 
@@ -7444,8 +7444,8 @@  static i40e_status i40e_force_link_state(struct i40e_pf *pf, bool is_up)
 					   NULL);
 	if (err) {
 		dev_err(&pf->pdev->dev,
-			"failed to get phy cap., ret =  %s last_status =  %s\n",
-			i40e_stat_str(hw, err),
+			"failed to get phy cap., ret =  %d last_status =  %s\n",
+			err,
 			i40e_aq_str(hw, hw->aq.asq_last_status));
 		return err;
 	}
@@ -7456,8 +7456,8 @@  static i40e_status i40e_force_link_state(struct i40e_pf *pf, bool is_up)
 					   NULL);
 	if (err) {
 		dev_err(&pf->pdev->dev,
-			"failed to get phy cap., ret =  %s last_status =  %s\n",
-			i40e_stat_str(hw, err),
+			"failed to get phy cap., ret =  %d last_status =  %s\n",
+			err,
 			i40e_aq_str(hw, hw->aq.asq_last_status));
 		return err;
 	}
@@ -7501,8 +7501,8 @@  static i40e_status i40e_force_link_state(struct i40e_pf *pf, bool is_up)
 
 	if (err) {
 		dev_err(&pf->pdev->dev,
-			"set phy config ret =  %s last_status =  %s\n",
-			i40e_stat_str(&pf->hw, err),
+			"set phy config ret =  %d last_status =  %s\n",
+			err,
 			i40e_aq_str(&pf->hw, pf->hw.aq.asq_last_status));
 		return err;
 	}
@@ -7842,8 +7842,8 @@  static int i40e_fwd_ring_up(struct i40e_vsi *vsi, struct net_device *vdev,
 			rx_ring->netdev = NULL;
 		}
 		dev_info(&pf->pdev->dev,
-			 "Error adding mac filter on macvlan err %s, aq_err %s\n",
-			  i40e_stat_str(hw, ret),
+			 "Error adding mac filter on macvlan err %d, aq_err %s\n",
+			  ret,
 			  i40e_aq_str(hw, aq_err));
 		netdev_err(vdev, "L2fwd offload disabled to L2 filter error\n");
 	}
@@ -7915,8 +7915,8 @@  static int i40e_setup_macvlans(struct i40e_vsi *vsi, u16 macvlan_cnt, u16 qcnt,
 	ret = i40e_aq_update_vsi_params(hw, &ctxt, NULL);
 	if (ret) {
 		dev_info(&pf->pdev->dev,
-			 "Update vsi tc config failed, err %s aq_err %s\n",
-			 i40e_stat_str(hw, ret),
+			 "Update vsi tc config failed, err %d aq_err %s\n",
+			 ret,
 			 i40e_aq_str(hw, hw->aq.asq_last_status));
 		return ret;
 	}
@@ -8131,8 +8131,8 @@  static void i40e_fwd_del(struct net_device *netdev, void *vdev)
 				ch->fwd = NULL;
 			} else {
 				dev_info(&pf->pdev->dev,
-					 "Error deleting mac filter on macvlan err %s, aq_err %s\n",
-					  i40e_stat_str(hw, ret),
+					 "Error deleting mac filter on macvlan err %d, aq_err %s\n",
+					  ret,
 					  i40e_aq_str(hw, aq_err));
 			}
 			break;
@@ -8883,8 +8883,7 @@  static int i40e_delete_clsflower(struct i40e_vsi *vsi,
 	kfree(filter);
 	if (err) {
 		dev_err(&pf->pdev->dev,
-			"Failed to delete cloud filter, err %s\n",
-			i40e_stat_str(&pf->hw, err));
+			"Failed to delete cloud filter, err %d\n", err);
 		return i40e_aq_rc_to_posix(err, pf->hw.aq.asq_last_status);
 	}
 
@@ -9446,8 +9445,8 @@  static int i40e_handle_lldp_event(struct i40e_pf *pf,
 			pf->flags &= ~I40E_FLAG_DCB_CAPABLE;
 		} else {
 			dev_info(&pf->pdev->dev,
-				 "Failed querying DCB configuration data from firmware, err %s aq_err %s\n",
-				 i40e_stat_str(&pf->hw, ret),
+				 "Failed querying DCB configuration data from firmware, err %d aq_err %s\n",
+				 ret,
 				 i40e_aq_str(&pf->hw,
 					     pf->hw.aq.asq_last_status));
 		}
@@ -10273,8 +10272,8 @@  static void i40e_enable_pf_switch_lb(struct i40e_pf *pf)
 	ret = i40e_aq_get_vsi_params(&pf->hw, &ctxt, NULL);
 	if (ret) {
 		dev_info(&pf->pdev->dev,
-			 "couldn't get PF vsi config, err %s aq_err %s\n",
-			 i40e_stat_str(&pf->hw, ret),
+			 "couldn't get PF vsi config, err %d aq_err %s\n",
+			 ret,
 			 i40e_aq_str(&pf->hw, pf->hw.aq.asq_last_status));
 		return;
 	}
@@ -10285,8 +10284,8 @@  static void i40e_enable_pf_switch_lb(struct i40e_pf *pf)
 	ret = i40e_aq_update_vsi_params(&vsi->back->hw, &ctxt, NULL);
 	if (ret) {
 		dev_info(&pf->pdev->dev,
-			 "update vsi switch failed, err %s aq_err %s\n",
-			 i40e_stat_str(&pf->hw, ret),
+			 "update vsi switch failed, err %d aq_err %s\n",
+			 ret,
 			 i40e_aq_str(&pf->hw, pf->hw.aq.asq_last_status));
 	}
 }
@@ -10309,8 +10308,8 @@  static void i40e_disable_pf_switch_lb(struct i40e_pf *pf)
 	ret = i40e_aq_get_vsi_params(&pf->hw, &ctxt, NULL);
 	if (ret) {
 		dev_info(&pf->pdev->dev,
-			 "couldn't get PF vsi config, err %s aq_err %s\n",
-			 i40e_stat_str(&pf->hw, ret),
+			 "couldn't get PF vsi config, err %d aq_err %s\n",
+			 ret,
 			 i40e_aq_str(&pf->hw, pf->hw.aq.asq_last_status));
 		return;
 	}
@@ -10321,8 +10320,8 @@  static void i40e_disable_pf_switch_lb(struct i40e_pf *pf)
 	ret = i40e_aq_update_vsi_params(&vsi->back->hw, &ctxt, NULL);
 	if (ret) {
 		dev_info(&pf->pdev->dev,
-			 "update vsi switch failed, err %s aq_err %s\n",
-			 i40e_stat_str(&pf->hw, ret),
+			 "update vsi switch failed, err %d aq_err %s\n",
+			 ret,
 			 i40e_aq_str(&pf->hw, pf->hw.aq.asq_last_status));
 	}
 }
@@ -10466,8 +10465,8 @@  static int i40e_get_capabilities(struct i40e_pf *pf,
 			buf_len = data_size;
 		} else if (pf->hw.aq.asq_last_status != I40E_AQ_RC_OK || err) {
 			dev_info(&pf->pdev->dev,
-				 "capability discovery failed, err %s aq_err %s\n",
-				 i40e_stat_str(&pf->hw, err),
+				 "capability discovery failed, err %d aq_err %s\n",
+				 err,
 				 i40e_aq_str(&pf->hw,
 					     pf->hw.aq.asq_last_status));
 			return -ENODEV;
@@ -10604,8 +10603,8 @@  static int i40e_rebuild_cloud_filters(struct i40e_vsi *vsi, u16 seid)
 
 		if (ret) {
 			dev_dbg(&pf->pdev->dev,
-				"Failed to rebuild cloud filter, err %s aq_err %s\n",
-				i40e_stat_str(&pf->hw, ret),
+				"Failed to rebuild cloud filter, err %d aq_err %s\n",
+				ret,
 				i40e_aq_str(&pf->hw,
 					    pf->hw.aq.asq_last_status));
 			return ret;
@@ -10845,8 +10844,8 @@  static void i40e_rebuild(struct i40e_pf *pf, bool reinit, bool lock_acquired)
 	/* rebuild the basics for the AdminQ, HMC, and initial HW switch */
 	ret = i40e_init_adminq(&pf->hw);
 	if (ret) {
-		dev_info(&pf->pdev->dev, "Rebuild AdminQ failed, err %s aq_err %s\n",
-			 i40e_stat_str(&pf->hw, ret),
+		dev_info(&pf->pdev->dev, "Rebuild AdminQ failed, err %d aq_err %s\n",
+			 ret,
 			 i40e_aq_str(&pf->hw, pf->hw.aq.asq_last_status));
 		goto clear_recovery;
 	}
@@ -10957,8 +10956,8 @@  static void i40e_rebuild(struct i40e_pf *pf, bool reinit, bool lock_acquired)
 					 I40E_AQ_EVENT_MEDIA_NA |
 					 I40E_AQ_EVENT_MODULE_QUAL_FAIL), NULL);
 	if (ret)
-		dev_info(&pf->pdev->dev, "set phy mask fail, err %s aq_err %s\n",
-			 i40e_stat_str(&pf->hw, ret),
+		dev_info(&pf->pdev->dev, "set phy mask fail, err %d aq_err %s\n",
+			 ret,
 			 i40e_aq_str(&pf->hw, pf->hw.aq.asq_last_status));
 
 	/* Rebuild the VSIs and VEBs that existed before reset.
@@ -11061,8 +11060,8 @@  static void i40e_rebuild(struct i40e_pf *pf, bool reinit, bool lock_acquired)
 		msleep(75);
 		ret = i40e_aq_set_link_restart_an(&pf->hw, true, NULL);
 		if (ret)
-			dev_info(&pf->pdev->dev, "link restart failed, err %s aq_err %s\n",
-				 i40e_stat_str(&pf->hw, ret),
+			dev_info(&pf->pdev->dev, "link restart failed, err %d aq_err %s\n",
+				 ret,
 				 i40e_aq_str(&pf->hw,
 					     pf->hw.aq.asq_last_status));
 	}
@@ -11090,9 +11089,9 @@  static void i40e_rebuild(struct i40e_pf *pf, bool reinit, bool lock_acquired)
 	ret = i40e_set_promiscuous(pf, pf->cur_promisc);
 	if (ret)
 		dev_warn(&pf->pdev->dev,
-			 "Failed to restore promiscuous setting: %s, err %s aq_err %s\n",
+			 "Failed to restore promiscuous setting: %s, err %d aq_err %s\n",
 			 pf->cur_promisc ? "on" : "off",
-			 i40e_stat_str(&pf->hw, ret),
+			 ret,
 			 i40e_aq_str(&pf->hw, pf->hw.aq.asq_last_status));
 
 	i40e_reset_all_vfs(pf, true);
@@ -12226,8 +12225,8 @@  static int i40e_get_rss_aq(struct i40e_vsi *vsi, const u8 *seed,
 			(struct i40e_aqc_get_set_rss_key_data *)seed);
 		if (ret) {
 			dev_info(&pf->pdev->dev,
-				 "Cannot get RSS key, err %s aq_err %s\n",
-				 i40e_stat_str(&pf->hw, ret),
+				 "Cannot get RSS key, err %d aq_err %s\n",
+				 ret,
 				 i40e_aq_str(&pf->hw,
 					     pf->hw.aq.asq_last_status));
 			return ret;
@@ -12240,8 +12239,8 @@  static int i40e_get_rss_aq(struct i40e_vsi *vsi, const u8 *seed,
 		ret = i40e_aq_get_rss_lut(hw, vsi->id, pf_lut, lut, lut_size);
 		if (ret) {
 			dev_info(&pf->pdev->dev,
-				 "Cannot get RSS lut, err %s aq_err %s\n",
-				 i40e_stat_str(&pf->hw, ret),
+				 "Cannot get RSS lut, err %d aq_err %s\n",
+				 ret,
 				 i40e_aq_str(&pf->hw,
 					     pf->hw.aq.asq_last_status));
 			return ret;
@@ -12581,8 +12580,8 @@  i40e_status i40e_commit_partition_bw_setting(struct i40e_pf *pf)
 	last_aq_status = pf->hw.aq.asq_last_status;
 	if (ret) {
 		dev_info(&pf->pdev->dev,
-			 "Cannot acquire NVM for read access, err %s aq_err %s\n",
-			 i40e_stat_str(&pf->hw, ret),
+			 "Cannot acquire NVM for read access, err %d aq_err %s\n",
+			 ret,
 			 i40e_aq_str(&pf->hw, last_aq_status));
 		goto bw_commit_out;
 	}
@@ -12598,8 +12597,8 @@  i40e_status i40e_commit_partition_bw_setting(struct i40e_pf *pf)
 	last_aq_status = pf->hw.aq.asq_last_status;
 	i40e_release_nvm(&pf->hw);
 	if (ret) {
-		dev_info(&pf->pdev->dev, "NVM read error, err %s aq_err %s\n",
-			 i40e_stat_str(&pf->hw, ret),
+		dev_info(&pf->pdev->dev, "NVM read error, err %d aq_err %s\n",
+			 ret,
 			 i40e_aq_str(&pf->hw, last_aq_status));
 		goto bw_commit_out;
 	}
@@ -12612,8 +12611,8 @@  i40e_status i40e_commit_partition_bw_setting(struct i40e_pf *pf)
 	last_aq_status = pf->hw.aq.asq_last_status;
 	if (ret) {
 		dev_info(&pf->pdev->dev,
-			 "Cannot acquire NVM for write access, err %s aq_err %s\n",
-			 i40e_stat_str(&pf->hw, ret),
+			 "Cannot acquire NVM for write access, err %d aq_err %s\n",
+			 ret,
 			 i40e_aq_str(&pf->hw, last_aq_status));
 		goto bw_commit_out;
 	}
@@ -12632,8 +12631,8 @@  i40e_status i40e_commit_partition_bw_setting(struct i40e_pf *pf)
 	i40e_release_nvm(&pf->hw);
 	if (ret)
 		dev_info(&pf->pdev->dev,
-			 "BW settings NOT SAVED, err %s aq_err %s\n",
-			 i40e_stat_str(&pf->hw, ret),
+			 "BW settings NOT SAVED, err %d aq_err %s\n",
+			 ret,
 			 i40e_aq_str(&pf->hw, last_aq_status));
 bw_commit_out:
 
@@ -12687,8 +12686,8 @@  static bool i40e_is_total_port_shutdown_enabled(struct i40e_pf *pf)
 
 err_nvm:
 	dev_warn(&pf->pdev->dev,
-		 "total-port-shutdown feature is off due to read nvm error: %s\n",
-		 i40e_stat_str(&pf->hw, read_status));
+		 "total-port-shutdown feature is off due to read nvm error: %d\n",
+		 read_status);
 	return ret;
 }
 
@@ -13044,8 +13043,8 @@  static int i40e_udp_tunnel_set_port(struct net_device *netdev,
 	ret = i40e_aq_add_udp_tunnel(hw, ntohs(ti->port), type, &filter_index,
 				     NULL);
 	if (ret) {
-		netdev_info(netdev, "add UDP port failed, err %s aq_err %s\n",
-			    i40e_stat_str(hw, ret),
+		netdev_info(netdev, "add UDP port failed, err %d aq_err %s\n",
+			    ret,
 			    i40e_aq_str(hw, hw->aq.asq_last_status));
 		return -EIO;
 	}
@@ -13064,8 +13063,8 @@  static int i40e_udp_tunnel_unset_port(struct net_device *netdev,
 
 	ret = i40e_aq_del_udp_tunnel(hw, ti->hw_priv, NULL);
 	if (ret) {
-		netdev_info(netdev, "delete UDP port failed, err %s aq_err %s\n",
-			    i40e_stat_str(hw, ret),
+		netdev_info(netdev, "delete UDP port failed, err %d aq_err %s\n",
+			    ret,
 			    i40e_aq_str(hw, hw->aq.asq_last_status));
 		return -EIO;
 	}
@@ -14000,8 +13999,8 @@  i40e_status i40e_configure_source_pruning(struct i40e_vsi *vsi, bool enable)
 	ret = i40e_aq_get_vsi_params(hw, &ctxt, NULL);
 	if (ret) {
 		dev_info(&pf->pdev->dev,
-			 "couldn't get vsi config, err %s\n",
-			 i40e_stat_str(hw, ret));
+			 "couldn't get vsi config, err %d\n",
+			 ret);
 		return ret;
 	}
 
@@ -14020,8 +14019,8 @@  i40e_status i40e_configure_source_pruning(struct i40e_vsi *vsi, bool enable)
 	ret = i40e_aq_update_vsi_params(&pf->hw, &ctxt, NULL);
 	if (ret)
 		dev_err(&pf->pdev->dev,
-			"Update VSI failed, err %s\n",
-			i40e_stat_str(&pf->hw, ret));
+			"Update VSI failed, err %d\n",
+			ret);
 	return ret;
 }
 
@@ -14060,8 +14059,8 @@  static int i40e_add_vsi(struct i40e_vsi *vsi)
 		ctxt.flags = I40E_AQ_VSI_TYPE_PF;
 		if (ret) {
 			dev_info(&pf->pdev->dev,
-				 "couldn't get PF vsi config, err %s aq_err %s\n",
-				 i40e_stat_str(&pf->hw, ret),
+				 "couldn't get PF vsi config, err %d aq_err %s\n",
+				 ret,
 				 i40e_aq_str(&pf->hw,
 					     pf->hw.aq.asq_last_status));
 			return -ENOENT;
@@ -14081,6 +14080,7 @@  static int i40e_add_vsi(struct i40e_vsi *vsi)
 		if (pf->flags & I40E_FLAG_SOURCE_PRUNING_DISABLED) {
 			ret = i40e_configure_source_pruning(vsi, false);
 			if (ret)
+				ret = -ENOENT;
 				goto err;
 		}
 
@@ -14095,8 +14095,8 @@  static int i40e_add_vsi(struct i40e_vsi *vsi)
 			ret = i40e_aq_update_vsi_params(hw, &ctxt, NULL);
 			if (ret) {
 				dev_info(&pf->pdev->dev,
-					 "update vsi failed, err %s aq_err %s\n",
-					 i40e_stat_str(&pf->hw, ret),
+					 "update vsi failed, err %d aq_err %s\n",
+					 ret,
 					 i40e_aq_str(&pf->hw,
 						    pf->hw.aq.asq_last_status));
 				ret = -ENOENT;
@@ -14118,9 +14118,9 @@  static int i40e_add_vsi(struct i40e_vsi *vsi)
 				 * message and continue
 				 */
 				dev_info(&pf->pdev->dev,
-					 "failed to configure TCs for main VSI tc_map 0x%08x, err %s aq_err %s\n",
+					 "failed to configure TCs for main VSI tc_map 0x%08x, err %d aq_err %s\n",
 					 enabled_tc,
-					 i40e_stat_str(&pf->hw, ret),
+					 ret,
 					 i40e_aq_str(&pf->hw,
 						    pf->hw.aq.asq_last_status));
 			}
@@ -14214,8 +14214,8 @@  static int i40e_add_vsi(struct i40e_vsi *vsi)
 		ret = i40e_aq_add_vsi(hw, &ctxt, NULL);
 		if (ret) {
 			dev_info(&vsi->back->pdev->dev,
-				 "add vsi failed, err %s aq_err %s\n",
-				 i40e_stat_str(&pf->hw, ret),
+				 "add vsi failed, err %d aq_err %s\n",
+				 ret,
 				 i40e_aq_str(&pf->hw,
 					     pf->hw.aq.asq_last_status));
 			ret = -ENOENT;
@@ -14246,8 +14246,8 @@  static int i40e_add_vsi(struct i40e_vsi *vsi)
 	ret = i40e_vsi_get_bw_info(vsi);
 	if (ret) {
 		dev_info(&pf->pdev->dev,
-			 "couldn't get vsi bw info, err %s aq_err %s\n",
-			 i40e_stat_str(&pf->hw, ret),
+			 "couldn't get vsi bw info, err %d aq_err %s\n",
+			 ret,
 			 i40e_aq_str(&pf->hw, pf->hw.aq.asq_last_status));
 		/* VSI is already added so not tearing that up */
 		ret = 0;
@@ -14696,8 +14696,8 @@  static int i40e_veb_get_bw_info(struct i40e_veb *veb)
 						  &bw_data, NULL);
 	if (ret) {
 		dev_info(&pf->pdev->dev,
-			 "query veb bw config failed, err %s aq_err %s\n",
-			 i40e_stat_str(&pf->hw, ret),
+			 "query veb bw config failed, err %d aq_err %s\n",
+			 ret,
 			 i40e_aq_str(&pf->hw, hw->aq.asq_last_status));
 		goto out;
 	}
@@ -14706,8 +14706,8 @@  static int i40e_veb_get_bw_info(struct i40e_veb *veb)
 						   &ets_data, NULL);
 	if (ret) {
 		dev_info(&pf->pdev->dev,
-			 "query veb bw ets config failed, err %s aq_err %s\n",
-			 i40e_stat_str(&pf->hw, ret),
+			 "query veb bw ets config failed, err %d aq_err %s\n",
+			 ret,
 			 i40e_aq_str(&pf->hw, hw->aq.asq_last_status));
 		goto out;
 	}
@@ -14903,8 +14903,8 @@  static int i40e_add_veb(struct i40e_veb *veb, struct i40e_vsi *vsi)
 	/* get a VEB from the hardware */
 	if (ret) {
 		dev_info(&pf->pdev->dev,
-			 "couldn't add VEB, err %s aq_err %s\n",
-			 i40e_stat_str(&pf->hw, ret),
+			 "couldn't add VEB, err %d aq_err %s\n",
+			 ret,
 			 i40e_aq_str(&pf->hw, pf->hw.aq.asq_last_status));
 		return -EPERM;
 	}
@@ -14914,16 +14914,16 @@  static int i40e_add_veb(struct i40e_veb *veb, struct i40e_vsi *vsi)
 					 &veb->stats_idx, NULL, NULL, NULL);
 	if (ret) {
 		dev_info(&pf->pdev->dev,
-			 "couldn't get VEB statistics idx, err %s aq_err %s\n",
-			 i40e_stat_str(&pf->hw, ret),
+			 "couldn't get VEB statistics idx, err %d aq_err %s\n",
+			 ret,
 			 i40e_aq_str(&pf->hw, pf->hw.aq.asq_last_status));
 		return -EPERM;
 	}
 	ret = i40e_veb_get_bw_info(veb);
 	if (ret) {
 		dev_info(&pf->pdev->dev,
-			 "couldn't get VEB bw info, err %s aq_err %s\n",
-			 i40e_stat_str(&pf->hw, ret),
+			 "couldn't get VEB bw info, err %d aq_err %s\n",
+			 ret,
 			 i40e_aq_str(&pf->hw, pf->hw.aq.asq_last_status));
 		i40e_aq_delete_element(&pf->hw, veb->seid, NULL);
 		return -ENOENT;
@@ -15133,8 +15133,8 @@  int i40e_fetch_switch_configuration(struct i40e_pf *pf, bool printconfig)
 						&next_seid, NULL);
 		if (ret) {
 			dev_info(&pf->pdev->dev,
-				 "get switch config failed err %s aq_err %s\n",
-				 i40e_stat_str(&pf->hw, ret),
+				 "get switch config failed err %d aq_err %s\n",
+				 ret,
 				 i40e_aq_str(&pf->hw,
 					     pf->hw.aq.asq_last_status));
 			kfree(aq_buf);
@@ -15179,8 +15179,8 @@  static int i40e_setup_pf_switch(struct i40e_pf *pf, bool reinit, bool lock_acqui
 	ret = i40e_fetch_switch_configuration(pf, false);
 	if (ret) {
 		dev_info(&pf->pdev->dev,
-			 "couldn't fetch switch config, err %s aq_err %s\n",
-			 i40e_stat_str(&pf->hw, ret),
+			 "couldn't fetch switch config, err %d aq_err %s\n",
+			 ret,
 			 i40e_aq_str(&pf->hw, pf->hw.aq.asq_last_status));
 		return ret;
 	}
@@ -15206,8 +15206,8 @@  static int i40e_setup_pf_switch(struct i40e_pf *pf, bool reinit, bool lock_acqui
 						NULL);
 		if (ret && pf->hw.aq.asq_last_status != I40E_AQ_RC_ESRCH) {
 			dev_info(&pf->pdev->dev,
-				 "couldn't set switch config bits, err %s aq_err %s\n",
-				 i40e_stat_str(&pf->hw, ret),
+				 "couldn't set switch config bits, err %d aq_err %s\n",
+				 ret,
 				 i40e_aq_str(&pf->hw,
 					     pf->hw.aq.asq_last_status));
 			/* not a fatal problem, just keep going */
@@ -16112,8 +16112,8 @@  static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 					 I40E_AQ_EVENT_MEDIA_NA |
 					 I40E_AQ_EVENT_MODULE_QUAL_FAIL), NULL);
 	if (err)
-		dev_info(&pf->pdev->dev, "set phy mask fail, err %s aq_err %s\n",
-			 i40e_stat_str(&pf->hw, err),
+		dev_info(&pf->pdev->dev, "set phy mask fail, err %d aq_err %s\n",
+			 err,
 			 i40e_aq_str(&pf->hw, pf->hw.aq.asq_last_status));
 
 	/* Reconfigure hardware for allowing smaller MSS in the case
@@ -16131,8 +16131,8 @@  static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 		msleep(75);
 		err = i40e_aq_set_link_restart_an(&pf->hw, true, NULL);
 		if (err)
-			dev_info(&pf->pdev->dev, "link restart failed, err %s aq_err %s\n",
-				 i40e_stat_str(&pf->hw, err),
+			dev_info(&pf->pdev->dev, "link restart failed, err %d aq_err %s\n",
+				 err,
 				 i40e_aq_str(&pf->hw,
 					     pf->hw.aq.asq_last_status));
 	}
@@ -16264,8 +16264,8 @@  static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 	/* get the requested speeds from the fw */
 	err = i40e_aq_get_phy_capabilities(hw, false, false, &abilities, NULL);
 	if (err)
-		dev_dbg(&pf->pdev->dev, "get requested speeds ret =  %s last_status =  %s\n",
-			i40e_stat_str(&pf->hw, err),
+		dev_dbg(&pf->pdev->dev, "get requested speeds ret =  %d last_status =  %s\n",
+			err,
 			i40e_aq_str(&pf->hw, pf->hw.aq.asq_last_status));
 	pf->hw.phy.link_info.requested_speeds = abilities.link_speed;
 
@@ -16275,8 +16275,8 @@  static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 	/* get the supported phy types from the fw */
 	err = i40e_aq_get_phy_capabilities(hw, false, true, &abilities, NULL);
 	if (err)
-		dev_dbg(&pf->pdev->dev, "get supported phy types ret =  %s last_status =  %s\n",
-			i40e_stat_str(&pf->hw, err),
+		dev_dbg(&pf->pdev->dev, "get supported phy types ret =  %d last_status =  %s\n",
+			err,
 			i40e_aq_str(&pf->hw, pf->hw.aq.asq_last_status));
 
 	/* make sure the MFS hasn't been set lower than the default */
diff --git a/drivers/net/ethernet/intel/i40e/i40e_nvm.c b/drivers/net/ethernet/intel/i40e/i40e_nvm.c
index 3a38bf8bcde7..c24348afc2f5 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_nvm.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_nvm.c
@@ -1429,8 +1429,8 @@  static i40e_status i40e_nvmupd_exec_aq(struct i40e_hw *hw,
 				       buff_size, &cmd_details);
 	if (status) {
 		i40e_debug(hw, I40E_DEBUG_NVM,
-			   "i40e_nvmupd_exec_aq err %s aq_err %s\n",
-			   i40e_stat_str(hw, status),
+			   "%s err %d aq_err %s\n",
+			   __func__, status,
 			   i40e_aq_str(hw, hw->aq.asq_last_status));
 		*perrno = i40e_aq_rc_to_posix(status, hw->aq.asq_last_status);
 		return status;
diff --git a/drivers/net/ethernet/intel/i40e/i40e_prototype.h b/drivers/net/ethernet/intel/i40e/i40e_prototype.h
index 9a71121420c3..01ab63d28e3f 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_prototype.h
+++ b/drivers/net/ethernet/intel/i40e/i40e_prototype.h
@@ -55,7 +55,6 @@  void i40e_idle_aq(struct i40e_hw *hw);
 bool i40e_check_asq_alive(struct i40e_hw *hw);
 i40e_status i40e_aq_queue_shutdown(struct i40e_hw *hw, bool unloading);
 const char *i40e_aq_str(struct i40e_hw *hw, enum i40e_admin_queue_err aq_err);
-const char *i40e_stat_str(struct i40e_hw *hw, i40e_status stat_err);
 
 i40e_status i40e_aq_get_rss_lut(struct i40e_hw *hw, u16 seid,
 				bool pf_lut, u8 *lut, u16 lut_size);
diff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
index c2141f0c9adb..ec37b78b79ba 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
@@ -1323,9 +1323,9 @@  i40e_set_vsi_promisc(struct i40e_vf *vf, u16 seid, bool multi_enable,
 			int aq_err = pf->hw.aq.asq_last_status;
 
 			dev_err(&pf->pdev->dev,
-				"VF %d failed to set multicast promiscuous mode err %s aq_err %s\n",
+				"VF %d failed to set multicast promiscuous mode err %d aq_err %s\n",
 				vf->vf_id,
-				i40e_stat_str(&pf->hw, aq_ret),
+				aq_ret,
 				i40e_aq_str(&pf->hw, aq_err));
 
 			return aq_ret;
@@ -1339,9 +1339,9 @@  i40e_set_vsi_promisc(struct i40e_vf *vf, u16 seid, bool multi_enable,
 			int aq_err = pf->hw.aq.asq_last_status;
 
 			dev_err(&pf->pdev->dev,
-				"VF %d failed to set unicast promiscuous mode err %s aq_err %s\n",
+				"VF %d failed to set unicast promiscuous mode err %d aq_err %s\n",
 				vf->vf_id,
-				i40e_stat_str(&pf->hw, aq_ret),
+				aq_ret,
 				i40e_aq_str(&pf->hw, aq_err));
 		}
 
@@ -1356,9 +1356,9 @@  i40e_set_vsi_promisc(struct i40e_vf *vf, u16 seid, bool multi_enable,
 			int aq_err = pf->hw.aq.asq_last_status;
 
 			dev_err(&pf->pdev->dev,
-				"VF %d failed to set multicast promiscuous mode err %s aq_err %s\n",
+				"VF %d failed to set multicast promiscuous mode err %d aq_err %s\n",
 				vf->vf_id,
-				i40e_stat_str(&pf->hw, aq_ret),
+				aq_ret,
 				i40e_aq_str(&pf->hw, aq_err));
 
 			if (!aq_tmp)
@@ -1372,9 +1372,9 @@  i40e_set_vsi_promisc(struct i40e_vf *vf, u16 seid, bool multi_enable,
 			int aq_err = pf->hw.aq.asq_last_status;
 
 			dev_err(&pf->pdev->dev,
-				"VF %d failed to set unicast promiscuous mode err %s aq_err %s\n",
+				"VF %d failed to set unicast promiscuous mode err %d aq_err %s\n",
 				vf->vf_id,
-				i40e_stat_str(&pf->hw, aq_ret),
+				aq_ret,
 				i40e_aq_str(&pf->hw, aq_err));
 
 			if (!aq_tmp)
@@ -3676,8 +3676,8 @@  static void i40e_del_all_cloud_filters(struct i40e_vf *vf)
 			ret = i40e_add_del_cloud_filter(vsi, cfilter, false);
 		if (ret)
 			dev_err(&pf->pdev->dev,
-				"VF %d: Failed to delete cloud filter, err %s aq_err %s\n",
-				vf->vf_id, i40e_stat_str(&pf->hw, ret),
+				"VF %d: Failed to delete cloud filter, err %d aq_err %s\n",
+				vf->vf_id, ret,
 				i40e_aq_str(&pf->hw,
 					    pf->hw.aq.asq_last_status));
 
@@ -3779,8 +3779,8 @@  static int i40e_vc_del_cloud_filter(struct i40e_vf *vf, u8 *msg)
 		ret = i40e_add_del_cloud_filter(vsi, &cfilter, false);
 	if (ret) {
 		dev_err(&pf->pdev->dev,
-			"VF %d: Failed to delete cloud filter, err %s aq_err %s\n",
-			vf->vf_id, i40e_stat_str(&pf->hw, ret),
+			"VF %d: Failed to delete cloud filter, err %d aq_err %s\n",
+			vf->vf_id, ret,
 			i40e_aq_str(&pf->hw, pf->hw.aq.asq_last_status));
 		goto err;
 	}
@@ -3913,8 +3913,8 @@  static int i40e_vc_add_cloud_filter(struct i40e_vf *vf, u8 *msg)
 		ret = i40e_add_del_cloud_filter(vsi, cfilter, true);
 	if (ret) {
 		dev_err(&pf->pdev->dev,
-			"VF %d: Failed to add cloud filter, err %s aq_err %s\n",
-			vf->vf_id, i40e_stat_str(&pf->hw, ret),
+			"VF %d: Failed to add cloud filter, err %d aq_err %s\n",
+			vf->vf_id, ret,
 			i40e_aq_str(&pf->hw, pf->hw.aq.asq_last_status));
 		goto err_free;
 	}