Commit 62f8dc52 authored by Ben Hutchings's avatar Ben Hutchings

sfc: Work around bogus 'uninitialised variable' warning

With some gcc versions & optimisations, the compiler will warn that
'depth' in efx_filter_insert_filter() may be used without being
initialised, although this is not the case.

This is related to inlining of efx_filter_search(), which only has
one caller since commit 8db182f4
('sfc: Remove now-unused filter function').

Shut the compiler up by initialising it to 0.
Signed-off-by: default avatarBen Hutchings <bhutchings@solarflare.com>
parent c56bf6fe
...@@ -662,7 +662,7 @@ s32 efx_filter_insert_filter(struct efx_nic *efx, struct efx_filter_spec *spec, ...@@ -662,7 +662,7 @@ s32 efx_filter_insert_filter(struct efx_nic *efx, struct efx_filter_spec *spec,
struct efx_filter_table *table = efx_filter_spec_table(state, spec); struct efx_filter_table *table = efx_filter_spec_table(state, spec);
struct efx_filter_spec *saved_spec; struct efx_filter_spec *saved_spec;
efx_oword_t filter; efx_oword_t filter;
unsigned int filter_idx, depth; unsigned int filter_idx, depth = 0;
u32 key; u32 key;
int rc; int rc;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment