Commit 161c4e88 authored by Edward Cree's avatar Edward Cree Committed by David S. Miller

sfc: coding style cleanups in mcdi_port_common.c

The code recently moved into this file contained a number of coding style
 issues, about which checkpatch and xmastree complained.  Fix them.
Signed-off-by: default avatarEdward Cree <ecree@solarflare.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 071445c6
...@@ -484,12 +484,12 @@ int efx_mcdi_phy_probe(struct efx_nic *efx) ...@@ -484,12 +484,12 @@ int efx_mcdi_phy_probe(struct efx_nic *efx)
if (rc != 0) if (rc != 0)
goto fail; goto fail;
/* The MC indicates that LOOPBACK_NONE is a valid loopback mode, /* The MC indicates that LOOPBACK_NONE is a valid loopback mode,
* but by convention we don't */ * but by convention we don't
*/
efx->loopback_modes &= ~(1 << LOOPBACK_NONE); efx->loopback_modes &= ~(1 << LOOPBACK_NONE);
/* Set the initial link mode */ /* Set the initial link mode */
efx_mcdi_phy_decode_link( efx_mcdi_phy_decode_link(efx, &efx->link_state,
efx, &efx->link_state,
MCDI_DWORD(outbuf, GET_LINK_OUT_LINK_SPEED), MCDI_DWORD(outbuf, GET_LINK_OUT_LINK_SPEED),
MCDI_DWORD(outbuf, GET_LINK_OUT_FLAGS), MCDI_DWORD(outbuf, GET_LINK_OUT_FLAGS),
MCDI_DWORD(outbuf, GET_LINK_OUT_FCNTL)); MCDI_DWORD(outbuf, GET_LINK_OUT_FCNTL));
...@@ -798,7 +798,7 @@ static int efx_mcdi_bist(struct efx_nic *efx, unsigned int bist_mode, ...@@ -798,7 +798,7 @@ static int efx_mcdi_bist(struct efx_nic *efx, unsigned int bist_mode,
return rc; return rc;
} }
int efx_mcdi_phy_run_tests(struct efx_nic *efx, int *results, unsigned flags) int efx_mcdi_phy_run_tests(struct efx_nic *efx, int *results, unsigned int flags)
{ {
struct efx_mcdi_phy_data *phy_cfg = efx->phy_data; struct efx_mcdi_phy_data *phy_cfg = efx->phy_data;
u32 mode; u32 mode;
...@@ -813,7 +813,8 @@ int efx_mcdi_phy_run_tests(struct efx_nic *efx, int *results, unsigned flags) ...@@ -813,7 +813,8 @@ int efx_mcdi_phy_run_tests(struct efx_nic *efx, int *results, unsigned flags)
} }
/* If we support both LONG and SHORT, then run each in response to /* If we support both LONG and SHORT, then run each in response to
* break or not. Otherwise, run the one we support */ * break or not. Otherwise, run the one we support
*/
mode = 0; mode = 0;
if (phy_cfg->flags & (1 << MC_CMD_GET_PHY_CFG_OUT_BIST_CABLE_SHORT_LBN)) { if (phy_cfg->flags & (1 << MC_CMD_GET_PHY_CFG_OUT_BIST_CABLE_SHORT_LBN)) {
if ((flags & ETH_TEST_FL_OFFLINE) && if ((flags & ETH_TEST_FL_OFFLINE) &&
...@@ -888,9 +889,9 @@ static int efx_mcdi_phy_get_module_eeprom_page(struct efx_nic *efx, ...@@ -888,9 +889,9 @@ static int efx_mcdi_phy_get_module_eeprom_page(struct efx_nic *efx,
{ {
MCDI_DECLARE_BUF(outbuf, MC_CMD_GET_PHY_MEDIA_INFO_OUT_LENMAX); MCDI_DECLARE_BUF(outbuf, MC_CMD_GET_PHY_MEDIA_INFO_OUT_LENMAX);
MCDI_DECLARE_BUF(inbuf, MC_CMD_GET_PHY_MEDIA_INFO_IN_LEN); MCDI_DECLARE_BUF(inbuf, MC_CMD_GET_PHY_MEDIA_INFO_IN_LEN);
size_t outlen;
unsigned int payload_len; unsigned int payload_len;
unsigned int to_copy; unsigned int to_copy;
size_t outlen;
int rc; int rc;
if (offset > SFP_PAGE_SIZE) if (offset > SFP_PAGE_SIZE)
...@@ -925,8 +926,8 @@ static int efx_mcdi_phy_get_module_eeprom_byte(struct efx_nic *efx, ...@@ -925,8 +926,8 @@ static int efx_mcdi_phy_get_module_eeprom_byte(struct efx_nic *efx,
unsigned int page, unsigned int page,
u8 byte) u8 byte)
{ {
int rc;
u8 data; u8 data;
int rc;
rc = efx_mcdi_phy_get_module_eeprom_page(efx, page, &data, byte, 1); rc = efx_mcdi_phy_get_module_eeprom_page(efx, page, &data, byte, 1);
if (rc == 1) if (rc == 1)
...@@ -1049,7 +1050,7 @@ int efx_mcdi_phy_get_module_info(struct efx_nic *efx, struct ethtool_modinfo *mo ...@@ -1049,7 +1050,7 @@ int efx_mcdi_phy_get_module_info(struct efx_nic *efx, struct ethtool_modinfo *mo
*/ */
diag_type = efx_mcdi_phy_diag_type(efx); diag_type = efx_mcdi_phy_diag_type(efx);
if ((sff_8472_level == 0) || if (sff_8472_level == 0 ||
(diag_type & SFF_DIAG_ADDR_CHANGE)) { (diag_type & SFF_DIAG_ADDR_CHANGE)) {
modinfo->type = ETH_MODULE_SFF_8079; modinfo->type = ETH_MODULE_SFF_8079;
modinfo->eeprom_len = ETH_MODULE_SFF_8079_LEN; modinfo->eeprom_len = ETH_MODULE_SFF_8079_LEN;
......
...@@ -53,7 +53,7 @@ int efx_mcdi_phy_get_fecparam(struct efx_nic *efx, struct ethtool_fecparam *fec) ...@@ -53,7 +53,7 @@ int efx_mcdi_phy_get_fecparam(struct efx_nic *efx, struct ethtool_fecparam *fec)
int efx_mcdi_phy_set_fecparam(struct efx_nic *efx, const struct ethtool_fecparam *fec); int efx_mcdi_phy_set_fecparam(struct efx_nic *efx, const struct ethtool_fecparam *fec);
int efx_mcdi_phy_test_alive(struct efx_nic *efx); int efx_mcdi_phy_test_alive(struct efx_nic *efx);
int efx_mcdi_port_reconfigure(struct efx_nic *efx); int efx_mcdi_port_reconfigure(struct efx_nic *efx);
int efx_mcdi_phy_run_tests(struct efx_nic *efx, int *results, unsigned flags); int efx_mcdi_phy_run_tests(struct efx_nic *efx, int *results, unsigned int flags);
const char *efx_mcdi_phy_test_name(struct efx_nic *efx, unsigned int index); const char *efx_mcdi_phy_test_name(struct efx_nic *efx, unsigned int index);
int efx_mcdi_phy_get_module_eeprom(struct efx_nic *efx, struct ethtool_eeprom *ee, u8 *data); int efx_mcdi_phy_get_module_eeprom(struct efx_nic *efx, struct ethtool_eeprom *ee, u8 *data);
int efx_mcdi_phy_get_module_info(struct efx_nic *efx, struct ethtool_modinfo *modinfo); int efx_mcdi_phy_get_module_info(struct efx_nic *efx, struct ethtool_modinfo *modinfo);
......
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