aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ixgb
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2010-09-23 01:40:09 -0400
committerDavid S. Miller <davem@davemloft.net>2010-09-26 21:34:29 -0400
commit807540baae406c84dcb9c1c8ef07a56d2d2ae84a (patch)
treeccd5c2cb57710dd6b73cf8df11eedf67abc14ae4 /drivers/net/ixgb
parentcb4dfe562cac6fcb544df752e40c1d78000d0712 (diff)
drivers/net: return operator cleanup
Change "return (EXPR);" to "return EXPR;" return is not a function, parentheses are not required. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ixgb')
-rw-r--r--drivers/net/ixgb/ixgb_ee.c32
-rw-r--r--drivers/net/ixgb/ixgb_ethtool.c2
-rw-r--r--drivers/net/ixgb/ixgb_hw.c14
3 files changed, 24 insertions, 24 deletions
diff --git a/drivers/net/ixgb/ixgb_ee.c b/drivers/net/ixgb/ixgb_ee.c
index 813993f9c65c..c982ab9f9005 100644
--- a/drivers/net/ixgb/ixgb_ee.c
+++ b/drivers/net/ixgb/ixgb_ee.c
@@ -296,12 +296,12 @@ ixgb_wait_eeprom_command(struct ixgb_hw *hw)
296 eecd_reg = IXGB_READ_REG(hw, EECD); 296 eecd_reg = IXGB_READ_REG(hw, EECD);
297 297
298 if (eecd_reg & IXGB_EECD_DO) 298 if (eecd_reg & IXGB_EECD_DO)
299 return (true); 299 return true;
300 300
301 udelay(50); 301 udelay(50);
302 } 302 }
303 ASSERT(0); 303 ASSERT(0);
304 return (false); 304 return false;
305} 305}
306 306
307/****************************************************************************** 307/******************************************************************************
@@ -327,9 +327,9 @@ ixgb_validate_eeprom_checksum(struct ixgb_hw *hw)
327 checksum += ixgb_read_eeprom(hw, i); 327 checksum += ixgb_read_eeprom(hw, i);
328 328
329 if (checksum == (u16) EEPROM_SUM) 329 if (checksum == (u16) EEPROM_SUM)
330 return (true); 330 return true;
331 else 331 else
332 return (false); 332 return false;
333} 333}
334 334
335/****************************************************************************** 335/******************************************************************************
@@ -439,7 +439,7 @@ ixgb_read_eeprom(struct ixgb_hw *hw,
439 /* End this read operation */ 439 /* End this read operation */
440 ixgb_standby_eeprom(hw); 440 ixgb_standby_eeprom(hw);
441 441
442 return (data); 442 return data;
443} 443}
444 444
445/****************************************************************************** 445/******************************************************************************
@@ -476,16 +476,16 @@ ixgb_get_eeprom_data(struct ixgb_hw *hw)
476 /* clear the init_ctrl_reg_1 to signify that the cache is 476 /* clear the init_ctrl_reg_1 to signify that the cache is
477 * invalidated */ 477 * invalidated */
478 ee_map->init_ctrl_reg_1 = cpu_to_le16(EEPROM_ICW1_SIGNATURE_CLEAR); 478 ee_map->init_ctrl_reg_1 = cpu_to_le16(EEPROM_ICW1_SIGNATURE_CLEAR);
479 return (false); 479 return false;
480 } 480 }
481 481
482 if ((ee_map->init_ctrl_reg_1 & cpu_to_le16(EEPROM_ICW1_SIGNATURE_MASK)) 482 if ((ee_map->init_ctrl_reg_1 & cpu_to_le16(EEPROM_ICW1_SIGNATURE_MASK))
483 != cpu_to_le16(EEPROM_ICW1_SIGNATURE_VALID)) { 483 != cpu_to_le16(EEPROM_ICW1_SIGNATURE_VALID)) {
484 pr_debug("Signature invalid\n"); 484 pr_debug("Signature invalid\n");
485 return(false); 485 return false;
486 } 486 }
487 487
488 return(true); 488 return true;
489} 489}
490 490
491/****************************************************************************** 491/******************************************************************************
@@ -505,7 +505,7 @@ ixgb_check_and_get_eeprom_data (struct ixgb_hw* hw)
505 505
506 if ((ee_map->init_ctrl_reg_1 & cpu_to_le16(EEPROM_ICW1_SIGNATURE_MASK)) 506 if ((ee_map->init_ctrl_reg_1 & cpu_to_le16(EEPROM_ICW1_SIGNATURE_MASK))
507 == cpu_to_le16(EEPROM_ICW1_SIGNATURE_VALID)) { 507 == cpu_to_le16(EEPROM_ICW1_SIGNATURE_VALID)) {
508 return (true); 508 return true;
509 } else { 509 } else {
510 return ixgb_get_eeprom_data(hw); 510 return ixgb_get_eeprom_data(hw);
511 } 511 }
@@ -526,10 +526,10 @@ ixgb_get_eeprom_word(struct ixgb_hw *hw, u16 index)
526 526
527 if ((index < IXGB_EEPROM_SIZE) && 527 if ((index < IXGB_EEPROM_SIZE) &&
528 (ixgb_check_and_get_eeprom_data(hw) == true)) { 528 (ixgb_check_and_get_eeprom_data(hw) == true)) {
529 return(hw->eeprom[index]); 529 return hw->eeprom[index];
530 } 530 }
531 531
532 return(0); 532 return 0;
533} 533}
534 534
535/****************************************************************************** 535/******************************************************************************
@@ -570,10 +570,10 @@ u32
570ixgb_get_ee_pba_number(struct ixgb_hw *hw) 570ixgb_get_ee_pba_number(struct ixgb_hw *hw)
571{ 571{
572 if (ixgb_check_and_get_eeprom_data(hw) == true) 572 if (ixgb_check_and_get_eeprom_data(hw) == true)
573 return (le16_to_cpu(hw->eeprom[EEPROM_PBA_1_2_REG]) 573 return le16_to_cpu(hw->eeprom[EEPROM_PBA_1_2_REG])
574 | (le16_to_cpu(hw->eeprom[EEPROM_PBA_3_4_REG])<<16)); 574 | (le16_to_cpu(hw->eeprom[EEPROM_PBA_3_4_REG])<<16);
575 575
576 return(0); 576 return 0;
577} 577}
578 578
579 579
@@ -591,8 +591,8 @@ ixgb_get_ee_device_id(struct ixgb_hw *hw)
591 struct ixgb_ee_map_type *ee_map = (struct ixgb_ee_map_type *)hw->eeprom; 591 struct ixgb_ee_map_type *ee_map = (struct ixgb_ee_map_type *)hw->eeprom;
592 592
593 if (ixgb_check_and_get_eeprom_data(hw) == true) 593 if (ixgb_check_and_get_eeprom_data(hw) == true)
594 return (le16_to_cpu(ee_map->device_id)); 594 return le16_to_cpu(ee_map->device_id);
595 595
596 return (0); 596 return 0;
597} 597}
598 598
diff --git a/drivers/net/ixgb/ixgb_ethtool.c b/drivers/net/ixgb/ixgb_ethtool.c
index a4ed96caae69..43994c199991 100644
--- a/drivers/net/ixgb/ixgb_ethtool.c
+++ b/drivers/net/ixgb/ixgb_ethtool.c
@@ -410,7 +410,7 @@ static int
410ixgb_get_eeprom_len(struct net_device *netdev) 410ixgb_get_eeprom_len(struct net_device *netdev)
411{ 411{
412 /* return size in bytes */ 412 /* return size in bytes */
413 return (IXGB_EEPROM_SIZE << 1); 413 return IXGB_EEPROM_SIZE << 1;
414} 414}
415 415
416static int 416static int
diff --git a/drivers/net/ixgb/ixgb_hw.c b/drivers/net/ixgb/ixgb_hw.c
index 397acabccab6..6cb2e42ff4c1 100644
--- a/drivers/net/ixgb/ixgb_hw.c
+++ b/drivers/net/ixgb/ixgb_hw.c
@@ -167,7 +167,7 @@ ixgb_adapter_stop(struct ixgb_hw *hw)
167 /* Clear any pending interrupt events. */ 167 /* Clear any pending interrupt events. */
168 icr_reg = IXGB_READ_REG(hw, ICR); 168 icr_reg = IXGB_READ_REG(hw, ICR);
169 169
170 return (ctrl_reg & IXGB_CTRL0_RST); 170 return ctrl_reg & IXGB_CTRL0_RST;
171} 171}
172 172
173 173
@@ -209,7 +209,7 @@ ixgb_identify_xpak_vendor(struct ixgb_hw *hw)
209 xpak_vendor = ixgb_xpak_vendor_infineon; 209 xpak_vendor = ixgb_xpak_vendor_infineon;
210 } 210 }
211 211
212 return (xpak_vendor); 212 return xpak_vendor;
213} 213}
214 214
215/****************************************************************************** 215/******************************************************************************
@@ -273,7 +273,7 @@ ixgb_identify_phy(struct ixgb_hw *hw)
273 if (hw->subsystem_vendor_id == SUN_SUBVENDOR_ID) 273 if (hw->subsystem_vendor_id == SUN_SUBVENDOR_ID)
274 phy_type = ixgb_phy_type_bcm; 274 phy_type = ixgb_phy_type_bcm;
275 275
276 return (phy_type); 276 return phy_type;
277} 277}
278 278
279/****************************************************************************** 279/******************************************************************************
@@ -366,7 +366,7 @@ ixgb_init_hw(struct ixgb_hw *hw)
366 /* 82597EX errata: Call check-for-link in case lane deskew is locked */ 366 /* 82597EX errata: Call check-for-link in case lane deskew is locked */
367 ixgb_check_for_link(hw); 367 ixgb_check_for_link(hw);
368 368
369 return (status); 369 return status;
370} 370}
371 371
372/****************************************************************************** 372/******************************************************************************
@@ -531,7 +531,7 @@ ixgb_hash_mc_addr(struct ixgb_hw *hw,
531 } 531 }
532 532
533 hash_value &= 0xFFF; 533 hash_value &= 0xFFF;
534 return (hash_value); 534 return hash_value;
535} 535}
536 536
537/****************************************************************************** 537/******************************************************************************
@@ -715,7 +715,7 @@ ixgb_setup_fc(struct ixgb_hw *hw)
715 } 715 }
716 IXGB_WRITE_REG(hw, FCRTH, hw->fc.high_water); 716 IXGB_WRITE_REG(hw, FCRTH, hw->fc.high_water);
717 } 717 }
718 return (status); 718 return status;
719} 719}
720 720
721/****************************************************************************** 721/******************************************************************************
@@ -1140,7 +1140,7 @@ mac_addr_valid(u8 *mac_addr)
1140 pr_debug("MAC address is all zeros\n"); 1140 pr_debug("MAC address is all zeros\n");
1141 is_valid = false; 1141 is_valid = false;
1142 } 1142 }
1143 return (is_valid); 1143 return is_valid;
1144} 1144}
1145 1145
1146/****************************************************************************** 1146/******************************************************************************