* [PATCH] net: openvswitch: drop unneeded likely() call around IS_ERR()
@ 2019-06-05 21:06 Enrico Weigelt, metux IT consult
2019-06-05 23:58 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Enrico Weigelt, metux IT consult @ 2019-06-05 21:06 UTC (permalink / raw)
To: linux-kernel; +Cc: pshelar, davem, netdev, dev
From: Enrico Weigelt <info@metux.net>
IS_ERR() already calls unlikely(), so this extra likely() call
around the !IS_ERR() is not needed.
Signed-off-by: Enrico Weigelt <info@metux.net>
---
net/openvswitch/datapath.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c
index dc9ff93..4076e08 100644
--- a/net/openvswitch/datapath.c
+++ b/net/openvswitch/datapath.c
@@ -1347,7 +1347,7 @@ static int ovs_flow_cmd_del(struct sk_buff *skb, struct genl_info *info)
reply = ovs_flow_cmd_alloc_info((const struct sw_flow_actions __force *) flow->sf_acts,
&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,
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] net: openvswitch: drop unneeded likely() call around IS_ERR()
2019-06-05 21:06 [PATCH] net: openvswitch: drop unneeded likely() call around IS_ERR() Enrico Weigelt, metux IT consult
@ 2019-06-05 23:58 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2019-06-05 23:58 UTC (permalink / raw)
To: info; +Cc: linux-kernel, pshelar, netdev, dev
From: "Enrico Weigelt, metux IT consult" <info@metux.net>
Date: Wed, 5 Jun 2019 23:06:40 +0200
> From: Enrico Weigelt <info@metux.net>
>
> IS_ERR() already calls unlikely(), so this extra likely() call
> around the !IS_ERR() is not needed.
>
> Signed-off-by: Enrico Weigelt <info@metux.net>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-06-05 23:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-05 21:06 [PATCH] net: openvswitch: drop unneeded likely() call around IS_ERR() Enrico Weigelt, metux IT consult
2019-06-05 23:58 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.