From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jose Abreu Subject: Re: [PATCH v3 net-next 1/9] net: stmmac: Add XGMAC 2.10 HWIF entry Date: Mon, 6 Aug 2018 08:55:13 +0100 Message-ID: <00b26a5f-afdc-95ce-3b64-72710b30789b@synopsys.com> References: <5ff6dcc508726dec7d170315e2e3728667b6133f.1533311285.git.joabreu@synopsys.com> <4f309bf8-c669-ae9d-750c-8946715f0fe1@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Cc: "David S. Miller" , Joao Pinto , Giuseppe Cavallaro , Alexandre Torgue To: Florian Fainelli , Jose Abreu , Return-path: Received: from us01smtprelay-2.synopsys.com ([198.182.47.9]:55280 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725735AbeHFKDI (ORCPT ); Mon, 6 Aug 2018 06:03:08 -0400 In-Reply-To: <4f309bf8-c669-ae9d-750c-8946715f0fe1@gmail.com> Sender: netdev-owner@vger.kernel.org List-ID: Hi Florian, On 03-08-2018 19:54, Florian Fainelli wrote: > On 08/03/2018 08:50 AM, Jose Abreu wrote: >> @@ -87,6 +88,7 @@ static const struct stmmac_hwif_entry { >> { >> .gmac = false, >> .gmac4 = false, >> + .xgmac = false, > In a future clean-up you would like want to remove this and replace this > an enumeration which is less error prone than having to define a boolean > for each of these previous generations only to say "this is not an xgmac". Its a good idea! I really don't like the pattern of "if (priv->plat->has_something)" in the code. I will think about adding this but for now let's merge xgmac2 and I will try to refactor the code later because I will need to change many files and the patchset would be bigger. Thanks and Best Regards, Jose Miguel Abreu