Skip to content

Commit

Permalink
nexthop: Fix type of event_type in call_nexthop_notifiers
Browse files Browse the repository at this point in the history
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: 8590cee ("nexthop: add support for notifiers")
Link: ClangBuiltLinux/linux#1038
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Reviewed-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
nathanchance authored and davem330 committed May 27, 2020
1 parent dc0f3ed commit d8e79f1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/ipv4/nexthop.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d8e79f1

Please sign in to comment.