diff mbox series

[U-Boot,1/1] net: macb: remove superfluous logical constraint

Message ID 20180318103253.9872-1-xypron.glpk@gmx.de
State Accepted
Commit 6cdf072d9e6211cc71bcb8af647cc92a865582a4
Delegated to: Joe Hershberger
Headers show
Series [U-Boot,1/1] net: macb: remove superfluous logical constraint | expand

Commit Message

Heinrich Schuchardt March 18, 2018, 10:32 a.m. UTC
In

	if (a > =0) {...}
	else (a < 0) {...}

the second logical constraint is superfluous.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---
 drivers/net/macb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Joe Hershberger March 19, 2018, 8:23 p.m. UTC | #1
On Sun, Mar 18, 2018 at 5:32 AM, Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
> In
>
>         if (a > =0) {...}
>         else (a < 0) {...}
>
> the second logical constraint is superfluous.
>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>

Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Joe Hershberger March 26, 2018, 7:26 p.m. UTC | #2
Hi Heinrich,

https://patchwork.ozlabs.org/patch/887357/ was applied to http://git.denx.de/?p=u-boot/u-boot-net.git

Thanks!
-Joe
diff mbox series

Patch

diff --git a/drivers/net/macb.c b/drivers/net/macb.c
index e62aefcd0d..fe370bf728 100644
--- a/drivers/net/macb.c
+++ b/drivers/net/macb.c
@@ -915,7 +915,7 @@  static int macb_recv(struct eth_device *netdev)
 		if (length >= 0) {
 			net_process_received_packet(packet, length);
 			reclaim_rx_buffers(macb, macb->next_rx_tail);
-		} else if (length < 0) {
+		} else {
 			return length;
 		}
 	}