Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

-Wenum-conversion in net/ipv4/nexthop.c #1038

Closed
nathanchance opened this issue May 27, 2020 · 2 comments
Closed

-Wenum-conversion in net/ipv4/nexthop.c #1038

nathanchance opened this issue May 27, 2020 · 2 comments
Assignees
Labels
-Wenum-conversion [BUG] linux-next This is an issue only seen in linux-next [FIXED][LINUX] development cycle This bug was only present and fixed in a -next or -rc cycle

Comments

@nathanchance
Copy link
Member

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.

Patch submitted: https://lore.kernel.org/netdev/20200527080019.3489332-1-natechancellor@gmail.com/

@nathanchance nathanchance added -Wenum-conversion [PATCH] Submitted A patch has been submitted for review [BUG] linux-next This is an issue only seen in linux-next labels May 27, 2020
@nathanchance nathanchance self-assigned this May 27, 2020
fengguang pushed a commit to 0day-ci/linux that referenced this issue May 27, 2020
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#1038
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
@nickdesaulniers nickdesaulniers added [PATCH] Accepted A submitted patch has been accepted upstream and removed [PATCH] Submitted A patch has been submitted for review labels May 27, 2020
bcopeland pushed a commit to bcopeland/wireless-testing that referenced this issue May 27, 2020
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>
nathanchance added a commit to nathanchance/WSL2-Linux-Kernel that referenced this issue May 28, 2020
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>
@nathanchance
Copy link
Member Author

@nathanchance nathanchance added [FIXED][LINUX] 5.7 This bug was fixed in Linux 5.7 [FIXED][LINUX] development cycle This bug was only present and fixed in a -next or -rc cycle and removed [FIXED][LINUX] 5.7 This bug was fixed in Linux 5.7 [PATCH] Accepted A submitted patch has been accepted upstream labels May 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
-Wenum-conversion [BUG] linux-next This is an issue only seen in linux-next [FIXED][LINUX] development cycle This bug was only present and fixed in a -next or -rc cycle
Projects
None yet
Development

No branches or pull requests

2 participants