* [PATCH] [net-next] nexthop: fix enum type confusion
@ 2020-05-27 13:47 Arnd Bergmann
2020-05-27 13:50 ` David Ahern
0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2020-05-27 13:47 UTC (permalink / raw)
To: David Ahern, David S. Miller, Alexey Kuznetsov,
Hideaki YOSHIFUJI, Jakub Kicinski, Roopa Prabhu
Cc: Arnd Bergmann, Colin Ian King, Stephen Worley, netdev,
linux-kernel, clang-built-linux
Clang points out a mismatch between function arguments
using a different enum type:
net/ipv4/nexthop.c:841:30: error: implicit conversion from enumeration type 'enum nexthop_event_type' to different enumeration type 'enum fib_event_type' [-Werror,-Wenum-conversion]
call_nexthop_notifiers(net, NEXTHOP_EVENT_DEL, nh);
~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~
This looks like a copy-paste error, so just use the intended
type instead.
Fixes: 8590ceedb701 ("nexthop: add support for notifiers")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
net/ipv4/nexthop.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ipv4/nexthop.c b/net/ipv4/nexthop.c
index 143011f9b580..ec1282858cb7 100644
--- a/net/ipv4/nexthop.c
+++ b/net/ipv4/nexthop.c
@@ -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;
--
2.26.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] [net-next] nexthop: fix enum type confusion
2020-05-27 13:47 [PATCH] [net-next] nexthop: fix enum type confusion Arnd Bergmann
@ 2020-05-27 13:50 ` David Ahern
0 siblings, 0 replies; 2+ messages in thread
From: David Ahern @ 2020-05-27 13:50 UTC (permalink / raw)
To: Arnd Bergmann, David Ahern, David S. Miller, Alexey Kuznetsov,
Hideaki YOSHIFUJI, Jakub Kicinski, Roopa Prabhu
Cc: Colin Ian King, Stephen Worley, netdev, linux-kernel, clang-built-linux
On 5/27/20 7:47 AM, Arnd Bergmann wrote:
> Clang points out a mismatch between function arguments
> using a different enum type:
>
> net/ipv4/nexthop.c:841:30: error: implicit conversion from enumeration type 'enum nexthop_event_type' to different enumeration type 'enum fib_event_type' [-Werror,-Wenum-conversion]
> call_nexthop_notifiers(net, NEXTHOP_EVENT_DEL, nh);
> ~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~
>
> This looks like a copy-paste error, so just use the intended
> type instead.
>
> Fixes: 8590ceedb701 ("nexthop: add support for notifiers")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> net/ipv4/nexthop.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
Nate sent a fix a few hours ago:
https://lore.kernel.org/netdev/20200527080019.3489332-1-natechancellor@gmail.com/T/#u
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-05-27 13:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-27 13:47 [PATCH] [net-next] nexthop: fix enum type confusion Arnd Bergmann
2020-05-27 13:50 ` David Ahern
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).