diff options
author | Ido Schimmel <[email protected]> | 2020-03-27 11:55:23 +0300 |
---|---|---|
committer | David S. Miller <[email protected]> | 2020-03-27 15:06:43 -0700 |
commit | e1da9618b785366bed7d175ab6599f897119b87b (patch) | |
tree | 2b72149ef7d94f450c57d56202d89542c2dbdca1 /scripts/gcc-plugins/cyc_complexity_plugin.c | |
parent | bdb373cf5be0324a734c8d8e93b65a46fd843ced (diff) |
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 <[email protected]>
Reviewed-by: Jiri Pirko <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'scripts/gcc-plugins/cyc_complexity_plugin.c')
0 files changed, 0 insertions, 0 deletions