> -----Original Message----- > From: netdev-ow...@vger.kernel.org [mailto:netdev-ow...@vger.kernel.org] > On Behalf Of yuan linyu > Sent: Saturday, January 13, 2018 11:25 AM > To: netdev@vger.kernel.org > Cc: David S . Miller <da...@davemloft.net>; yuan linyu > <linyu.y...@alcatel-sbell.com.cn> > Subject: Re: [PATCH net-next] net: dpaa: change while() to if() in > dpaa_fq_setup() > > i am wrong, ignore it. >
Yes, the wile is required. Madalin > On 六, 2018-01-13 at 17:15 +0800, yuan linyu wrote: > > From: yuan linyu <linyu.y...@alcatel-sbell.com.cn> > > > > while loop is not needed, because list_for_each_entry() already check > all fq. > > > > Signed-off-by: yuan linyu <linyu.y...@alcatel-sbell.com.cn> > > --- > > drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c > b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c > > index 7caa8da..fd0e411 100644 > > --- a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c > > +++ b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c > > @@ -931,7 +931,7 @@ static void dpaa_fq_setup(struct dpaa_priv *priv, > > } > > > > /* Make sure all CPUs receive a corresponding Tx queue. */ > > - while (egress_cnt < DPAA_ETH_TXQ_NUM) { > > + if (egress_cnt < DPAA_ETH_TXQ_NUM) { > > list_for_each_entry(fq, &priv->dpaa_fq_list, list) { > > if (fq->fq_type != FQ_TYPE_TX) > > continue;