diff options
author | Ido Schimmel <idosch@mellanox.com> | 2020-03-27 11:55:23 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-03-28 01:06:43 +0300 |
commit | e1da9618b785366bed7d175ab6599f897119b87b (patch) | |
tree | 2b72149ef7d94f450c57d56202d89542c2dbdca1 /drivers/net/ethernet/atheros | |
parent | bdb373cf5be0324a734c8d8e93b65a46fd843ced (diff) | |
download | linux-e1da9618b785366bed7d175ab6599f897119b87b.tar.xz |
mlxsw: core_acl: Avoid defining static variable in header file
The static array 'mlxsw_afk_element_infos' in 'core_acl_flex_keys.h' is
copied to each file that includes the header, but not all use it. This
results in the following warnings when compiling with W=1:
drivers/net/ethernet/mellanox/mlxsw//core_acl_flex_keys.h:76:44:
warning: ‘mlxsw_afk_element_infos’ defined but not used
[-Wunused-const-variable=]
One way to suppress the warning is to mark the array with
'__maybe_unused', but another option is to remove it from the header
file entirely.
Change 'struct mlxsw_afk_element_inst' to store the key to the array
('element') instead of the array value keyed by 'element'. Adjust the
different users accordingly.
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Reviewed-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/atheros')
0 files changed, 0 insertions, 0 deletions