Skip to content

Commit 90a1bb9

Browse files
andy-shevdavem330
authored andcommitted
bnx2x: Get rid of useless temporary variable
Replace pattern int status; ... status = func(...); return status; by return func(...); No functional change intented. Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent b77f016 commit 90a1bb9

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10618,22 +10618,19 @@ static u8 bnx2x_848xx_read_status(struct bnx2x_phy *phy,
1061810618

1061910619
static int bnx2x_8485x_format_ver(u32 raw_ver, u8 *str, u16 *len)
1062010620
{
10621-
int status = 0;
1062210621
u32 num;
1062310622

1062410623
num = ((raw_ver & 0xF80) >> 7) << 16 | ((raw_ver & 0x7F) << 8) |
1062510624
((raw_ver & 0xF000) >> 12);
10626-
status = bnx2x_3_seq_format_ver(num, str, len);
10627-
return status;
10625+
return bnx2x_3_seq_format_ver(num, str, len);
1062810626
}
1062910627

1063010628
static int bnx2x_848xx_format_ver(u32 raw_ver, u8 *str, u16 *len)
1063110629
{
10632-
int status = 0;
1063310630
u32 spirom_ver;
10631+
1063410632
spirom_ver = ((raw_ver & 0xF80) >> 7) << 16 | (raw_ver & 0x7F);
10635-
status = bnx2x_format_ver(spirom_ver, str, len);
10636-
return status;
10633+
return bnx2x_format_ver(spirom_ver, str, len);
1063710634
}
1063810635

1063910636
static void bnx2x_8481_hw_reset(struct bnx2x_phy *phy,
@@ -12484,13 +12481,12 @@ static int bnx2x_populate_ext_phy(struct bnx2x *bp,
1248412481
static int bnx2x_populate_phy(struct bnx2x *bp, u8 phy_index, u32 shmem_base,
1248512482
u32 shmem2_base, u8 port, struct bnx2x_phy *phy)
1248612483
{
12487-
int status = 0;
1248812484
phy->type = PORT_HW_CFG_XGXS_EXT_PHY_TYPE_NOT_CONN;
1248912485
if (phy_index == INT_PHY)
1249012486
return bnx2x_populate_int_phy(bp, shmem_base, port, phy);
12491-
status = bnx2x_populate_ext_phy(bp, phy_index, shmem_base, shmem2_base,
12487+
12488+
return bnx2x_populate_ext_phy(bp, phy_index, shmem_base, shmem2_base,
1249212489
port, phy);
12493-
return status;
1249412490
}
1249512491

1249612492
static void bnx2x_phy_def_cfg(struct link_params *params,

0 commit comments

Comments
 (0)