summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/intel/i40e/i40e_common.c
diff options
context:
space:
mode:
authorMichal Swiatkowski <michal.swiatkowski@linux.intel.com>2025-04-25 09:08:09 +0300
committerTony Nguyen <anthony.l.nguyen@intel.com>2025-07-24 19:45:43 +0300
commit026cea3c61c2d42f47665bf8b1e2357f4bfb812d (patch)
tree7e691d59bc81c3bff82058092ee5ad8c5be260f6 /drivers/net/ethernet/intel/i40e/i40e_common.c
parent43a11306323402757101a3e97d7a5cc77352505c (diff)
downloadlinux-026cea3c61c2d42f47665bf8b1e2357f4bfb812d.tar.xz
i40e: use libie_aq_str
There is no need to store the err string in hw->err_str. Simplify it and use common helper. hw->err_str is still used for other purpouse. It should be marked that previously for unknown error the numeric value was passed as a string. Now the "LIBIE_AQ_RC_UNKNOWN" is used for such cases. Add libie_aminq module in i40e Kconfig. Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com> Reviewed-by: Larysa Zaremba <larysa.zaremba@intel.com> Signed-off-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com> Tested-by: Rinitha S <sx.rinitha@intel.com> (A Contingent worker at Intel) Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/i40e/i40e_common.c')
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e_common.c52
1 files changed, 0 insertions, 52 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e_common.c b/drivers/net/ethernet/intel/i40e/i40e_common.c
index 75074611285a..270e7e8cf9cf 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_common.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_common.c
@@ -69,58 +69,6 @@ int i40e_set_mac_type(struct i40e_hw *hw)
}
/**
- * i40e_aq_str - convert AQ err code to a string
- * @hw: pointer to the HW structure
- * @aq_err: the AQ error code to convert
- **/
-const char *i40e_aq_str(struct i40e_hw *hw, enum libie_aq_err aq_err)
-{
- switch (aq_err) {
- case LIBIE_AQ_RC_OK:
- return "OK";
- case LIBIE_AQ_RC_EPERM:
- return "LIBIE_AQ_RC_EPERM";
- case LIBIE_AQ_RC_ENOENT:
- return "LIBIE_AQ_RC_ENOENT";
- case LIBIE_AQ_RC_ESRCH:
- return "LIBIE_AQ_RC_ESRCH";
- case LIBIE_AQ_RC_EIO:
- return "LIBIE_AQ_RC_EIO";
- case LIBIE_AQ_RC_EAGAIN:
- return "LIBIE_AQ_RC_EAGAIN";
- case LIBIE_AQ_RC_ENOMEM:
- return "LIBIE_AQ_RC_ENOMEM";
- case LIBIE_AQ_RC_EACCES:
- return "LIBIE_AQ_RC_EACCES";
- case LIBIE_AQ_RC_EBUSY:
- return "LIBIE_AQ_RC_EBUSY";
- case LIBIE_AQ_RC_EEXIST:
- return "LIBIE_AQ_RC_EEXIST";
- case LIBIE_AQ_RC_EINVAL:
- return "LIBIE_AQ_RC_EINVAL";
- case LIBIE_AQ_RC_ENOSPC:
- return "LIBIE_AQ_RC_ENOSPC";
- case LIBIE_AQ_RC_ENOSYS:
- return "LIBIE_AQ_RC_ENOSYS";
- case LIBIE_AQ_RC_EMODE:
- return "LIBIE_AQ_RC_EMODE";
- case LIBIE_AQ_RC_ENOSEC:
- return "LIBIE_AQ_RC_ENOSEC";
- case LIBIE_AQ_RC_EBADSIG:
- return "LIBIE_AQ_RC_EBADSIG";
- case LIBIE_AQ_RC_ESVN:
- return "LIBIE_AQ_RC_ESVN";
- case LIBIE_AQ_RC_EBADMAN:
- return "LIBIE_AQ_RC_EBADMAN";
- case LIBIE_AQ_RC_EBADBUF:
- return "LIBIE_AQ_RC_EBADBUF";
- }
-
- snprintf(hw->err_str, sizeof(hw->err_str), "%d", aq_err);
- return hw->err_str;
-}
-
-/**
* i40e_debug_aq
* @hw: debug mask related to admin queue
* @mask: debug mask