[PATCH net-next] net: tg3: fix redundant check of true expression

Subsystems: broadcom tg3 gigabit ethernet driver, networking drivers, the rest

STALE1773d LANDED

Landed in mainline as 6ed3f61e3200 on 2021-10-08.

3 messages, 3 authors, 2021-10-09 · open the first message on its own page

[PATCH net-next] net: tg3: fix redundant check of true expression

From: Jεan Sacren <hidden>
Date: 2021-10-08 06:32:11

From: Jean Sacren <redacted>

Remove the redundant check of (tg3_asic_rev(tp) == ASIC_REV_5705) after
it is checked to be true.

Signed-off-by: Jean Sacren <redacted>
---
 drivers/net/ethernet/broadcom/tg3.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c
index 5a50ea75094f..32d486114a6d 100644
--- a/drivers/net/ethernet/broadcom/tg3.c
+++ b/drivers/net/ethernet/broadcom/tg3.c
@@ -10273,8 +10273,7 @@ static int tg3_reset_hw(struct tg3 *tp, bool reset_phy)
 
 	if (tg3_asic_rev(tp) == ASIC_REV_5705 &&
 	    tg3_chip_rev_id(tp) != CHIPREV_ID_5705_A0) {
-		if (tg3_flag(tp, TSO_CAPABLE) &&
-		    tg3_asic_rev(tp) == ASIC_REV_5705) {
+		if (tg3_flag(tp, TSO_CAPABLE)) {
 			rdmac_mode |= RDMAC_MODE_FIFO_SIZE_128;
 		} else if (!(tr32(TG3PCI_PCISTATE) & PCISTATE_BUS_SPEED_HIGH) &&
 			   !tg3_flag(tp, IS_5788)) {

Re: [PATCH net-next] net: tg3: fix redundant check of true expression

From: Michael Chan <michael.chan@broadcom.com>
Date: 2021-10-08 08:03:46

On Thu, Oct 7, 2021 at 11:32 PM Jεan Sacren [off-list ref] wrote:
From: Jean Sacren <redacted>

Remove the redundant check of (tg3_asic_rev(tp) == ASIC_REV_5705) after
it is checked to be true.

Signed-off-by: Jean Sacren <redacted>
Thanks.
Reviewed-by: Michael Chan <michael.chan@broadcom.com>

Re: [PATCH net-next] net: tg3: fix redundant check of true expression

From: patchwork-bot+netdevbpf@kernel.org
Date: 2021-10-09 00:00:10

Hello:

This patch was applied to netdev/net-next.git (master)
by Jakub Kicinski [off-list ref]:

On Fri,  8 Oct 2021 00:31:47 -0600 you wrote:
From: Jean Sacren <redacted>

Remove the redundant check of (tg3_asic_rev(tp) == ASIC_REV_5705) after
it is checked to be true.

Signed-off-by: Jean Sacren <redacted>

[...]
Here is the summary with links:
  - [net-next] net: tg3: fix redundant check of true expression
    https://git.kernel.org/netdev/net-next/c/6ed3f61e3200

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help