Skip to contentSkip to conversation

nexthop: Fix type of event_type in call_nexthop_notifiers

PATCH Applied Nathan Chancellor 3 participants 3 messages May 27, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nexthop: Fix type of event_type in call_nexthop_notifiers

Clang warns:

net/ipv4/nexthop.c:841:30: warning: implicit conversion from enumeration type 'enum nexthop_event_type' to different enumeration type 'enum fib_event_type' [-Wenum-conversion]

        call_nexthop_notifiers(net, NEXTHOP_EVENT_DEL, nh);
        ~~~~~~~~~~~~~~~~~~~~~~      ^~~~~~~~~~~~~~~~~

1 warning generated.

Use the right type for event_type so that clang does not warn.

Fixes 8590ceedb701 ("nexthop: add support for notifiers")
---
 net/ipv4/nexthop.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/ipv4/nexthop.c +1 -1
index 143011f9b580..ec1282858cb7 100644
@@ -37,7 +37,7 @@ static const struct nla_policy rtm_nh_policy[NHA_MAX + 1] = {
 };
 
 static int call_nexthop_notifiers(struct net *net,
-				  enum fib_event_type event_type,
+				  enum nexthop_event_type event_type,
 				  struct nexthop *nh)
 {
 	int err;

base-commit: dc0f3ed1973f101508957b59e529e03da1349e09

Signature · 1 line
2.27.0.rc0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 9 lines · Nathan Chancellor

Clang warns:

net/ipv4/nexthop.c:841:30: warning: implicit conversion from enumeration type 'enum nexthop_event_type' to different enumeration type 'enum fib_event_type' [-Wenum-conversion]

        call_nexthop_notifiers(net, NEXTHOP_EVENT_DEL, nh);
        ~~~~~~~~~~~~~~~~~~~~~~      ^~~~~~~~~~~~~~~~~

1 warning generated.

Quoted 9 lines

Use the right type for event_type so that clang does not warn.

Fixes 8590ceedb701 ("nexthop: add support for notifiers")
---
 net/ipv4/nexthop.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
maintainer Applied
#2 lore raw
In reply to Nathan Chancellor

From: Nathan Chancellor <[email protected]>
Date: Wed, 27 May 2020 01:00:20 -0700

Quoted 7 lines

Clang warns:

net/ipv4/nexthop.c:841:30: warning: implicit conversion from enumeration type 'enum nexthop_event_type' to different enumeration type 'enum fib_event_type' [-Wenum-conversion]

        call_nexthop_notifiers(net, NEXTHOP_EVENT_DEL, nh);
        ~~~~~~~~~~~~~~~~~~~~~~      ^~~~~~~~~~~~~~~~~
Quoted 7 lines

1 warning generated.

Use the right type for event_type so that clang does not warn.

Fixes 8590ceedb701 ("nexthop: add support for notifiers")

Applied, thanks.