Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1452799 > unrolled thread

[PATCH 1/1] net: s2io: simplify logical constraint

Started byHeinrich Schuchardt <xypron.glpk@gmx.de>
First post2016-07-31 12:00 +0200
Last post2016-08-01 22:50 +0200
Articles 3 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 1/1] net: s2io: simplify logical constraint Heinrich Schuchardt <xypron.glpk@gmx.de> - 2016-07-31 12:00 +0200
    Re: [PATCH 1/1] net: s2io: simplify logical constraint Jon Mason <jdmason@kudzu.us> - 2016-08-01 18:40 +0200
    Re: [PATCH 1/1] net: s2io: simplify logical constraint David Miller <davem@davemloft.net> - 2016-08-01 22:50 +0200

#1452799 — [PATCH 1/1] net: s2io: simplify logical constraint

FromHeinrich Schuchardt <xypron.glpk@gmx.de>
Date2016-07-31 12:00 +0200
Subject[PATCH 1/1] net: s2io: simplify logical constraint
Message-ID<s0VHk-6Rl-3@gated-at.bofh.it>
(!A || (A && B)) is equivalent to (!A || B)

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

diff --git a/drivers/net/ethernet/neterion/s2io.c b/drivers/net/ethernet/neterion/s2io.c
index 2874dff..eaa37c0 100644
--- a/drivers/net/ethernet/neterion/s2io.c
+++ b/drivers/net/ethernet/neterion/s2io.c
@@ -7412,7 +7412,7 @@ static int rx_osm_handler(struct ring_info *ring_data, struct RxD_t * rxdp)
 
 	if ((rxdp->Control_1 & TCP_OR_UDP_FRAME) &&
 	    ((!ring_data->lro) ||
-	     (ring_data->lro && (!(rxdp->Control_1 & RXD_FRAME_IP_FRAG)))) &&
+	     (!(rxdp->Control_1 & RXD_FRAME_IP_FRAG))) &&
 	    (dev->features & NETIF_F_RXCSUM)) {
 		l3_csum = RXD_GET_L3_CKSUM(rxdp->Control_1);
 		l4_csum = RXD_GET_L4_CKSUM(rxdp->Control_1);
-- 
2.8.1

[toc] | [next] | [standalone]


#1453305

FromJon Mason <jdmason@kudzu.us>
Date2016-08-01 18:40 +0200
Message-ID<s1opX-ih-19@gated-at.bofh.it>
In reply to#1452799
On Sun, Jul 31, 2016 at 5:53 AM, Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
> (!A || (A && B)) is equivalent to (!A || B)

Seems logical to me.

Acked-by: Jon Mason <jdmason@kudzu.us>

> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> ---
>  drivers/net/ethernet/neterion/s2io.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/neterion/s2io.c b/drivers/net/ethernet/neterion/s2io.c
> index 2874dff..eaa37c0 100644
> --- a/drivers/net/ethernet/neterion/s2io.c
> +++ b/drivers/net/ethernet/neterion/s2io.c
> @@ -7412,7 +7412,7 @@ static int rx_osm_handler(struct ring_info *ring_data, struct RxD_t * rxdp)
>
>         if ((rxdp->Control_1 & TCP_OR_UDP_FRAME) &&
>             ((!ring_data->lro) ||
> -            (ring_data->lro && (!(rxdp->Control_1 & RXD_FRAME_IP_FRAG)))) &&
> +            (!(rxdp->Control_1 & RXD_FRAME_IP_FRAG))) &&
>             (dev->features & NETIF_F_RXCSUM)) {
>                 l3_csum = RXD_GET_L3_CKSUM(rxdp->Control_1);
>                 l4_csum = RXD_GET_L4_CKSUM(rxdp->Control_1);
> --
> 2.8.1
>

[toc] | [prev] | [next] | [standalone]


#1453453

FromDavid Miller <davem@davemloft.net>
Date2016-08-01 22:50 +0200
Message-ID<s1sjT-2WL-5@gated-at.bofh.it>
In reply to#1452799
From: Heinrich Schuchardt <xypron.glpk@gmx.de>
Date: Sun, 31 Jul 2016 11:53:57 +0200

> (!A || (A && B)) is equivalent to (!A || B)
> 
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>

Applied.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web