diff options
author | Bruce Allan <bruce.w.allan@intel.com> | 2009-11-20 18:26:44 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-11-21 14:34:18 -0500 |
commit | 564ea9bba1a1380d5474504bcd943ee84075534f (patch) | |
tree | 8378c606230b63ad403927ba4018fb2eb588efb6 /drivers/net | |
parent | 84efb7b968ab91d0099620865b3f563eb0ddf5a6 (diff) |
e1000e: set bools to true/false instead of 1/0
Set booleans to 'true' or 'false' to make it clear it is a boolean. Also
change instances of TRUE/FALSE in comments to lowercase true/false.
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/e1000e/82571.c | 7 | ||||
-rw-r--r-- | drivers/net/e1000e/es2lan.c | 3 | ||||
-rw-r--r-- | drivers/net/e1000e/ich8lan.c | 18 | ||||
-rw-r--r-- | drivers/net/e1000e/lib.c | 24 | ||||
-rw-r--r-- | drivers/net/e1000e/phy.c | 6 |
5 files changed, 30 insertions, 28 deletions
diff --git a/drivers/net/e1000e/82571.c b/drivers/net/e1000e/82571.c index 0e8aa3441b97..468dd7d4fcad 100644 --- a/drivers/net/e1000e/82571.c +++ b/drivers/net/e1000e/82571.c | |||
@@ -230,7 +230,8 @@ static s32 e1000_init_mac_params_82571(struct e1000_adapter *adapter) | |||
230 | /* Set rar entry count */ | 230 | /* Set rar entry count */ |
231 | mac->rar_entry_count = E1000_RAR_ENTRIES; | 231 | mac->rar_entry_count = E1000_RAR_ENTRIES; |
232 | /* Set if manageability features are enabled. */ | 232 | /* Set if manageability features are enabled. */ |
233 | mac->arc_subsystem_valid = (er32(FWSM) & E1000_FWSM_MODE_MASK) ? 1 : 0; | 233 | mac->arc_subsystem_valid = (er32(FWSM) & E1000_FWSM_MODE_MASK) |
234 | ? true : false; | ||
234 | 235 | ||
235 | /* check for link */ | 236 | /* check for link */ |
236 | switch (hw->phy.media_type) { | 237 | switch (hw->phy.media_type) { |
@@ -753,7 +754,7 @@ static s32 e1000_get_cfg_done_82571(struct e1000_hw *hw) | |||
753 | /** | 754 | /** |
754 | * e1000_set_d0_lplu_state_82571 - Set Low Power Linkup D0 state | 755 | * e1000_set_d0_lplu_state_82571 - Set Low Power Linkup D0 state |
755 | * @hw: pointer to the HW structure | 756 | * @hw: pointer to the HW structure |
756 | * @active: TRUE to enable LPLU, FALSE to disable | 757 | * @active: true to enable LPLU, false to disable |
757 | * | 758 | * |
758 | * Sets the LPLU D0 state according to the active flag. When activating LPLU | 759 | * Sets the LPLU D0 state according to the active flag. When activating LPLU |
759 | * this function also disables smart speed and vice versa. LPLU will not be | 760 | * this function also disables smart speed and vice versa. LPLU will not be |
@@ -1521,7 +1522,7 @@ static s32 e1000_valid_led_default_82571(struct e1000_hw *hw, u16 *data) | |||
1521 | bool e1000e_get_laa_state_82571(struct e1000_hw *hw) | 1522 | bool e1000e_get_laa_state_82571(struct e1000_hw *hw) |
1522 | { | 1523 | { |
1523 | if (hw->mac.type != e1000_82571) | 1524 | if (hw->mac.type != e1000_82571) |
1524 | return 0; | 1525 | return false; |
1525 | 1526 | ||
1526 | return hw->dev_spec.e82571.laa_is_present; | 1527 | return hw->dev_spec.e82571.laa_is_present; |
1527 | } | 1528 | } |
diff --git a/drivers/net/e1000e/es2lan.c b/drivers/net/e1000e/es2lan.c index 2d1415610d77..795d433e656f 100644 --- a/drivers/net/e1000e/es2lan.c +++ b/drivers/net/e1000e/es2lan.c | |||
@@ -213,7 +213,8 @@ static s32 e1000_init_mac_params_80003es2lan(struct e1000_adapter *adapter) | |||
213 | /* Set rar entry count */ | 213 | /* Set rar entry count */ |
214 | mac->rar_entry_count = E1000_RAR_ENTRIES; | 214 | mac->rar_entry_count = E1000_RAR_ENTRIES; |
215 | /* Set if manageability features are enabled. */ | 215 | /* Set if manageability features are enabled. */ |
216 | mac->arc_subsystem_valid = (er32(FWSM) & E1000_FWSM_MODE_MASK) ? 1 : 0; | 216 | mac->arc_subsystem_valid = (er32(FWSM) & E1000_FWSM_MODE_MASK) |
217 | ? true : false; | ||
217 | 218 | ||
218 | /* check for link */ | 219 | /* check for link */ |
219 | switch (hw->phy.media_type) { | 220 | switch (hw->phy.media_type) { |
diff --git a/drivers/net/e1000e/ich8lan.c b/drivers/net/e1000e/ich8lan.c index 191a4e39d289..f8ee0f29d237 100644 --- a/drivers/net/e1000e/ich8lan.c +++ b/drivers/net/e1000e/ich8lan.c | |||
@@ -401,7 +401,7 @@ static s32 e1000_init_nvm_params_ich8lan(struct e1000_hw *hw) | |||
401 | 401 | ||
402 | /* Clear shadow ram */ | 402 | /* Clear shadow ram */ |
403 | for (i = 0; i < nvm->word_size; i++) { | 403 | for (i = 0; i < nvm->word_size; i++) { |
404 | dev_spec->shadow_ram[i].modified = 0; | 404 | dev_spec->shadow_ram[i].modified = false; |
405 | dev_spec->shadow_ram[i].value = 0xFFFF; | 405 | dev_spec->shadow_ram[i].value = 0xFFFF; |
406 | } | 406 | } |
407 | 407 | ||
@@ -430,7 +430,7 @@ static s32 e1000_init_mac_params_ich8lan(struct e1000_adapter *adapter) | |||
430 | if (mac->type == e1000_ich8lan) | 430 | if (mac->type == e1000_ich8lan) |
431 | mac->rar_entry_count--; | 431 | mac->rar_entry_count--; |
432 | /* Set if manageability features are enabled. */ | 432 | /* Set if manageability features are enabled. */ |
433 | mac->arc_subsystem_valid = 1; | 433 | mac->arc_subsystem_valid = true; |
434 | 434 | ||
435 | /* LED operations */ | 435 | /* LED operations */ |
436 | switch (mac->type) { | 436 | switch (mac->type) { |
@@ -464,7 +464,7 @@ static s32 e1000_init_mac_params_ich8lan(struct e1000_adapter *adapter) | |||
464 | 464 | ||
465 | /* Enable PCS Lock-loss workaround for ICH8 */ | 465 | /* Enable PCS Lock-loss workaround for ICH8 */ |
466 | if (mac->type == e1000_ich8lan) | 466 | if (mac->type == e1000_ich8lan) |
467 | e1000e_set_kmrn_lock_loss_workaround_ich8lan(hw, 1); | 467 | e1000e_set_kmrn_lock_loss_workaround_ich8lan(hw, true); |
468 | 468 | ||
469 | return 0; | 469 | return 0; |
470 | } | 470 | } |
@@ -1403,7 +1403,7 @@ out: | |||
1403 | /** | 1403 | /** |
1404 | * e1000_set_d0_lplu_state_ich8lan - Set Low Power Linkup D0 state | 1404 | * e1000_set_d0_lplu_state_ich8lan - Set Low Power Linkup D0 state |
1405 | * @hw: pointer to the HW structure | 1405 | * @hw: pointer to the HW structure |
1406 | * @active: TRUE to enable LPLU, FALSE to disable | 1406 | * @active: true to enable LPLU, false to disable |
1407 | * | 1407 | * |
1408 | * Sets the LPLU D0 state according to the active flag. When | 1408 | * Sets the LPLU D0 state according to the active flag. When |
1409 | * activating LPLU this function also disables smart speed | 1409 | * activating LPLU this function also disables smart speed |
@@ -1489,7 +1489,7 @@ static s32 e1000_set_d0_lplu_state_ich8lan(struct e1000_hw *hw, bool active) | |||
1489 | /** | 1489 | /** |
1490 | * e1000_set_d3_lplu_state_ich8lan - Set Low Power Linkup D3 state | 1490 | * e1000_set_d3_lplu_state_ich8lan - Set Low Power Linkup D3 state |
1491 | * @hw: pointer to the HW structure | 1491 | * @hw: pointer to the HW structure |
1492 | * @active: TRUE to enable LPLU, FALSE to disable | 1492 | * @active: true to enable LPLU, false to disable |
1493 | * | 1493 | * |
1494 | * Sets the LPLU D3 state according to the active flag. When | 1494 | * Sets the LPLU D3 state according to the active flag. When |
1495 | * activating LPLU this function also disables smart speed | 1495 | * activating LPLU this function also disables smart speed |
@@ -1952,7 +1952,7 @@ static s32 e1000_write_nvm_ich8lan(struct e1000_hw *hw, u16 offset, u16 words, | |||
1952 | nvm->ops.acquire(hw); | 1952 | nvm->ops.acquire(hw); |
1953 | 1953 | ||
1954 | for (i = 0; i < words; i++) { | 1954 | for (i = 0; i < words; i++) { |
1955 | dev_spec->shadow_ram[offset+i].modified = 1; | 1955 | dev_spec->shadow_ram[offset+i].modified = true; |
1956 | dev_spec->shadow_ram[offset+i].value = data[i]; | 1956 | dev_spec->shadow_ram[offset+i].value = data[i]; |
1957 | } | 1957 | } |
1958 | 1958 | ||
@@ -2111,7 +2111,7 @@ static s32 e1000_update_nvm_checksum_ich8lan(struct e1000_hw *hw) | |||
2111 | 2111 | ||
2112 | /* Great! Everything worked, we can now clear the cached entries. */ | 2112 | /* Great! Everything worked, we can now clear the cached entries. */ |
2113 | for (i = 0; i < E1000_ICH8_SHADOW_RAM_WORDS; i++) { | 2113 | for (i = 0; i < E1000_ICH8_SHADOW_RAM_WORDS; i++) { |
2114 | dev_spec->shadow_ram[i].modified = 0; | 2114 | dev_spec->shadow_ram[i].modified = false; |
2115 | dev_spec->shadow_ram[i].value = 0xFFFF; | 2115 | dev_spec->shadow_ram[i].value = 0xFFFF; |
2116 | } | 2116 | } |
2117 | 2117 | ||
@@ -3083,8 +3083,8 @@ static s32 e1000_kmrn_lock_loss_workaround_ich8lan(struct e1000_hw *hw) | |||
3083 | * @hw: pointer to the HW structure | 3083 | * @hw: pointer to the HW structure |
3084 | * @state: boolean value used to set the current Kumeran workaround state | 3084 | * @state: boolean value used to set the current Kumeran workaround state |
3085 | * | 3085 | * |
3086 | * If ICH8, set the current Kumeran workaround state (enabled - TRUE | 3086 | * If ICH8, set the current Kumeran workaround state (enabled - true |
3087 | * /disabled - FALSE). | 3087 | * /disabled - false). |
3088 | **/ | 3088 | **/ |
3089 | void e1000e_set_kmrn_lock_loss_workaround_ich8lan(struct e1000_hw *hw, | 3089 | void e1000e_set_kmrn_lock_loss_workaround_ich8lan(struct e1000_hw *hw, |
3090 | bool state) | 3090 | bool state) |
diff --git a/drivers/net/e1000e/lib.c b/drivers/net/e1000e/lib.c index 0c6ad0e67175..d173bf88cc94 100644 --- a/drivers/net/e1000e/lib.c +++ b/drivers/net/e1000e/lib.c | |||
@@ -371,7 +371,7 @@ s32 e1000e_check_for_copper_link(struct e1000_hw *hw) | |||
371 | if (!link) | 371 | if (!link) |
372 | return ret_val; /* No link detected */ | 372 | return ret_val; /* No link detected */ |
373 | 373 | ||
374 | mac->get_link_status = 0; | 374 | mac->get_link_status = false; |
375 | 375 | ||
376 | /* | 376 | /* |
377 | * Check if there was DownShift, must be checked | 377 | * Check if there was DownShift, must be checked |
@@ -1603,7 +1603,7 @@ void e1000e_reset_adaptive(struct e1000_hw *hw) | |||
1603 | mac->ifs_step_size = IFS_STEP; | 1603 | mac->ifs_step_size = IFS_STEP; |
1604 | mac->ifs_ratio = IFS_RATIO; | 1604 | mac->ifs_ratio = IFS_RATIO; |
1605 | 1605 | ||
1606 | mac->in_ifs_mode = 0; | 1606 | mac->in_ifs_mode = false; |
1607 | ew32(AIT, 0); | 1607 | ew32(AIT, 0); |
1608 | } | 1608 | } |
1609 | 1609 | ||
@@ -1620,7 +1620,7 @@ void e1000e_update_adaptive(struct e1000_hw *hw) | |||
1620 | 1620 | ||
1621 | if ((mac->collision_delta * mac->ifs_ratio) > mac->tx_packet_delta) { | 1621 | if ((mac->collision_delta * mac->ifs_ratio) > mac->tx_packet_delta) { |
1622 | if (mac->tx_packet_delta > MIN_NUM_XMITS) { | 1622 | if (mac->tx_packet_delta > MIN_NUM_XMITS) { |
1623 | mac->in_ifs_mode = 1; | 1623 | mac->in_ifs_mode = true; |
1624 | if (mac->current_ifs_val < mac->ifs_max_val) { | 1624 | if (mac->current_ifs_val < mac->ifs_max_val) { |
1625 | if (!mac->current_ifs_val) | 1625 | if (!mac->current_ifs_val) |
1626 | mac->current_ifs_val = mac->ifs_min_val; | 1626 | mac->current_ifs_val = mac->ifs_min_val; |
@@ -1634,7 +1634,7 @@ void e1000e_update_adaptive(struct e1000_hw *hw) | |||
1634 | if (mac->in_ifs_mode && | 1634 | if (mac->in_ifs_mode && |
1635 | (mac->tx_packet_delta <= MIN_NUM_XMITS)) { | 1635 | (mac->tx_packet_delta <= MIN_NUM_XMITS)) { |
1636 | mac->current_ifs_val = 0; | 1636 | mac->current_ifs_val = 0; |
1637 | mac->in_ifs_mode = 0; | 1637 | mac->in_ifs_mode = false; |
1638 | ew32(AIT, 0); | 1638 | ew32(AIT, 0); |
1639 | } | 1639 | } |
1640 | } | 1640 | } |
@@ -2277,7 +2277,7 @@ bool e1000e_enable_tx_pkt_filtering(struct e1000_hw *hw) | |||
2277 | 2277 | ||
2278 | /* No manageability, no filtering */ | 2278 | /* No manageability, no filtering */ |
2279 | if (!e1000e_check_mng_mode(hw)) { | 2279 | if (!e1000e_check_mng_mode(hw)) { |
2280 | hw->mac.tx_pkt_filtering = 0; | 2280 | hw->mac.tx_pkt_filtering = false; |
2281 | return 0; | 2281 | return 0; |
2282 | } | 2282 | } |
2283 | 2283 | ||
@@ -2287,7 +2287,7 @@ bool e1000e_enable_tx_pkt_filtering(struct e1000_hw *hw) | |||
2287 | */ | 2287 | */ |
2288 | ret_val = e1000_mng_enable_host_if(hw); | 2288 | ret_val = e1000_mng_enable_host_if(hw); |
2289 | if (ret_val != 0) { | 2289 | if (ret_val != 0) { |
2290 | hw->mac.tx_pkt_filtering = 0; | 2290 | hw->mac.tx_pkt_filtering = false; |
2291 | return ret_val; | 2291 | return ret_val; |
2292 | } | 2292 | } |
2293 | 2293 | ||
@@ -2306,17 +2306,17 @@ bool e1000e_enable_tx_pkt_filtering(struct e1000_hw *hw) | |||
2306 | * take the safe route of assuming Tx filtering is enabled. | 2306 | * take the safe route of assuming Tx filtering is enabled. |
2307 | */ | 2307 | */ |
2308 | if ((hdr_csum != csum) || (hdr->signature != E1000_IAMT_SIGNATURE)) { | 2308 | if ((hdr_csum != csum) || (hdr->signature != E1000_IAMT_SIGNATURE)) { |
2309 | hw->mac.tx_pkt_filtering = 1; | 2309 | hw->mac.tx_pkt_filtering = true; |
2310 | return 1; | 2310 | return 1; |
2311 | } | 2311 | } |
2312 | 2312 | ||
2313 | /* Cookie area is valid, make the final check for filtering. */ | 2313 | /* Cookie area is valid, make the final check for filtering. */ |
2314 | if (!(hdr->status & E1000_MNG_DHCP_COOKIE_STATUS_PARSING)) { | 2314 | if (!(hdr->status & E1000_MNG_DHCP_COOKIE_STATUS_PARSING)) { |
2315 | hw->mac.tx_pkt_filtering = 0; | 2315 | hw->mac.tx_pkt_filtering = false; |
2316 | return 0; | 2316 | return 0; |
2317 | } | 2317 | } |
2318 | 2318 | ||
2319 | hw->mac.tx_pkt_filtering = 1; | 2319 | hw->mac.tx_pkt_filtering = true; |
2320 | return 1; | 2320 | return 1; |
2321 | } | 2321 | } |
2322 | 2322 | ||
@@ -2473,7 +2473,7 @@ bool e1000e_enable_mng_pass_thru(struct e1000_hw *hw) | |||
2473 | { | 2473 | { |
2474 | u32 manc; | 2474 | u32 manc; |
2475 | u32 fwsm, factps; | 2475 | u32 fwsm, factps; |
2476 | bool ret_val = 0; | 2476 | bool ret_val = false; |
2477 | 2477 | ||
2478 | manc = er32(MANC); | 2478 | manc = er32(MANC); |
2479 | 2479 | ||
@@ -2488,13 +2488,13 @@ bool e1000e_enable_mng_pass_thru(struct e1000_hw *hw) | |||
2488 | if (!(factps & E1000_FACTPS_MNGCG) && | 2488 | if (!(factps & E1000_FACTPS_MNGCG) && |
2489 | ((fwsm & E1000_FWSM_MODE_MASK) == | 2489 | ((fwsm & E1000_FWSM_MODE_MASK) == |
2490 | (e1000_mng_mode_pt << E1000_FWSM_MODE_SHIFT))) { | 2490 | (e1000_mng_mode_pt << E1000_FWSM_MODE_SHIFT))) { |
2491 | ret_val = 1; | 2491 | ret_val = true; |
2492 | return ret_val; | 2492 | return ret_val; |
2493 | } | 2493 | } |
2494 | } else { | 2494 | } else { |
2495 | if ((manc & E1000_MANC_SMBUS_EN) && | 2495 | if ((manc & E1000_MANC_SMBUS_EN) && |
2496 | !(manc & E1000_MANC_ASF_EN)) { | 2496 | !(manc & E1000_MANC_ASF_EN)) { |
2497 | ret_val = 1; | 2497 | ret_val = true; |
2498 | return ret_val; | 2498 | return ret_val; |
2499 | } | 2499 | } |
2500 | } | 2500 | } |
diff --git a/drivers/net/e1000e/phy.c b/drivers/net/e1000e/phy.c index 440f366b73f6..99d53fae4307 100644 --- a/drivers/net/e1000e/phy.c +++ b/drivers/net/e1000e/phy.c | |||
@@ -834,7 +834,7 @@ s32 e1000e_copper_link_setup_igp(struct e1000_hw *hw) | |||
834 | msleep(100); | 834 | msleep(100); |
835 | 835 | ||
836 | /* disable lplu d0 during driver init */ | 836 | /* disable lplu d0 during driver init */ |
837 | ret_val = e1000_set_d0_lplu_state(hw, 0); | 837 | ret_val = e1000_set_d0_lplu_state(hw, false); |
838 | if (ret_val) { | 838 | if (ret_val) { |
839 | e_dbg("Error Disabling LPLU D0\n"); | 839 | e_dbg("Error Disabling LPLU D0\n"); |
840 | return ret_val; | 840 | return ret_val; |
@@ -1545,7 +1545,7 @@ s32 e1000e_check_downshift(struct e1000_hw *hw) | |||
1545 | break; | 1545 | break; |
1546 | default: | 1546 | default: |
1547 | /* speed downshift not supported */ | 1547 | /* speed downshift not supported */ |
1548 | phy->speed_downgraded = 0; | 1548 | phy->speed_downgraded = false; |
1549 | return 0; | 1549 | return 0; |
1550 | } | 1550 | } |
1551 | 1551 | ||
@@ -1907,7 +1907,7 @@ s32 e1000e_get_phy_info_igp(struct e1000_hw *hw) | |||
1907 | return -E1000_ERR_CONFIG; | 1907 | return -E1000_ERR_CONFIG; |
1908 | } | 1908 | } |
1909 | 1909 | ||
1910 | phy->polarity_correction = 1; | 1910 | phy->polarity_correction = true; |
1911 | 1911 | ||
1912 | ret_val = e1000_check_polarity_igp(hw); | 1912 | ret_val = e1000_check_polarity_igp(hw); |
1913 | if (ret_val) | 1913 | if (ret_val) |