- net-use-warn_on_once-for-checksum-checks.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     net: Use WARN_ON_ONCE for checksum checks

has been removed from the -mm tree.  Its filename is

     net-use-warn_on_once-for-checksum-checks.patch

This patch was dropped because it is obsolete

------------------------------------------------------
Subject: net: Use WARN_ON_ONCE for checksum checks
From: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>

Use the WARN_ON_ONCE macro rather than open-coding it.

Signed-off-by: Herbert Xu herbert@xxxxxxxxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 net/core/dev.c |   14 ++------------
 1 file changed, 2 insertions(+), 12 deletions(-)

diff -puN net/core/dev.c~net-use-warn_on_once-for-checksum-checks net/core/dev.c
--- a/net/core/dev.c~net-use-warn_on_once-for-checksum-checks
+++ a/net/core/dev.c
@@ -1165,12 +1165,7 @@ int skb_checksum_help(struct sk_buff *sk
 	if (inward)
 		goto out_set_summed;
 
-	if (unlikely(skb_shinfo(skb)->gso_size)) {
-		static int warned;
-
-		WARN_ON(!warned);
-		warned = 1;
-
+	if (WARN_ON_ONCE(skb_shinfo(skb)->gso_size)) {
 		/* Let GSO fix up the checksum. */
 		goto out_set_summed;
 	}
@@ -1219,12 +1214,7 @@ struct sk_buff *skb_gso_segment(struct s
 	skb->mac_len = skb->nh.raw - skb->data;
 	__skb_pull(skb, skb->mac_len);
 
-	if (unlikely(skb->ip_summed != CHECKSUM_HW)) {
-		static int warned;
-
-		WARN_ON(!warned);
-		warned = 1;
-
+	if (WARN_ON_ONCE(skb->ip_summed != CHECKSUM_HW)) {
 		if (skb_header_cloned(skb) &&
 		    (err = pskb_expand_head(skb, 0, 0, GFP_ATOMIC)))
 			return ERR_PTR(err);
_

Patches currently in -mm which might be from herbert@xxxxxxxxxxxxxxxxxxx are

origin.patch
lockdep-fix-sk_dst_check-deadlock.patch
git-cryptodev.patch
let-warn_on-warn_on_once-return-the-condition.patch
let-warn_on-warn_on_once-return-the-condition-fix.patch
let-warn_on-warn_on_once-return-the-condition-fix-2.patch
net-use-warn_on_once-for-checksum-checks.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux