mirror of https://gitee.com/openkylin/linux.git
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>
This commit is contained in:
parent
14c3326a11
commit
39c0a0d5be
|
@ -2838,7 +2838,7 @@ static int gfar_poll(struct napi_struct *napi, int budget)
|
||||||
struct gfar_priv_tx_q *tx_queue = NULL;
|
struct gfar_priv_tx_q *tx_queue = NULL;
|
||||||
struct gfar_priv_rx_q *rx_queue = NULL;
|
struct gfar_priv_rx_q *rx_queue = NULL;
|
||||||
int work_done = 0, work_done_per_q = 0;
|
int work_done = 0, work_done_per_q = 0;
|
||||||
int i, budget_per_q;
|
int i, budget_per_q = 0;
|
||||||
int has_tx_work;
|
int has_tx_work;
|
||||||
unsigned long rstat_rxf;
|
unsigned long rstat_rxf;
|
||||||
int num_act_queues;
|
int num_act_queues;
|
||||||
|
|
Loading…
Reference in New Issue