mlxsw: spectrum: Use DECLARE_BITMAP() macro
authorIdo Schimmel <idosch@mellanox.com>
Mon, 20 Jun 2016 21:04:07 +0000 (23:04 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 21 Jun 2016 09:02:49 +0000 (05:02 -0400)
There is a macro to do this kind of declarations, so use it.

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

index 13b30eaa13d471180d473459aa8fe38606a0b8f1..5da98b4c78eb1630d52244fa18d3df8a4894f217 100644 (file)
@@ -155,17 +155,17 @@ struct mlxsw_sp_sb {
 struct mlxsw_sp {
        struct {
                struct list_head list;
-               unsigned long mapped[BITS_TO_LONGS(MLXSW_SP_VFID_PORT_MAX)];
+               DECLARE_BITMAP(mapped, MLXSW_SP_VFID_PORT_MAX);
        } port_vfids;
        struct {
                struct list_head list;
-               unsigned long mapped[BITS_TO_LONGS(MLXSW_SP_VFID_BR_MAX)];
+               DECLARE_BITMAP(mapped, MLXSW_SP_VFID_BR_MAX);
        } br_vfids;
        struct {
                struct list_head list;
-               unsigned long mapped[BITS_TO_LONGS(MLXSW_SP_MID_MAX)];
+               DECLARE_BITMAP(mapped, MLXSW_SP_MID_MAX);
        } br_mids;
-       unsigned long active_fids[BITS_TO_LONGS(VLAN_N_VID)];
+       DECLARE_BITMAP(active_fids, VLAN_N_VID);
        struct mlxsw_sp_port **ports;
        struct mlxsw_core *core;
        const struct mlxsw_bus_info *bus_info;