summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2012-06-01 03:56:22 +0400
committerBen Hutchings <bhutchings@solarflare.com>2012-07-17 19:12:29 +0400
commit62f8dc529c76aca43113312079299d40741407dd (patch)
tree2eb316d8f187ca67fe00da9175370a45271b028a /drivers/net/ethernet
parentc56bf6fe785abbd83751a462f0c7067f7145b97a (diff)
downloadlinux-62f8dc529c76aca43113312079299d40741407dd.tar.xz
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 8db182f4a8a6e2dcb8b65905ea4af56210e65430 ('sfc: Remove now-unused filter function'). Shut the compiler up by initialising it to 0. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r--drivers/net/ethernet/sfc/filter.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/sfc/filter.c b/drivers/net/ethernet/sfc/filter.c
index fea7f7300675..c3fd61f0a95c 100644
--- a/drivers/net/ethernet/sfc/filter.c
+++ b/drivers/net/ethernet/sfc/filter.c
@@ -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_spec *saved_spec;
efx_oword_t filter;
- unsigned int filter_idx, depth;
+ unsigned int filter_idx, depth = 0;
u32 key;
int rc;