net: Make NETDEV_XXX commands enum { }
authorKirill Tkhai <ktkhai@virtuozzo.com>
Fri, 23 Mar 2018 16:47:19 +0000 (19:47 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 26 Mar 2018 15:33:26 +0000 (11:33 -0400)
commitede2762d93ff16e0974f7446516b46b1022db213
tree07b6a2fda4bc2f6019cc6819352b2d4ea9385ace
parentc2b72e8e10abfb54099828f8fdc68b8b0174e4e4
net: Make NETDEV_XXX commands enum { }

This patch is preparation to drop NETDEV_UNREGISTER_FINAL.
Since the cmd is used in usnic_ib_netdev_event_to_string()
to get cmd name, after plain removing NETDEV_UNREGISTER_FINAL
from everywhere, we'd have holes in event2str[] in this
function.

Instead of that, let's make NETDEV_XXX commands names
available for everyone, and to define netdev_cmd_to_name()
in the way we won't have to shaffle names after their
numbers are changed.

Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/infiniband/hw/usnic/usnic_ib_main.c
include/linux/netdevice.h
net/core/dev.c