[ovs-dev] [PATCH] datapath: Remove explicit 'unlikely' from IS_ERR calls.

Ben Pfaff blp at nicira.com
Sat Dec 11 00:41:39 UTC 2010


As David Miller pointed out on netdev today, IS_ERR has a built-in
'unlikely', so there's no point in adding one of our own.

Signed-off-by: Ben Pfaff <blp at nicira.com>
---
 datapath/actions.c  |    2 +-
 datapath/datapath.c |    2 +-
 datapath/tunnel.c   |    8 ++++----
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/datapath/actions.c b/datapath/actions.c
index 67f6cd4..6defd2d 100644
--- a/datapath/actions.c
+++ b/datapath/actions.c
@@ -138,7 +138,7 @@ static struct sk_buff *modify_vlan_tci(struct datapath *dp, struct sk_buff *skb,
 
 			segs = skb_gso_segment(skb, 0);
 			kfree_skb(skb);
-			if (unlikely(IS_ERR(segs)))
+			if (IS_ERR(segs))
 				return ERR_CAST(segs);
 
 			actions_len_left = actions_len;
diff --git a/datapath/datapath.c b/datapath/datapath.c
index ffe3bd8..2d84176 100644
--- a/datapath/datapath.c
+++ b/datapath/datapath.c
@@ -612,7 +612,7 @@ int dp_output_control(struct datapath *dp, struct sk_buff *skb, int queue_no,
 		if (nskb) {
 			kfree_skb(skb);
 			skb = nskb;
-			if (unlikely(IS_ERR(skb))) {
+			if (IS_ERR(skb)) {
 				err = PTR_ERR(skb);
 				goto err;
 			}
diff --git a/datapath/tunnel.c b/datapath/tunnel.c
index 3534909..1e40293 100644
--- a/datapath/tunnel.c
+++ b/datapath/tunnel.c
@@ -1045,7 +1045,7 @@ static struct sk_buff *handle_offloads(struct sk_buff *skb,
 		 */
 		if (skb_headroom(skb) < min_headroom) {
 			skb = check_headroom(skb, min_headroom);
-			if (unlikely(IS_ERR(skb))) {
+			if (IS_ERR(skb)) {
 				err = PTR_ERR(skb);
 				goto error;
 			}
@@ -1053,7 +1053,7 @@ static struct sk_buff *handle_offloads(struct sk_buff *skb,
 
 		nskb = skb_gso_segment(skb, 0);
 		kfree_skb(skb);
-		if (unlikely(IS_ERR(nskb))) {
+		if (IS_ERR(nskb)) {
 			err = PTR_ERR(nskb);
 			goto error;
 		}
@@ -1061,7 +1061,7 @@ static struct sk_buff *handle_offloads(struct sk_buff *skb,
 		skb = nskb;
 	} else {
 		skb = check_headroom(skb, min_headroom);
-		if (unlikely(IS_ERR(skb))) {
+		if (IS_ERR(skb)) {
 			err = PTR_ERR(skb);
 			goto error;
 		}
@@ -1199,7 +1199,7 @@ int tnl_send(struct vport *vport, struct sk_buff *skb)
 
 	/* Offloading */
 	skb = handle_offloads(skb, mutable, rt);
-	if (unlikely(IS_ERR(skb)))
+	if (IS_ERR(skb))
 		goto error;
 
 	/* MTU */
-- 
1.7.1





More information about the dev mailing list