Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Edward Cree <ecree@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Edward Cree and committed by
David S. Miller
161c4e88 071445c6

+13 -12
+12 -11
drivers/net/ethernet/sfc/mcdi_port_common.c
··· 484 484 if (rc != 0) 485 485 goto fail; 486 486 /* The MC indicates that LOOPBACK_NONE is a valid loopback mode, 487 - * but by convention we don't */ 487 + * but by convention we don't 488 + */ 488 489 efx->loopback_modes &= ~(1 << LOOPBACK_NONE); 489 490 490 491 /* Set the initial link mode */ 491 - efx_mcdi_phy_decode_link( 492 - efx, &efx->link_state, 493 - MCDI_DWORD(outbuf, GET_LINK_OUT_LINK_SPEED), 494 - MCDI_DWORD(outbuf, GET_LINK_OUT_FLAGS), 495 - MCDI_DWORD(outbuf, GET_LINK_OUT_FCNTL)); 492 + efx_mcdi_phy_decode_link(efx, &efx->link_state, 493 + MCDI_DWORD(outbuf, GET_LINK_OUT_LINK_SPEED), 494 + MCDI_DWORD(outbuf, GET_LINK_OUT_FLAGS), 495 + MCDI_DWORD(outbuf, GET_LINK_OUT_FCNTL)); 496 496 497 497 /* Record the initial FEC configuration (or nearest approximation 498 498 * representable in the ethtool configuration space) ··· 798 798 return rc; 799 799 } 800 800 801 - int efx_mcdi_phy_run_tests(struct efx_nic *efx, int *results, unsigned flags) 801 + int efx_mcdi_phy_run_tests(struct efx_nic *efx, int *results, unsigned int flags) 802 802 { 803 803 struct efx_mcdi_phy_data *phy_cfg = efx->phy_data; 804 804 u32 mode; ··· 813 813 } 814 814 815 815 /* If we support both LONG and SHORT, then run each in response to 816 - * break or not. Otherwise, run the one we support */ 816 + * break or not. Otherwise, run the one we support 817 + */ 817 818 mode = 0; 818 819 if (phy_cfg->flags & (1 << MC_CMD_GET_PHY_CFG_OUT_BIST_CABLE_SHORT_LBN)) { 819 820 if ((flags & ETH_TEST_FL_OFFLINE) && ··· 889 888 { 890 889 MCDI_DECLARE_BUF(outbuf, MC_CMD_GET_PHY_MEDIA_INFO_OUT_LENMAX); 891 890 MCDI_DECLARE_BUF(inbuf, MC_CMD_GET_PHY_MEDIA_INFO_IN_LEN); 892 - size_t outlen; 893 891 unsigned int payload_len; 894 892 unsigned int to_copy; 893 + size_t outlen; 895 894 int rc; 896 895 897 896 if (offset > SFP_PAGE_SIZE) ··· 926 925 unsigned int page, 927 926 u8 byte) 928 927 { 929 - int rc; 930 928 u8 data; 929 + int rc; 931 930 932 931 rc = efx_mcdi_phy_get_module_eeprom_page(efx, page, &data, byte, 1); 933 932 if (rc == 1) ··· 1050 1049 */ 1051 1050 diag_type = efx_mcdi_phy_diag_type(efx); 1052 1051 1053 - if ((sff_8472_level == 0) || 1052 + if (sff_8472_level == 0 || 1054 1053 (diag_type & SFF_DIAG_ADDR_CHANGE)) { 1055 1054 modinfo->type = ETH_MODULE_SFF_8079; 1056 1055 modinfo->eeprom_len = ETH_MODULE_SFF_8079_LEN;
+1 -1
drivers/net/ethernet/sfc/mcdi_port_common.h
··· 53 53 int efx_mcdi_phy_set_fecparam(struct efx_nic *efx, const struct ethtool_fecparam *fec); 54 54 int efx_mcdi_phy_test_alive(struct efx_nic *efx); 55 55 int efx_mcdi_port_reconfigure(struct efx_nic *efx); 56 - int efx_mcdi_phy_run_tests(struct efx_nic *efx, int *results, unsigned flags); 56 + int efx_mcdi_phy_run_tests(struct efx_nic *efx, int *results, unsigned int flags); 57 57 const char *efx_mcdi_phy_test_name(struct efx_nic *efx, unsigned int index); 58 58 int efx_mcdi_phy_get_module_eeprom(struct efx_nic *efx, struct ethtool_eeprom *ee, u8 *data); 59 59 int efx_mcdi_phy_get_module_info(struct efx_nic *efx, struct ethtool_modinfo *modinfo);