mlxsw: core: Remove dummy union name from struct mlxsw_listener
authorJiri Pirko <jiri@mellanox.com>
Sun, 23 Feb 2020 07:31:38 +0000 (08:31 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 24 Feb 2020 00:06:58 +0000 (16:06 -0800)
The dummy name for union is no longer needed, remove it.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/core.c
drivers/net/ethernet/mellanox/mlxsw/core.h

index 0d630096a28cb7882cbd17484de38f7897eb9a15..1ad959de909dbe28614188ea96dbeec5fd20de45 100644 (file)
@@ -1611,11 +1611,11 @@ static int mlxsw_core_listener_register(struct mlxsw_core *mlxsw_core,
 {
        if (listener->is_event)
                return mlxsw_core_event_listener_register(mlxsw_core,
-                                               &listener->u.event_listener,
+                                               &listener->event_listener,
                                                priv);
        else
                return mlxsw_core_rx_listener_register(mlxsw_core,
-                                               &listener->u.rx_listener,
+                                               &listener->rx_listener,
                                                priv);
 }
 
@@ -1625,11 +1625,11 @@ static void mlxsw_core_listener_unregister(struct mlxsw_core *mlxsw_core,
 {
        if (listener->is_event)
                mlxsw_core_event_listener_unregister(mlxsw_core,
-                                                    &listener->u.event_listener,
+                                                    &listener->event_listener,
                                                     priv);
        else
                mlxsw_core_rx_listener_unregister(mlxsw_core,
-                                                 &listener->u.rx_listener,
+                                                 &listener->rx_listener,
                                                  priv);
 }
 
index de56f489b6ab785cc2f29a7ca60439087df97525..ba767329e20d29cd320092ae1dc5fc63aa74688d 100644 (file)
@@ -75,7 +75,7 @@ struct mlxsw_listener {
        union {
                struct mlxsw_rx_listener rx_listener;
                struct mlxsw_event_listener event_listener;
-       } u;
+       };
        enum mlxsw_reg_hpkt_action action;
        enum mlxsw_reg_hpkt_action unreg_action;
        u8 trap_group;
@@ -87,7 +87,7 @@ struct mlxsw_listener {
                  _unreg_action)                                        \
        {                                                               \
                .trap_id = MLXSW_TRAP_ID_##_trap_id,                    \
-               .u.rx_listener =                                        \
+               .rx_listener =                                          \
                {                                                       \
                        .func = _func,                                  \
                        .local_port = MLXSW_PORT_DONT_CARE,             \
@@ -103,7 +103,7 @@ struct mlxsw_listener {
 #define MLXSW_EVENTL(_func, _trap_id, _trap_group)                     \
        {                                                               \
                .trap_id = MLXSW_TRAP_ID_##_trap_id,                    \
-               .u.event_listener =                                     \
+               .event_listener =                                       \
                {                                                       \
                        .func = _func,                                  \
                        .trap_id = MLXSW_TRAP_ID_##_trap_id,            \