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

[PATCH] drivers/net/ixgb/: make some code static

This patch makes some needlessly global code static.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

authored by

Adrian Bunk and committed by
John W. Linville
e9ab1d14 70d9d825

+24 -28
+1 -1
drivers/net/ixgb/ixgb_ethtool.c
··· 694 694 } 695 695 } 696 696 697 - struct ethtool_ops ixgb_ethtool_ops = { 697 + static struct ethtool_ops ixgb_ethtool_ops = { 698 698 .get_settings = ixgb_get_settings, 699 699 .set_settings = ixgb_set_settings, 700 700 .get_drvinfo = ixgb_get_drvinfo,
+22 -9
drivers/net/ixgb/ixgb_hw.c
··· 47 47 48 48 static ixgb_phy_type ixgb_identify_phy(struct ixgb_hw *hw); 49 49 50 - uint32_t ixgb_mac_reset(struct ixgb_hw *hw); 50 + static void ixgb_clear_hw_cntrs(struct ixgb_hw *hw); 51 51 52 - uint32_t ixgb_mac_reset(struct ixgb_hw *hw) 52 + static void ixgb_clear_vfta(struct ixgb_hw *hw); 53 + 54 + static void ixgb_init_rx_addrs(struct ixgb_hw *hw); 55 + 56 + static uint16_t ixgb_read_phy_reg(struct ixgb_hw *hw, 57 + uint32_t reg_address, 58 + uint32_t phy_address, 59 + uint32_t device_type); 60 + 61 + static boolean_t ixgb_setup_fc(struct ixgb_hw *hw); 62 + 63 + static boolean_t mac_addr_valid(uint8_t *mac_addr); 64 + 65 + static uint32_t ixgb_mac_reset(struct ixgb_hw *hw) 53 66 { 54 67 uint32_t ctrl_reg; 55 68 ··· 348 335 * of the receive addresss registers. Clears the multicast table. Assumes 349 336 * the receiver is in reset when the routine is called. 350 337 *****************************************************************************/ 351 - void 338 + static void 352 339 ixgb_init_rx_addrs(struct ixgb_hw *hw) 353 340 { 354 341 uint32_t i; ··· 617 604 * 618 605 * hw - Struct containing variables accessed by shared code 619 606 *****************************************************************************/ 620 - void 607 + static void 621 608 ixgb_clear_vfta(struct ixgb_hw *hw) 622 609 { 623 610 uint32_t offset; ··· 633 620 * hw - Struct containing variables accessed by shared code 634 621 *****************************************************************************/ 635 622 636 - boolean_t 623 + static boolean_t 637 624 ixgb_setup_fc(struct ixgb_hw *hw) 638 625 { 639 626 uint32_t ctrl_reg; ··· 735 722 * This requires that first an address cycle command is sent, followed by a 736 723 * read command. 737 724 *****************************************************************************/ 738 - uint16_t 725 + static uint16_t 739 726 ixgb_read_phy_reg(struct ixgb_hw *hw, 740 727 uint32_t reg_address, 741 728 uint32_t phy_address, ··· 828 815 * This requires that first an address cycle command is sent, followed by a 829 816 * write command. 830 817 *****************************************************************************/ 831 - void 818 + static void 832 819 ixgb_write_phy_reg(struct ixgb_hw *hw, 833 820 uint32_t reg_address, 834 821 uint32_t phy_address, ··· 972 959 * 973 960 * hw - Struct containing variables accessed by shared code 974 961 *****************************************************************************/ 975 - void 962 + static void 976 963 ixgb_clear_hw_cntrs(struct ixgb_hw *hw) 977 964 { 978 965 volatile uint32_t temp_reg; ··· 1127 1114 * mac_addr - pointer to MAC address. 1128 1115 * 1129 1116 *****************************************************************************/ 1130 - boolean_t 1117 + static boolean_t 1131 1118 mac_addr_valid(uint8_t *mac_addr) 1132 1119 { 1133 1120 boolean_t is_valid = TRUE;
-17
drivers/net/ixgb/ixgb_hw.h
··· 784 784 extern boolean_t ixgb_adapter_stop(struct ixgb_hw *hw); 785 785 extern boolean_t ixgb_init_hw(struct ixgb_hw *hw); 786 786 extern boolean_t ixgb_adapter_start(struct ixgb_hw *hw); 787 - extern void ixgb_init_rx_addrs(struct ixgb_hw *hw); 788 787 extern void ixgb_check_for_link(struct ixgb_hw *hw); 789 788 extern boolean_t ixgb_check_for_bad_link(struct ixgb_hw *hw); 790 - extern boolean_t ixgb_setup_fc(struct ixgb_hw *hw); 791 - extern void ixgb_clear_hw_cntrs(struct ixgb_hw *hw); 792 - extern boolean_t mac_addr_valid(uint8_t *mac_addr); 793 - 794 - extern uint16_t ixgb_read_phy_reg(struct ixgb_hw *hw, 795 - uint32_t reg_addr, 796 - uint32_t phy_addr, 797 - uint32_t device_type); 798 - 799 - extern void ixgb_write_phy_reg(struct ixgb_hw *hw, 800 - uint32_t reg_addr, 801 - uint32_t phy_addr, 802 - uint32_t device_type, 803 - uint16_t data); 804 789 805 790 extern void ixgb_rar_set(struct ixgb_hw *hw, 806 791 uint8_t *addr, ··· 802 817 extern void ixgb_write_vfta(struct ixgb_hw *hw, 803 818 uint32_t offset, 804 819 uint32_t value); 805 - 806 - extern void ixgb_clear_vfta(struct ixgb_hw *hw); 807 820 808 821 /* Access functions to eeprom data */ 809 822 void ixgb_get_ee_mac_addr(struct ixgb_hw *hw, uint8_t *mac_addr);
+1 -1
drivers/net/ixgb/ixgb_main.c
··· 45 45 */ 46 46 47 47 char ixgb_driver_name[] = "ixgb"; 48 - char ixgb_driver_string[] = "Intel(R) PRO/10GbE Network Driver"; 48 + static char ixgb_driver_string[] = "Intel(R) PRO/10GbE Network Driver"; 49 49 50 50 #ifndef CONFIG_IXGB_NAPI 51 51 #define DRIVERNAPI