[ovs-dev] [PATCH v2 02/24] datapath: drop unneeded likely() call around IS_ERR()

Greg Rose gvrose8192 at gmail.com
Wed Sep 9 19:19:59 UTC 2020


From: Enrico Weigelt <info at metux.net>

Upstream commit:
    commit b90f5aa4d6268e81dd1fd51e5ef89d2892bf040d
    Author: Enrico Weigelt <info at metux.net>
    Date:   Wed Jun 5 23:06:40 2019 +0200

    net: openvswitch: drop unneeded likely() call around IS_ERR()

    IS_ERR() already calls unlikely(), so this extra likely() call
    around the !IS_ERR() is not needed.

    Signed-off-by: Enrico Weigelt <info at metux.net>
    Signed-off-by: David S. Miller <davem at davemloft.net>

Cc: Enrico Weigelt <info at metux.net>
Signed-off-by: Greg Rose <gvrose8192 at gmail.com>
---
 datapath/datapath.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/datapath/datapath.c b/datapath/datapath.c
index d604bfd36..4c485c88a 100644
--- a/datapath/datapath.c
+++ b/datapath/datapath.c
@@ -1402,7 +1402,7 @@ static int ovs_flow_cmd_del(struct sk_buff *skb, struct genl_info *info)
 					&flow->id, info, false, ufid_flags);
 
 	if (likely(reply)) {
-		if (likely(!IS_ERR(reply))) {
+		if (!IS_ERR(reply)) {
 			rcu_read_lock();	/*To keep RCU checker happy. */
 			err = ovs_flow_cmd_fill_info(flow, ovs_header->dp_ifindex,
 						     reply, info->snd_portid,
-- 
2.17.1



More information about the dev mailing list