diff options
| author | Don Skidmore <donald.c.skidmore@intel.com> | 2014-12-06 00:59:21 -0500 |
|---|---|---|
| committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2015-02-05 22:41:51 -0500 |
| commit | 7ddbde3f74c08fadb729513cf305f5f201aa1feb (patch) | |
| tree | 0f80d568f0bfd2140e66ca12876bcffabe1120b8 | |
| parent | f4a80f1ef7ba70f24d28f78706965f9871ac1d9f (diff) | |
ixgbe: cleanup sparse errors in new ixgbe_x550.c file
This patch cleans up prototypes that should have been defined
as static.
Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| -rw-r--r-- | drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c | 65 |
1 files changed, 35 insertions, 30 deletions
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c index ffdd1231f419..fcba952af6e2 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c | |||
| @@ -80,7 +80,7 @@ static s32 ixgbe_write_phy_reg_x550em(struct ixgbe_hw *hw, u32 reg_addr, | |||
| 80 | * Initializes the EEPROM parameters ixgbe_eeprom_info within the | 80 | * Initializes the EEPROM parameters ixgbe_eeprom_info within the |
| 81 | * ixgbe_hw struct in order to set up EEPROM access. | 81 | * ixgbe_hw struct in order to set up EEPROM access. |
| 82 | **/ | 82 | **/ |
| 83 | s32 ixgbe_init_eeprom_params_X550(struct ixgbe_hw *hw) | 83 | static s32 ixgbe_init_eeprom_params_X550(struct ixgbe_hw *hw) |
| 84 | { | 84 | { |
| 85 | struct ixgbe_eeprom_info *eeprom = &hw->eeprom; | 85 | struct ixgbe_eeprom_info *eeprom = &hw->eeprom; |
| 86 | u32 eec; | 86 | u32 eec; |
| @@ -110,8 +110,8 @@ s32 ixgbe_init_eeprom_params_X550(struct ixgbe_hw *hw) | |||
| 110 | * @device_type: 3 bit device type | 110 | * @device_type: 3 bit device type |
| 111 | * @phy_data: Pointer to read data from the register | 111 | * @phy_data: Pointer to read data from the register |
| 112 | **/ | 112 | **/ |
| 113 | s32 ixgbe_read_iosf_sb_reg_x550(struct ixgbe_hw *hw, u32 reg_addr, | 113 | static s32 ixgbe_read_iosf_sb_reg_x550(struct ixgbe_hw *hw, u32 reg_addr, |
| 114 | u32 device_type, u32 *data) | 114 | u32 device_type, u32 *data) |
| 115 | { | 115 | { |
| 116 | u32 i, command, error; | 116 | u32 i, command, error; |
| 117 | 117 | ||
| @@ -158,7 +158,8 @@ s32 ixgbe_read_iosf_sb_reg_x550(struct ixgbe_hw *hw, u32 reg_addr, | |||
| 158 | * | 158 | * |
| 159 | * Reads a 16 bit word from the EEPROM using the hostif. | 159 | * Reads a 16 bit word from the EEPROM using the hostif. |
| 160 | **/ | 160 | **/ |
| 161 | s32 ixgbe_read_ee_hostif_data_X550(struct ixgbe_hw *hw, u16 offset, u16 *data) | 161 | static s32 ixgbe_read_ee_hostif_data_X550(struct ixgbe_hw *hw, u16 offset, |
| 162 | u16 *data) | ||
| 162 | { | 163 | { |
| 163 | s32 status; | 164 | s32 status; |
| 164 | struct ixgbe_hic_read_shadow_ram buffer; | 165 | struct ixgbe_hic_read_shadow_ram buffer; |
| @@ -193,8 +194,8 @@ s32 ixgbe_read_ee_hostif_data_X550(struct ixgbe_hw *hw, u16 offset, u16 *data) | |||
| 193 | * | 194 | * |
| 194 | * Reads a 16 bit word(s) from the EEPROM using the hostif. | 195 | * Reads a 16 bit word(s) from the EEPROM using the hostif. |
| 195 | **/ | 196 | **/ |
| 196 | s32 ixgbe_read_ee_hostif_buffer_X550(struct ixgbe_hw *hw, | 197 | static s32 ixgbe_read_ee_hostif_buffer_X550(struct ixgbe_hw *hw, |
| 197 | u16 offset, u16 words, u16 *data) | 198 | u16 offset, u16 words, u16 *data) |
| 198 | { | 199 | { |
| 199 | struct ixgbe_hic_read_shadow_ram buffer; | 200 | struct ixgbe_hic_read_shadow_ram buffer; |
| 200 | u32 current_word = 0; | 201 | u32 current_word = 0; |
| @@ -331,7 +332,8 @@ static s32 ixgbe_checksum_ptr_x550(struct ixgbe_hw *hw, u16 ptr, | |||
| 331 | * | 332 | * |
| 332 | * Returns a negative error code on error, or the 16-bit checksum | 333 | * Returns a negative error code on error, or the 16-bit checksum |
| 333 | **/ | 334 | **/ |
| 334 | s32 ixgbe_calc_checksum_X550(struct ixgbe_hw *hw, u16 *buffer, u32 buffer_size) | 335 | static s32 ixgbe_calc_checksum_X550(struct ixgbe_hw *hw, u16 *buffer, |
| 336 | u32 buffer_size) | ||
| 335 | { | 337 | { |
| 336 | u16 eeprom_ptrs[IXGBE_EEPROM_LAST_WORD + 1]; | 338 | u16 eeprom_ptrs[IXGBE_EEPROM_LAST_WORD + 1]; |
| 337 | u16 *local_buffer; | 339 | u16 *local_buffer; |
| @@ -407,7 +409,7 @@ s32 ixgbe_calc_checksum_X550(struct ixgbe_hw *hw, u16 *buffer, u32 buffer_size) | |||
| 407 | * | 409 | * |
| 408 | * Returns a negative error code on error, or the 16-bit checksum | 410 | * Returns a negative error code on error, or the 16-bit checksum |
| 409 | **/ | 411 | **/ |
| 410 | s32 ixgbe_calc_eeprom_checksum_X550(struct ixgbe_hw *hw) | 412 | static s32 ixgbe_calc_eeprom_checksum_X550(struct ixgbe_hw *hw) |
| 411 | { | 413 | { |
| 412 | return ixgbe_calc_checksum_X550(hw, NULL, 0); | 414 | return ixgbe_calc_checksum_X550(hw, NULL, 0); |
| 413 | } | 415 | } |
| @@ -419,7 +421,7 @@ s32 ixgbe_calc_eeprom_checksum_X550(struct ixgbe_hw *hw) | |||
| 419 | * | 421 | * |
| 420 | * Reads a 16 bit word from the EEPROM using the hostif. | 422 | * Reads a 16 bit word from the EEPROM using the hostif. |
| 421 | **/ | 423 | **/ |
| 422 | s32 ixgbe_read_ee_hostif_X550(struct ixgbe_hw *hw, u16 offset, u16 *data) | 424 | static s32 ixgbe_read_ee_hostif_X550(struct ixgbe_hw *hw, u16 offset, u16 *data) |
| 423 | { | 425 | { |
| 424 | s32 status = 0; | 426 | s32 status = 0; |
| 425 | 427 | ||
| @@ -440,7 +442,8 @@ s32 ixgbe_read_ee_hostif_X550(struct ixgbe_hw *hw, u16 offset, u16 *data) | |||
| 440 | * Performs checksum calculation and validates the EEPROM checksum. If the | 442 | * Performs checksum calculation and validates the EEPROM checksum. If the |
| 441 | * caller does not need checksum_val, the value can be NULL. | 443 | * caller does not need checksum_val, the value can be NULL. |
| 442 | **/ | 444 | **/ |
| 443 | s32 ixgbe_validate_eeprom_checksum_X550(struct ixgbe_hw *hw, u16 *checksum_val) | 445 | static s32 ixgbe_validate_eeprom_checksum_X550(struct ixgbe_hw *hw, |
| 446 | u16 *checksum_val) | ||
| 444 | { | 447 | { |
| 445 | s32 status; | 448 | s32 status; |
| 446 | u16 checksum; | 449 | u16 checksum; |
| @@ -489,7 +492,8 @@ s32 ixgbe_validate_eeprom_checksum_X550(struct ixgbe_hw *hw, u16 *checksum_val) | |||
| 489 | * | 492 | * |
| 490 | * Write a 16 bit word to the EEPROM using the hostif. | 493 | * Write a 16 bit word to the EEPROM using the hostif. |
| 491 | **/ | 494 | **/ |
| 492 | s32 ixgbe_write_ee_hostif_data_X550(struct ixgbe_hw *hw, u16 offset, u16 data) | 495 | static s32 ixgbe_write_ee_hostif_data_X550(struct ixgbe_hw *hw, u16 offset, |
| 496 | u16 data) | ||
| 493 | { | 497 | { |
| 494 | s32 status; | 498 | s32 status; |
| 495 | struct ixgbe_hic_write_shadow_ram buffer; | 499 | struct ixgbe_hic_write_shadow_ram buffer; |
| @@ -517,7 +521,7 @@ s32 ixgbe_write_ee_hostif_data_X550(struct ixgbe_hw *hw, u16 offset, u16 data) | |||
| 517 | * | 521 | * |
| 518 | * Write a 16 bit word to the EEPROM using the hostif. | 522 | * Write a 16 bit word to the EEPROM using the hostif. |
| 519 | **/ | 523 | **/ |
| 520 | s32 ixgbe_write_ee_hostif_X550(struct ixgbe_hw *hw, u16 offset, u16 data) | 524 | static s32 ixgbe_write_ee_hostif_X550(struct ixgbe_hw *hw, u16 offset, u16 data) |
| 521 | { | 525 | { |
| 522 | s32 status = 0; | 526 | s32 status = 0; |
| 523 | 527 | ||
| @@ -537,7 +541,7 @@ s32 ixgbe_write_ee_hostif_X550(struct ixgbe_hw *hw, u16 offset, u16 data) | |||
| 537 | * | 541 | * |
| 538 | * Issue a shadow RAM dump to FW to copy EEPROM from shadow RAM to the flash. | 542 | * Issue a shadow RAM dump to FW to copy EEPROM from shadow RAM to the flash. |
| 539 | **/ | 543 | **/ |
| 540 | s32 ixgbe_update_flash_X550(struct ixgbe_hw *hw) | 544 | static s32 ixgbe_update_flash_X550(struct ixgbe_hw *hw) |
| 541 | { | 545 | { |
| 542 | s32 status = 0; | 546 | s32 status = 0; |
| 543 | union ixgbe_hic_hdr2 buffer; | 547 | union ixgbe_hic_hdr2 buffer; |
| @@ -560,7 +564,7 @@ s32 ixgbe_update_flash_X550(struct ixgbe_hw *hw) | |||
| 560 | * checksum and updates the EEPROM and instructs the hardware to update | 564 | * checksum and updates the EEPROM and instructs the hardware to update |
| 561 | * the flash. | 565 | * the flash. |
| 562 | **/ | 566 | **/ |
| 563 | s32 ixgbe_update_eeprom_checksum_X550(struct ixgbe_hw *hw) | 567 | static s32 ixgbe_update_eeprom_checksum_X550(struct ixgbe_hw *hw) |
| 564 | { | 568 | { |
| 565 | s32 status; | 569 | s32 status; |
| 566 | u16 checksum = 0; | 570 | u16 checksum = 0; |
| @@ -600,8 +604,9 @@ s32 ixgbe_update_eeprom_checksum_X550(struct ixgbe_hw *hw) | |||
| 600 | * | 604 | * |
| 601 | * Write a 16 bit word(s) to the EEPROM using the hostif. | 605 | * Write a 16 bit word(s) to the EEPROM using the hostif. |
| 602 | **/ | 606 | **/ |
| 603 | s32 ixgbe_write_ee_hostif_buffer_X550(struct ixgbe_hw *hw, | 607 | static s32 ixgbe_write_ee_hostif_buffer_X550(struct ixgbe_hw *hw, |
| 604 | u16 offset, u16 words, u16 *data) | 608 | u16 offset, u16 words, |
| 609 | u16 *data) | ||
| 605 | { | 610 | { |
| 606 | s32 status = 0; | 611 | s32 status = 0; |
| 607 | u32 i = 0; | 612 | u32 i = 0; |
| @@ -630,7 +635,7 @@ s32 ixgbe_write_ee_hostif_buffer_X550(struct ixgbe_hw *hw, | |||
| 630 | /** ixgbe_init_mac_link_ops_X550em - init mac link function pointers | 635 | /** ixgbe_init_mac_link_ops_X550em - init mac link function pointers |
| 631 | * @hw: pointer to hardware structure | 636 | * @hw: pointer to hardware structure |
| 632 | **/ | 637 | **/ |
| 633 | void ixgbe_init_mac_link_ops_X550em(struct ixgbe_hw *hw) | 638 | static void ixgbe_init_mac_link_ops_X550em(struct ixgbe_hw *hw) |
| 634 | { | 639 | { |
| 635 | struct ixgbe_mac_info *mac = &hw->mac; | 640 | struct ixgbe_mac_info *mac = &hw->mac; |
| 636 | 641 | ||
| @@ -647,7 +652,7 @@ void ixgbe_init_mac_link_ops_X550em(struct ixgbe_hw *hw) | |||
| 647 | /** ixgbe_setup_sfp_modules_X550em - Setup SFP module | 652 | /** ixgbe_setup_sfp_modules_X550em - Setup SFP module |
| 648 | * @hw: pointer to hardware structure | 653 | * @hw: pointer to hardware structure |
| 649 | */ | 654 | */ |
| 650 | s32 ixgbe_setup_sfp_modules_X550em(struct ixgbe_hw *hw) | 655 | static s32 ixgbe_setup_sfp_modules_X550em(struct ixgbe_hw *hw) |
| 651 | { | 656 | { |
| 652 | bool setup_linear; | 657 | bool setup_linear; |
| 653 | u16 reg_slice, edc_mode; | 658 | u16 reg_slice, edc_mode; |
| @@ -703,9 +708,9 @@ s32 ixgbe_setup_sfp_modules_X550em(struct ixgbe_hw *hw) | |||
| 703 | * @speed: pointer to link speed | 708 | * @speed: pointer to link speed |
| 704 | * @autoneg: true when autoneg or autotry is enabled | 709 | * @autoneg: true when autoneg or autotry is enabled |
| 705 | **/ | 710 | **/ |
| 706 | s32 ixgbe_get_link_capabilities_X550em(struct ixgbe_hw *hw, | 711 | static s32 ixgbe_get_link_capabilities_X550em(struct ixgbe_hw *hw, |
| 707 | ixgbe_link_speed *speed, | 712 | ixgbe_link_speed *speed, |
| 708 | bool *autoneg) | 713 | bool *autoneg) |
| 709 | { | 714 | { |
| 710 | /* SFP */ | 715 | /* SFP */ |
| 711 | if (hw->phy.media_type == ixgbe_media_type_fiber) { | 716 | if (hw->phy.media_type == ixgbe_media_type_fiber) { |
| @@ -740,8 +745,8 @@ s32 ixgbe_get_link_capabilities_X550em(struct ixgbe_hw *hw, | |||
| 740 | * @device_type: 3 bit device type | 745 | * @device_type: 3 bit device type |
| 741 | * @data: Data to write to the register | 746 | * @data: Data to write to the register |
| 742 | **/ | 747 | **/ |
| 743 | s32 ixgbe_write_iosf_sb_reg_x550(struct ixgbe_hw *hw, u32 reg_addr, | 748 | static s32 ixgbe_write_iosf_sb_reg_x550(struct ixgbe_hw *hw, u32 reg_addr, |
| 744 | u32 device_type, u32 data) | 749 | u32 device_type, u32 data) |
| 745 | { | 750 | { |
| 746 | u32 i, command, error; | 751 | u32 i, command, error; |
| 747 | 752 | ||
| @@ -904,7 +909,7 @@ static s32 ixgbe_setup_ixfi_x550em(struct ixgbe_hw *hw, ixgbe_link_speed *speed) | |||
| 904 | * | 909 | * |
| 905 | * Configures the integrated KX4 PHY. | 910 | * Configures the integrated KX4 PHY. |
| 906 | **/ | 911 | **/ |
| 907 | s32 ixgbe_setup_kx4_x550em(struct ixgbe_hw *hw) | 912 | static s32 ixgbe_setup_kx4_x550em(struct ixgbe_hw *hw) |
| 908 | { | 913 | { |
| 909 | s32 status; | 914 | s32 status; |
| 910 | u32 reg_val; | 915 | u32 reg_val; |
| @@ -942,7 +947,7 @@ s32 ixgbe_setup_kx4_x550em(struct ixgbe_hw *hw) | |||
| 942 | * | 947 | * |
| 943 | * Configures the integrated KR PHY. | 948 | * Configures the integrated KR PHY. |
| 944 | **/ | 949 | **/ |
| 945 | s32 ixgbe_setup_kr_x550em(struct ixgbe_hw *hw) | 950 | static s32 ixgbe_setup_kr_x550em(struct ixgbe_hw *hw) |
| 946 | { | 951 | { |
| 947 | s32 status; | 952 | s32 status; |
| 948 | u32 reg_val; | 953 | u32 reg_val; |
| @@ -987,7 +992,7 @@ s32 ixgbe_setup_kr_x550em(struct ixgbe_hw *hw) | |||
| 987 | * A return of a non-zero value indicates an error, and the base driver should | 992 | * A return of a non-zero value indicates an error, and the base driver should |
| 988 | * not report link up. | 993 | * not report link up. |
| 989 | **/ | 994 | **/ |
| 990 | s32 ixgbe_setup_internal_phy_x550em(struct ixgbe_hw *hw) | 995 | static s32 ixgbe_setup_internal_phy_x550em(struct ixgbe_hw *hw) |
| 991 | { | 996 | { |
| 992 | u32 status; | 997 | u32 status; |
| 993 | u16 lasi, autoneg_status, speed; | 998 | u16 lasi, autoneg_status, speed; |
| @@ -1049,7 +1054,7 @@ s32 ixgbe_setup_internal_phy_x550em(struct ixgbe_hw *hw) | |||
| 1049 | * set during init_shared_code because the PHY/SFP type was | 1054 | * set during init_shared_code because the PHY/SFP type was |
| 1050 | * not known. Perform the SFP init if necessary. | 1055 | * not known. Perform the SFP init if necessary. |
| 1051 | **/ | 1056 | **/ |
| 1052 | s32 ixgbe_init_phy_ops_X550em(struct ixgbe_hw *hw) | 1057 | static s32 ixgbe_init_phy_ops_X550em(struct ixgbe_hw *hw) |
| 1053 | { | 1058 | { |
| 1054 | struct ixgbe_phy_info *phy = &hw->phy; | 1059 | struct ixgbe_phy_info *phy = &hw->phy; |
| 1055 | s32 ret_val; | 1060 | s32 ret_val; |
| @@ -1102,7 +1107,7 @@ s32 ixgbe_init_phy_ops_X550em(struct ixgbe_hw *hw) | |||
| 1102 | * Returns the media type (fiber, copper, backplane) | 1107 | * Returns the media type (fiber, copper, backplane) |
| 1103 | * | 1108 | * |
| 1104 | */ | 1109 | */ |
| 1105 | enum ixgbe_media_type ixgbe_get_media_type_X550em(struct ixgbe_hw *hw) | 1110 | static enum ixgbe_media_type ixgbe_get_media_type_X550em(struct ixgbe_hw *hw) |
| 1106 | { | 1111 | { |
| 1107 | enum ixgbe_media_type media_type; | 1112 | enum ixgbe_media_type media_type; |
| 1108 | 1113 | ||
| @@ -1129,7 +1134,7 @@ enum ixgbe_media_type ixgbe_get_media_type_X550em(struct ixgbe_hw *hw) | |||
| 1129 | /** ixgbe_init_ext_t_x550em - Start (unstall) the external Base T PHY. | 1134 | /** ixgbe_init_ext_t_x550em - Start (unstall) the external Base T PHY. |
| 1130 | ** @hw: pointer to hardware structure | 1135 | ** @hw: pointer to hardware structure |
| 1131 | **/ | 1136 | **/ |
| 1132 | s32 ixgbe_init_ext_t_x550em(struct ixgbe_hw *hw) | 1137 | static s32 ixgbe_init_ext_t_x550em(struct ixgbe_hw *hw) |
| 1133 | { | 1138 | { |
| 1134 | u32 status; | 1139 | u32 status; |
| 1135 | u16 reg; | 1140 | u16 reg; |
| @@ -1202,7 +1207,7 @@ s32 ixgbe_init_ext_t_x550em(struct ixgbe_hw *hw) | |||
| 1202 | ** and clears all interrupts, perform a PHY reset, and perform a link (MAC) | 1207 | ** and clears all interrupts, perform a PHY reset, and perform a link (MAC) |
| 1203 | ** reset. | 1208 | ** reset. |
| 1204 | **/ | 1209 | **/ |
| 1205 | s32 ixgbe_reset_hw_X550em(struct ixgbe_hw *hw) | 1210 | static s32 ixgbe_reset_hw_X550em(struct ixgbe_hw *hw) |
| 1206 | { | 1211 | { |
| 1207 | ixgbe_link_speed link_speed; | 1212 | ixgbe_link_speed link_speed; |
| 1208 | s32 status; | 1213 | s32 status; |
