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

[PATCH] drivers/net/e1000/: possible cleanups

This patch contains the following possible cleanups:
- make needlessly global code static
- #if 0 the following unused global functions:
- e1000_hw.c: e1000_mc_addr_list_update
- e1000_hw.c: e1000_read_reg_io
- e1000_hw.c: e1000_enable_pciex_master

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
3ad2cc67 e9ab1d14

+87 -89
+1 -1
drivers/net/e1000/e1000_ethtool.c
··· 1739 1739 } 1740 1740 } 1741 1741 1742 - struct ethtool_ops e1000_ethtool_ops = { 1742 + static struct ethtool_ops e1000_ethtool_ops = { 1743 1743 .get_settings = e1000_get_settings, 1744 1744 .set_settings = e1000_set_settings, 1745 1745 .get_drvinfo = e1000_get_drvinfo,
+70 -31
drivers/net/e1000/e1000_hw.c
··· 68 68 static int32_t e1000_set_phy_mode(struct e1000_hw *hw); 69 69 static int32_t e1000_host_if_read_cookie(struct e1000_hw *hw, uint8_t *buffer); 70 70 static uint8_t e1000_calculate_mng_checksum(char *buffer, uint32_t length); 71 + static uint8_t e1000_arc_subsystem_valid(struct e1000_hw *hw); 72 + static int32_t e1000_check_downshift(struct e1000_hw *hw); 73 + static int32_t e1000_check_polarity(struct e1000_hw *hw, uint16_t *polarity); 74 + static void e1000_clear_hw_cntrs(struct e1000_hw *hw); 75 + static void e1000_clear_vfta(struct e1000_hw *hw); 76 + static int32_t e1000_commit_shadow_ram(struct e1000_hw *hw); 77 + static int32_t e1000_config_dsp_after_link_change(struct e1000_hw *hw, 78 + boolean_t link_up); 79 + static int32_t e1000_config_fc_after_link_up(struct e1000_hw *hw); 80 + static int32_t e1000_detect_gig_phy(struct e1000_hw *hw); 81 + static int32_t e1000_get_auto_rd_done(struct e1000_hw *hw); 82 + static int32_t e1000_get_cable_length(struct e1000_hw *hw, 83 + uint16_t *min_length, 84 + uint16_t *max_length); 85 + static int32_t e1000_get_hw_eeprom_semaphore(struct e1000_hw *hw); 86 + static int32_t e1000_get_phy_cfg_done(struct e1000_hw *hw); 87 + static int32_t e1000_id_led_init(struct e1000_hw * hw); 88 + static void e1000_init_rx_addrs(struct e1000_hw *hw); 89 + static boolean_t e1000_is_onboard_nvm_eeprom(struct e1000_hw *hw); 90 + static int32_t e1000_poll_eerd_eewr_done(struct e1000_hw *hw, int eerd); 91 + static void e1000_put_hw_eeprom_semaphore(struct e1000_hw *hw); 92 + static int32_t e1000_read_eeprom_eerd(struct e1000_hw *hw, uint16_t offset, 93 + uint16_t words, uint16_t *data); 94 + static int32_t e1000_set_d0_lplu_state(struct e1000_hw *hw, boolean_t active); 95 + static int32_t e1000_set_d3_lplu_state(struct e1000_hw *hw, boolean_t active); 96 + static int32_t e1000_wait_autoneg(struct e1000_hw *hw); 97 + 98 + static void e1000_write_reg_io(struct e1000_hw *hw, uint32_t offset, 99 + uint32_t value); 100 + 101 + #define E1000_WRITE_REG_IO(a, reg, val) \ 102 + e1000_write_reg_io((a), E1000_##reg, val) 71 103 72 104 /* IGP cable length table */ 73 105 static const ··· 2067 2035 * based on the flow control negotiated by the PHY. In TBI mode, the TFCE 2068 2036 * and RFCE bits will be automaticaly set to the negotiated flow control mode. 2069 2037 *****************************************************************************/ 2070 - int32_t 2038 + static int32_t 2071 2039 e1000_config_fc_after_link_up(struct e1000_hw *hw) 2072 2040 { 2073 2041 int32_t ret_val; ··· 2569 2537 * 2570 2538 * hw - Struct containing variables accessed by shared code 2571 2539 ******************************************************************************/ 2572 - int32_t 2540 + static int32_t 2573 2541 e1000_wait_autoneg(struct e1000_hw *hw) 2574 2542 { 2575 2543 int32_t ret_val; ··· 3053 3021 * 3054 3022 * hw - Struct containing variables accessed by shared code 3055 3023 ******************************************************************************/ 3056 - int32_t 3024 + static int32_t 3057 3025 e1000_detect_gig_phy(struct e1000_hw *hw) 3058 3026 { 3059 3027 int32_t phy_init_status, ret_val; ··· 3153 3121 * hw - Struct containing variables accessed by shared code 3154 3122 * phy_info - PHY information structure 3155 3123 ******************************************************************************/ 3156 - int32_t 3124 + static int32_t 3157 3125 e1000_phy_igp_get_info(struct e1000_hw *hw, 3158 3126 struct e1000_phy_info *phy_info) 3159 3127 { ··· 3227 3195 * hw - Struct containing variables accessed by shared code 3228 3196 * phy_info - PHY information structure 3229 3197 ******************************************************************************/ 3230 - int32_t 3198 + static int32_t 3231 3199 e1000_phy_m88_get_info(struct e1000_hw *hw, 3232 3200 struct e1000_phy_info *phy_info) 3233 3201 { ··· 3937 3905 * data - word read from the EEPROM 3938 3906 * words - number of words to read 3939 3907 *****************************************************************************/ 3940 - int32_t 3908 + static int32_t 3941 3909 e1000_read_eeprom_eerd(struct e1000_hw *hw, 3942 3910 uint16_t offset, 3943 3911 uint16_t words, ··· 3971 3939 * data - word read from the EEPROM 3972 3940 * words - number of words to read 3973 3941 *****************************************************************************/ 3974 - int32_t 3942 + static int32_t 3975 3943 e1000_write_eeprom_eewr(struct e1000_hw *hw, 3976 3944 uint16_t offset, 3977 3945 uint16_t words, ··· 4008 3976 * 4009 3977 * hw - Struct containing variables accessed by shared code 4010 3978 *****************************************************************************/ 4011 - int32_t 3979 + static int32_t 4012 3980 e1000_poll_eerd_eewr_done(struct e1000_hw *hw, int eerd) 4013 3981 { 4014 3982 uint32_t attempts = 100000; ··· 4036 4004 * 4037 4005 * hw - Struct containing variables accessed by shared code 4038 4006 ****************************************************************************/ 4039 - boolean_t 4007 + static boolean_t 4040 4008 e1000_is_onboard_nvm_eeprom(struct e1000_hw *hw) 4041 4009 { 4042 4010 uint32_t eecd = 0; ··· 4354 4322 * data - word read from the EEPROM 4355 4323 * words - number of words to read 4356 4324 *****************************************************************************/ 4357 - int32_t 4325 + static int32_t 4358 4326 e1000_commit_shadow_ram(struct e1000_hw *hw) 4359 4327 { 4360 4328 uint32_t attempts = 100000; ··· 4485 4453 * of the receive addresss registers. Clears the multicast table. Assumes 4486 4454 * the receiver is in reset when the routine is called. 4487 4455 *****************************************************************************/ 4488 - void 4456 + static void 4489 4457 e1000_init_rx_addrs(struct e1000_hw *hw) 4490 4458 { 4491 4459 uint32_t i; ··· 4513 4481 } 4514 4482 } 4515 4483 4484 + #if 0 4516 4485 /****************************************************************************** 4517 4486 * Updates the MAC's list of multicast addresses. 4518 4487 * ··· 4597 4564 } 4598 4565 DEBUGOUT("MC Update Complete\n"); 4599 4566 } 4567 + #endif /* 0 */ 4600 4568 4601 4569 /****************************************************************************** 4602 4570 * Hashes an address to determine its location in the multicast table ··· 4739 4705 * 4740 4706 * hw - Struct containing variables accessed by shared code 4741 4707 *****************************************************************************/ 4742 - void 4708 + static void 4743 4709 e1000_clear_vfta(struct e1000_hw *hw) 4744 4710 { 4745 4711 uint32_t offset; ··· 4769 4735 } 4770 4736 } 4771 4737 4772 - int32_t 4738 + static int32_t 4773 4739 e1000_id_led_init(struct e1000_hw * hw) 4774 4740 { 4775 4741 uint32_t ledctl; ··· 5031 4997 * 5032 4998 * hw - Struct containing variables accessed by shared code 5033 4999 *****************************************************************************/ 5034 - void 5000 + static void 5035 5001 e1000_clear_hw_cntrs(struct e1000_hw *hw) 5036 5002 { 5037 5003 volatile uint32_t temp; ··· 5317 5283 break; 5318 5284 } 5319 5285 } 5286 + 5287 + #if 0 5320 5288 /****************************************************************************** 5321 5289 * Reads a value from one of the devices registers using port I/O (as opposed 5322 5290 * memory mapped I/O). Only 82544 and newer devices support port I/O. ··· 5336 5300 e1000_io_write(hw, io_addr, offset); 5337 5301 return e1000_io_read(hw, io_data); 5338 5302 } 5303 + #endif /* 0 */ 5339 5304 5340 5305 /****************************************************************************** 5341 5306 * Writes a value to one of the devices registers using port I/O (as opposed to ··· 5346 5309 * offset - offset to write to 5347 5310 * value - value to write 5348 5311 *****************************************************************************/ 5349 - void 5312 + static void 5350 5313 e1000_write_reg_io(struct e1000_hw *hw, 5351 5314 uint32_t offset, 5352 5315 uint32_t value) ··· 5374 5337 * register to the minimum and maximum range. 5375 5338 * For IGP phy's, the function calculates the range by the AGC registers. 5376 5339 *****************************************************************************/ 5377 - int32_t 5340 + static int32_t 5378 5341 e1000_get_cable_length(struct e1000_hw *hw, 5379 5342 uint16_t *min_length, 5380 5343 uint16_t *max_length) ··· 5526 5489 * return 0. If the link speed is 1000 Mbps the polarity status is in the 5527 5490 * IGP01E1000_PHY_PCS_INIT_REG. 5528 5491 *****************************************************************************/ 5529 - int32_t 5492 + static int32_t 5530 5493 e1000_check_polarity(struct e1000_hw *hw, 5531 5494 uint16_t *polarity) 5532 5495 { ··· 5588 5551 * Link Health register. In IGP this bit is latched high, so the driver must 5589 5552 * read it immediately after link is established. 5590 5553 *****************************************************************************/ 5591 - int32_t 5554 + static int32_t 5592 5555 e1000_check_downshift(struct e1000_hw *hw) 5593 5556 { 5594 5557 int32_t ret_val; ··· 5629 5592 * 5630 5593 ****************************************************************************/ 5631 5594 5632 - int32_t 5595 + static int32_t 5633 5596 e1000_config_dsp_after_link_change(struct e1000_hw *hw, 5634 5597 boolean_t link_up) 5635 5598 { ··· 5860 5823 * 5861 5824 ****************************************************************************/ 5862 5825 5863 - int32_t 5826 + static int32_t 5864 5827 e1000_set_d3_lplu_state(struct e1000_hw *hw, 5865 5828 boolean_t active) 5866 5829 { ··· 5973 5936 * 5974 5937 ****************************************************************************/ 5975 5938 5976 - int32_t 5939 + static int32_t 5977 5940 e1000_set_d0_lplu_state(struct e1000_hw *hw, 5978 5941 boolean_t active) 5979 5942 { ··· 6140 6103 * timeout 6141 6104 * - E1000_SUCCESS for success. 6142 6105 ****************************************************************************/ 6143 - int32_t 6106 + static int32_t 6144 6107 e1000_mng_enable_host_if(struct e1000_hw * hw) 6145 6108 { 6146 6109 uint32_t hicr; ··· 6174 6137 * 6175 6138 * returns - E1000_SUCCESS for success. 6176 6139 ****************************************************************************/ 6177 - int32_t 6140 + static int32_t 6178 6141 e1000_mng_host_if_write(struct e1000_hw * hw, uint8_t *buffer, 6179 6142 uint16_t length, uint16_t offset, uint8_t *sum) 6180 6143 { ··· 6242 6205 * 6243 6206 * returns - E1000_SUCCESS for success. 6244 6207 ****************************************************************************/ 6245 - int32_t 6208 + static int32_t 6246 6209 e1000_mng_write_cmd_header(struct e1000_hw * hw, 6247 6210 struct e1000_host_mng_command_header * hdr) 6248 6211 { ··· 6280 6243 * 6281 6244 * returns - E1000_SUCCESS for success. 6282 6245 ****************************************************************************/ 6283 - int32_t 6246 + static int32_t 6284 6247 e1000_mng_write_commit( 6285 6248 struct e1000_hw * hw) 6286 6249 { ··· 6533 6496 * returns: - none. 6534 6497 * 6535 6498 ***************************************************************************/ 6536 - void 6499 + static void 6537 6500 e1000_set_pci_express_master_disable(struct e1000_hw *hw) 6538 6501 { 6539 6502 uint32_t ctrl; ··· 6548 6511 E1000_WRITE_REG(hw, CTRL, ctrl); 6549 6512 } 6550 6513 6514 + #if 0 6551 6515 /*************************************************************************** 6552 6516 * 6553 6517 * Enables PCI-Express master access. ··· 6572 6534 ctrl &= ~E1000_CTRL_GIO_MASTER_DISABLE; 6573 6535 E1000_WRITE_REG(hw, CTRL, ctrl); 6574 6536 } 6537 + #endif /* 0 */ 6575 6538 6576 6539 /******************************************************************************* 6577 6540 * ··· 6623 6584 * E1000_SUCCESS at any other case. 6624 6585 * 6625 6586 ******************************************************************************/ 6626 - int32_t 6587 + static int32_t 6627 6588 e1000_get_auto_rd_done(struct e1000_hw *hw) 6628 6589 { 6629 6590 int32_t timeout = AUTO_READ_DONE_TIMEOUT; ··· 6662 6623 * E1000_SUCCESS at any other case. 6663 6624 * 6664 6625 ***************************************************************************/ 6665 - int32_t 6626 + static int32_t 6666 6627 e1000_get_phy_cfg_done(struct e1000_hw *hw) 6667 6628 { 6668 6629 int32_t timeout = PHY_CFG_TIMEOUT; ··· 6705 6666 * E1000_SUCCESS at any other case. 6706 6667 * 6707 6668 ***************************************************************************/ 6708 - int32_t 6669 + static int32_t 6709 6670 e1000_get_hw_eeprom_semaphore(struct e1000_hw *hw) 6710 6671 { 6711 6672 int32_t timeout; ··· 6750 6711 * returns: - None. 6751 6712 * 6752 6713 ***************************************************************************/ 6753 - void 6714 + static void 6754 6715 e1000_put_hw_eeprom_semaphore(struct e1000_hw *hw) 6755 6716 { 6756 6717 uint32_t swsm; ··· 6786 6747 E1000_BLK_PHY_RESET : E1000_SUCCESS; 6787 6748 } 6788 6749 6789 - uint8_t 6750 + static uint8_t 6790 6751 e1000_arc_subsystem_valid(struct e1000_hw *hw) 6791 6752 { 6792 6753 uint32_t fwsm;
-42
drivers/net/e1000/e1000_hw.h
··· 284 284 /* Initialization */ 285 285 int32_t e1000_reset_hw(struct e1000_hw *hw); 286 286 int32_t e1000_init_hw(struct e1000_hw *hw); 287 - int32_t e1000_id_led_init(struct e1000_hw * hw); 288 287 int32_t e1000_set_mac_type(struct e1000_hw *hw); 289 288 void e1000_set_media_type(struct e1000_hw *hw); 290 289 ··· 291 292 int32_t e1000_setup_link(struct e1000_hw *hw); 292 293 int32_t e1000_phy_setup_autoneg(struct e1000_hw *hw); 293 294 void e1000_config_collision_dist(struct e1000_hw *hw); 294 - int32_t e1000_config_fc_after_link_up(struct e1000_hw *hw); 295 295 int32_t e1000_check_for_link(struct e1000_hw *hw); 296 296 int32_t e1000_get_speed_and_duplex(struct e1000_hw *hw, uint16_t * speed, uint16_t * duplex); 297 - int32_t e1000_wait_autoneg(struct e1000_hw *hw); 298 297 int32_t e1000_force_mac_fc(struct e1000_hw *hw); 299 298 300 299 /* PHY */ ··· 300 303 int32_t e1000_write_phy_reg(struct e1000_hw *hw, uint32_t reg_addr, uint16_t data); 301 304 int32_t e1000_phy_hw_reset(struct e1000_hw *hw); 302 305 int32_t e1000_phy_reset(struct e1000_hw *hw); 303 - int32_t e1000_detect_gig_phy(struct e1000_hw *hw); 304 306 int32_t e1000_phy_get_info(struct e1000_hw *hw, struct e1000_phy_info *phy_info); 305 - int32_t e1000_phy_m88_get_info(struct e1000_hw *hw, struct e1000_phy_info *phy_info); 306 - int32_t e1000_phy_igp_get_info(struct e1000_hw *hw, struct e1000_phy_info *phy_info); 307 - int32_t e1000_get_cable_length(struct e1000_hw *hw, uint16_t *min_length, uint16_t *max_length); 308 - int32_t e1000_check_polarity(struct e1000_hw *hw, uint16_t *polarity); 309 - int32_t e1000_check_downshift(struct e1000_hw *hw); 310 307 int32_t e1000_validate_mdi_setting(struct e1000_hw *hw); 311 308 312 309 /* EEPROM Functions */ 313 310 int32_t e1000_init_eeprom_params(struct e1000_hw *hw); 314 - boolean_t e1000_is_onboard_nvm_eeprom(struct e1000_hw *hw); 315 - int32_t e1000_read_eeprom_eerd(struct e1000_hw *hw, uint16_t offset, uint16_t words, uint16_t *data); 316 - int32_t e1000_write_eeprom_eewr(struct e1000_hw *hw, uint16_t offset, uint16_t words, uint16_t *data); 317 - int32_t e1000_poll_eerd_eewr_done(struct e1000_hw *hw, int eerd); 318 311 319 312 /* MNG HOST IF functions */ 320 313 uint32_t e1000_enable_mng_pass_thru(struct e1000_hw *hw); ··· 364 377 uint16_t length); 365 378 boolean_t e1000_check_mng_mode(struct e1000_hw *hw); 366 379 boolean_t e1000_enable_tx_pkt_filtering(struct e1000_hw *hw); 367 - int32_t e1000_mng_enable_host_if(struct e1000_hw *hw); 368 - int32_t e1000_mng_host_if_write(struct e1000_hw *hw, uint8_t *buffer, 369 - uint16_t length, uint16_t offset, uint8_t *sum); 370 - int32_t e1000_mng_write_cmd_header(struct e1000_hw* hw, 371 - struct e1000_host_mng_command_header* hdr); 372 - 373 - int32_t e1000_mng_write_commit(struct e1000_hw *hw); 374 380 375 381 int32_t e1000_read_eeprom(struct e1000_hw *hw, uint16_t reg, uint16_t words, uint16_t *data); 376 382 int32_t e1000_validate_eeprom_checksum(struct e1000_hw *hw); ··· 375 395 void e1000_swfw_sync_release(struct e1000_hw *hw, uint16_t mask); 376 396 377 397 /* Filters (multicast, vlan, receive) */ 378 - void e1000_init_rx_addrs(struct e1000_hw *hw); 379 - void e1000_mc_addr_list_update(struct e1000_hw *hw, uint8_t * mc_addr_list, uint32_t mc_addr_count, uint32_t pad, uint32_t rar_used_count); 380 398 uint32_t e1000_hash_mc_addr(struct e1000_hw *hw, uint8_t * mc_addr); 381 399 void e1000_mta_set(struct e1000_hw *hw, uint32_t hash_value); 382 400 void e1000_rar_set(struct e1000_hw *hw, uint8_t * mc_addr, uint32_t rar_index); 383 401 void e1000_write_vfta(struct e1000_hw *hw, uint32_t offset, uint32_t value); 384 - void e1000_clear_vfta(struct e1000_hw *hw); 385 402 386 403 /* LED functions */ 387 404 int32_t e1000_setup_led(struct e1000_hw *hw); ··· 389 412 /* Adaptive IFS Functions */ 390 413 391 414 /* Everything else */ 392 - void e1000_clear_hw_cntrs(struct e1000_hw *hw); 393 415 void e1000_reset_adaptive(struct e1000_hw *hw); 394 416 void e1000_update_adaptive(struct e1000_hw *hw); 395 417 void e1000_tbi_adjust_stats(struct e1000_hw *hw, struct e1000_hw_stats *stats, uint32_t frame_len, uint8_t * mac_addr); ··· 399 423 void e1000_write_pci_cfg(struct e1000_hw *hw, uint32_t reg, uint16_t * value); 400 424 /* Port I/O is only supported on 82544 and newer */ 401 425 uint32_t e1000_io_read(struct e1000_hw *hw, unsigned long port); 402 - uint32_t e1000_read_reg_io(struct e1000_hw *hw, uint32_t offset); 403 426 void e1000_io_write(struct e1000_hw *hw, unsigned long port, uint32_t value); 404 - void e1000_write_reg_io(struct e1000_hw *hw, uint32_t offset, uint32_t value); 405 - int32_t e1000_config_dsp_after_link_change(struct e1000_hw *hw, boolean_t link_up); 406 - int32_t e1000_set_d3_lplu_state(struct e1000_hw *hw, boolean_t active); 407 - int32_t e1000_set_d0_lplu_state(struct e1000_hw *hw, boolean_t active); 408 - void e1000_set_pci_express_master_disable(struct e1000_hw *hw); 409 - void e1000_enable_pciex_master(struct e1000_hw *hw); 410 427 int32_t e1000_disable_pciex_master(struct e1000_hw *hw); 411 - int32_t e1000_get_auto_rd_done(struct e1000_hw *hw); 412 - int32_t e1000_get_phy_cfg_done(struct e1000_hw *hw); 413 428 int32_t e1000_get_software_semaphore(struct e1000_hw *hw); 414 429 void e1000_release_software_semaphore(struct e1000_hw *hw); 415 430 int32_t e1000_check_phy_reset_block(struct e1000_hw *hw); 416 - int32_t e1000_get_hw_eeprom_semaphore(struct e1000_hw *hw); 417 - void e1000_put_hw_eeprom_semaphore(struct e1000_hw *hw); 418 - int32_t e1000_commit_shadow_ram(struct e1000_hw *hw); 419 - uint8_t e1000_arc_subsystem_valid(struct e1000_hw *hw); 420 - 421 - #define E1000_READ_REG_IO(a, reg) \ 422 - e1000_read_reg_io((a), E1000_##reg) 423 - #define E1000_WRITE_REG_IO(a, reg, val) \ 424 - e1000_write_reg_io((a), E1000_##reg, val) 425 431 426 432 /* PCI Device IDs */ 427 433 #define E1000_DEV_ID_82542 0x1000
+16 -15
drivers/net/e1000/e1000_main.c
··· 37 37 */ 38 38 39 39 char e1000_driver_name[] = "e1000"; 40 - char e1000_driver_string[] = "Intel(R) PRO/1000 Network Driver"; 40 + static char e1000_driver_string[] = "Intel(R) PRO/1000 Network Driver"; 41 41 #ifndef CONFIG_E1000_NAPI 42 42 #define DRIVERNAPI 43 43 #else ··· 45 45 #endif 46 46 #define DRV_VERSION "6.1.16-k2"DRIVERNAPI 47 47 char e1000_driver_version[] = DRV_VERSION; 48 - char e1000_copyright[] = "Copyright (c) 1999-2005 Intel Corporation."; 48 + static char e1000_copyright[] = "Copyright (c) 1999-2005 Intel Corporation."; 49 49 50 50 /* e1000_pci_tbl - PCI Device ID Table 51 51 * ··· 112 112 int e1000_setup_all_rx_resources(struct e1000_adapter *adapter); 113 113 void e1000_free_all_tx_resources(struct e1000_adapter *adapter); 114 114 void e1000_free_all_rx_resources(struct e1000_adapter *adapter); 115 - int e1000_setup_tx_resources(struct e1000_adapter *adapter, 116 - struct e1000_tx_ring *txdr); 117 - int e1000_setup_rx_resources(struct e1000_adapter *adapter, 118 - struct e1000_rx_ring *rxdr); 119 - void e1000_free_tx_resources(struct e1000_adapter *adapter, 120 - struct e1000_tx_ring *tx_ring); 121 - void e1000_free_rx_resources(struct e1000_adapter *adapter, 122 - struct e1000_rx_ring *rx_ring); 115 + static int e1000_setup_tx_resources(struct e1000_adapter *adapter, 116 + struct e1000_tx_ring *txdr); 117 + static int e1000_setup_rx_resources(struct e1000_adapter *adapter, 118 + struct e1000_rx_ring *rxdr); 119 + static void e1000_free_tx_resources(struct e1000_adapter *adapter, 120 + struct e1000_tx_ring *tx_ring); 121 + static void e1000_free_rx_resources(struct e1000_adapter *adapter, 122 + struct e1000_rx_ring *rx_ring); 123 123 void e1000_update_stats(struct e1000_adapter *adapter); 124 124 125 125 /* Local Function Prototypes */ ··· 296 296 E1000_WRITE_FLUSH(&adapter->hw); 297 297 } 298 298 } 299 - void 299 + 300 + static void 300 301 e1000_update_mng_vlan(struct e1000_adapter *adapter) 301 302 { 302 303 struct net_device *netdev = adapter->netdev; ··· 1142 1141 * Return 0 on success, negative on failure 1143 1142 **/ 1144 1143 1145 - int 1144 + static int 1146 1145 e1000_setup_tx_resources(struct e1000_adapter *adapter, 1147 1146 struct e1000_tx_ring *txdr) 1148 1147 { ··· 1360 1359 * Returns 0 on success, negative on failure 1361 1360 **/ 1362 1361 1363 - int 1362 + static int 1364 1363 e1000_setup_rx_resources(struct e1000_adapter *adapter, 1365 1364 struct e1000_rx_ring *rxdr) 1366 1365 { ··· 1748 1747 * Free all transmit software resources 1749 1748 **/ 1750 1749 1751 - void 1750 + static void 1752 1751 e1000_free_tx_resources(struct e1000_adapter *adapter, 1753 1752 struct e1000_tx_ring *tx_ring) 1754 1753 { ··· 1859 1858 * Free all receive software resources 1860 1859 **/ 1861 1860 1862 - void 1861 + static void 1863 1862 e1000_free_rx_resources(struct e1000_adapter *adapter, 1864 1863 struct e1000_rx_ring *rx_ring) 1865 1864 {