From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jose Abreu Subject: Re: [PATCH net-next 08/10] net: stmmac: Do not initialize the RX Descriptor twice Date: Thu, 10 May 2018 15:33:05 +0100 Message-ID: References: <8dc038066ee0fbb30f1a82bce5e2e9118b13ce01.1525683833.git.joabreu@synopsys.com> Mime-Version: 1.0 Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit Cc: "David S. Miller" , Joao Pinto , Vitor Soares , Giuseppe Cavallaro , Alexandre Torgue To: Jose Abreu , Return-path: Received: from smtprelay.synopsys.com ([198.182.37.59]:45806 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935632AbeEJOdN (ORCPT ); Thu, 10 May 2018 10:33:13 -0400 Received: from mailhost.synopsys.com (mailhost3.synopsys.com [10.12.238.238]) by smtprelay.synopsys.com (Postfix) with ESMTP id BCB701E04B6 for ; Thu, 10 May 2018 16:33:11 +0200 (CEST) In-Reply-To: <8dc038066ee0fbb30f1a82bce5e2e9118b13ce01.1525683833.git.joabreu@synopsys.com> Sender: netdev-owner@vger.kernel.org List-ID: On 08-05-2018 15:45, Jose Abreu wrote: > The RX Descriptor is already initialized in at setup phase so there is > no need to set the values again, we just need to set the owner. This > allow us to remove another if condition. > > Signed-off-by: Jose Abreu > Cc: David S. Miller > Cc: Joao Pinto > Cc: Vitor Soares > Cc: Giuseppe Cavallaro > Cc: Alexandre Torgue > --- > drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 5 +---- > 1 files changed, 1 insertions(+), 4 deletions(-) > > diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c > index c5769b4..80439be 100644 > --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c > +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c > @@ -3255,10 +3255,7 @@ static inline void stmmac_rx_refill(struct stmmac_priv *priv, u32 queue) > } > dma_wmb(); > > - if (unlikely(priv->synopsys_id >= DWMAC_CORE_4_00)) > - stmmac_init_rx_desc(priv, p, priv->use_riwt, 0, 0); This cant be removed. Please don't merge it. Thanks and Best Regards, Jose Miguel Abreu > - else > - stmmac_set_rx_owner(priv, p); > + stmmac_set_rx_owner(priv, p); > > dma_wmb(); >