Commit 34e7aefb authored by Jon Cooper's avatar Jon Cooper Committed by David S. Miller

sfc: refactor debug-or-warnings printks

Rationalise several debug-or-warnings printks using netif_cond_dbg
 to make output more consistent.
Signed-off-by: default avatarEdward Cree <ecree@solarflare.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f617f276
...@@ -4881,8 +4881,8 @@ static int efx_ef10_filter_insert_def(struct efx_nic *efx, ...@@ -4881,8 +4881,8 @@ static int efx_ef10_filter_insert_def(struct efx_nic *efx,
rc = efx_ef10_filter_insert(efx, &spec, true); rc = efx_ef10_filter_insert(efx, &spec, true);
if (rc < 0) { if (rc < 0) {
netif_printk(efx, drv, rc == -EPERM ? KERN_DEBUG : KERN_WARNING, netif_cond_dbg(efx, drv, efx->net_dev,
efx->net_dev, rc == -EPERM, warn,
"%scast mismatch filter insert failed rc=%d\n", "%scast mismatch filter insert failed rc=%d\n",
multicast ? "Multi" : "Uni", rc); multicast ? "Multi" : "Uni", rc);
} else if (multicast) { } else if (multicast) {
......
...@@ -837,9 +837,7 @@ static int _efx_mcdi_rpc(struct efx_nic *efx, unsigned int cmd, ...@@ -837,9 +837,7 @@ static int _efx_mcdi_rpc(struct efx_nic *efx, unsigned int cmd,
outbuf, outlen, outlen_actual, outbuf, outlen, outlen_actual,
quiet, NULL, raw_rc); quiet, NULL, raw_rc);
} else { } else {
netif_printk(efx, hw, netif_cond_dbg(efx, hw, efx->net_dev, rc == -EPERM, err,
rc == -EPERM ? KERN_DEBUG : KERN_ERR,
efx->net_dev,
"MC command 0x%x failed after proxy auth rc=%d\n", "MC command 0x%x failed after proxy auth rc=%d\n",
cmd, rc); cmd, rc);
...@@ -1084,8 +1082,7 @@ void efx_mcdi_display_error(struct efx_nic *efx, unsigned cmd, ...@@ -1084,8 +1082,7 @@ void efx_mcdi_display_error(struct efx_nic *efx, unsigned cmd,
code = MCDI_DWORD(outbuf, ERR_CODE); code = MCDI_DWORD(outbuf, ERR_CODE);
if (outlen >= MC_CMD_ERR_ARG_OFST + 4) if (outlen >= MC_CMD_ERR_ARG_OFST + 4)
err_arg = MCDI_DWORD(outbuf, ERR_ARG); err_arg = MCDI_DWORD(outbuf, ERR_ARG);
netif_printk(efx, hw, rc == -EPERM ? KERN_DEBUG : KERN_ERR, netif_cond_dbg(efx, hw, efx->net_dev, rc == -EPERM, err,
efx->net_dev,
"MC command 0x%x inlen %zu failed rc=%d (raw=%d) arg=%d\n", "MC command 0x%x inlen %zu failed rc=%d (raw=%d) arg=%d\n",
cmd, inlen, rc, code, err_arg); cmd, inlen, rc, code, err_arg);
} }
...@@ -2057,8 +2054,8 @@ int efx_mcdi_get_workarounds(struct efx_nic *efx, unsigned int *impl_out, ...@@ -2057,8 +2054,8 @@ int efx_mcdi_get_workarounds(struct efx_nic *efx, unsigned int *impl_out,
/* Older firmware lacks GET_WORKAROUNDS and this isn't especially /* Older firmware lacks GET_WORKAROUNDS and this isn't especially
* terrifying. The call site will have to deal with it though. * terrifying. The call site will have to deal with it though.
*/ */
netif_printk(efx, hw, rc == -ENOSYS ? KERN_DEBUG : KERN_ERR, netif_cond_dbg(efx, hw, efx->net_dev, rc == -ENOSYS, err,
efx->net_dev, "%s: failed rc=%d\n", __func__, rc); "%s: failed rc=%d\n", __func__, rc);
return rc; return rc;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment