diff options
author | Claudiu Manoil <claudiu.manoil@freescale.com> | 2013-03-21 03:12:13 (GMT) |
---|---|---|
committer | Emil Medve <Emilian.Medve@Freescale.com> | 2013-03-21 18:41:51 (GMT) |
commit | 8cc40009824daecd0328b0a73e4aee5cbff4d0e7 (patch) | |
tree | 0c3076bdb45eae83398c151e99b232fe09d4d51b /drivers/net/ethernet | |
parent | 990fc0893bc69f379e72de35cf4ed415a5529104 (diff) | |
download | linux-fsl-qoriq-8cc40009824daecd0328b0a73e4aee5cbff4d0e7.tar.xz |
gianfar: Remove 'maybe-uninitialized' compile warning
Warning message:
warning: 'budget_per_q' may be used uninitialized in this function
budget_per_q won't be used uninitialized since the only time
it doesn't get initialized is when entering gfar_poll with
num_act_queues == 0, meaning rstat_rxf == 0, in which case
budget_per_q is not utilized (as it has no meaning).
Inititalize budget_per_q to 0 though to suppress this compile
warning.
Signed-off-by: Claudiu Manoil <claudiu.manoil@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r-- | drivers/net/ethernet/freescale/gianfar.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/freescale/gianfar.c b/drivers/net/ethernet/freescale/gianfar.c index e15ff6b..5112d36 100644 --- a/drivers/net/ethernet/freescale/gianfar.c +++ b/drivers/net/ethernet/freescale/gianfar.c @@ -2844,7 +2844,7 @@ static int gfar_poll(struct napi_struct *napi, int budget) struct gfar_priv_tx_q *tx_queue = NULL; struct gfar_priv_rx_q *rx_queue = NULL; int work_done = 0, work_done_per_q = 0; - int i, budget_per_q; + int i, budget_per_q = 0; int has_tx_work; unsigned long rstat_rxf; int num_act_queues; |