public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: style fix for octeon/ethernet-tx.c
@ 2015-07-10  0:46 Jacob Kiefer
  2015-07-10  4:55 ` Sudip Mukherjee
  0 siblings, 1 reply; 3+ messages in thread
From: Jacob Kiefer @ 2015-07-10  0:46 UTC (permalink / raw)
  Cc: Jacob Kiefer, Greg Kroah-Hartman, Aaro Koskinen, Paul Martin,
	Ralf Baechle, Roberto Medina, open list:STAGING SUBSYSTEM,
	open list

From: Jacob Kiefer <jtk54@cornell.edu>

Style fix for octeon/ethernet-tx.c

Signed-off-by: Jacob Kiefer <jtk54@cornell.edu>
---
 drivers/staging/octeon/ethernet-tx.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/octeon/ethernet-tx.c b/drivers/staging/octeon/ethernet-tx.c
index 7c1c1b0..e2df041 100644
--- a/drivers/staging/octeon/ethernet-tx.c
+++ b/drivers/staging/octeon/ethernet-tx.c
@@ -396,10 +396,12 @@ dont_put_skbuff_in_hw:
 
 	/* Check if we can use the hardware checksumming */
 	if ((skb->protocol == htons(ETH_P_IP)) &&
-	    (ip_hdr(skb)->version == 4) && (ip_hdr(skb)->ihl == 5) &&
-	    ((ip_hdr(skb)->frag_off == 0) || (ip_hdr(skb)->frag_off == htons(1 << 14)))
-	    && ((ip_hdr(skb)->protocol == IPPROTO_TCP)
-		|| (ip_hdr(skb)->protocol == IPPROTO_UDP))) {
+	    (ip_hdr(skb)->version == 4) &&
+	    (ip_hdr(skb)->ihl == 5) &&
+	    ((ip_hdr(skb)->frag_off == 0) ||
+	     (ip_hdr(skb)->frag_off == htons(1 << 14))) &&
+	    ((ip_hdr(skb)->protocol == IPPROTO_TCP) ||
+	     (ip_hdr(skb)->protocol == IPPROTO_UDP))) {
 		/* Use hardware checksum calc */
 		pko_command.s.ipoffp1 = sizeof(struct ethhdr) + 1;
 	}
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread
* [PATCH] staging: style fix for octeon/ethernet-tx.c
@ 2015-07-10  5:26 Jacob Kiefer
  0 siblings, 0 replies; 3+ messages in thread
From: Jacob Kiefer @ 2015-07-10  5:26 UTC (permalink / raw)
  To: sudipm.mukherjee
  Cc: Jacob Kiefer, Greg Kroah-Hartman, Aaro Koskinen, Paul Martin,
	Ralf Baechle, Roberto Medina, open list:STAGING SUBSYSTEM,
	open list

Broke line with greater than 80 characters into two lines and
improved logical operator readability in hardware checksum if statement.

Signed-off-by: Jacob Kiefer <jtk54@cornell.edu>
---
 drivers/staging/octeon/ethernet-tx.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/octeon/ethernet-tx.c b/drivers/staging/octeon/ethernet-tx.c
index 7c1c1b0..e2df041 100644
--- a/drivers/staging/octeon/ethernet-tx.c
+++ b/drivers/staging/octeon/ethernet-tx.c
@@ -396,10 +396,12 @@ dont_put_skbuff_in_hw:
 
 	/* Check if we can use the hardware checksumming */
 	if ((skb->protocol == htons(ETH_P_IP)) &&
-	    (ip_hdr(skb)->version == 4) && (ip_hdr(skb)->ihl == 5) &&
-	    ((ip_hdr(skb)->frag_off == 0) || (ip_hdr(skb)->frag_off == htons(1 << 14)))
-	    && ((ip_hdr(skb)->protocol == IPPROTO_TCP)
-		|| (ip_hdr(skb)->protocol == IPPROTO_UDP))) {
+	    (ip_hdr(skb)->version == 4) &&
+	    (ip_hdr(skb)->ihl == 5) &&
+	    ((ip_hdr(skb)->frag_off == 0) ||
+	     (ip_hdr(skb)->frag_off == htons(1 << 14))) &&
+	    ((ip_hdr(skb)->protocol == IPPROTO_TCP) ||
+	     (ip_hdr(skb)->protocol == IPPROTO_UDP))) {
 		/* Use hardware checksum calc */
 		pko_command.s.ipoffp1 = sizeof(struct ethhdr) + 1;
 	}
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-07-10  5:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-10  0:46 [PATCH] staging: style fix for octeon/ethernet-tx.c Jacob Kiefer
2015-07-10  4:55 ` Sudip Mukherjee
  -- strict thread matches above, loose matches on Subject: below --
2015-07-10  5:26 Jacob Kiefer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox