Re: [PATCH v5 net-next 04/12] net: ethernet: ti: cpsw: move set of common functions in cpsw_priv

From: Grygorii Strashko
Date: Fri Nov 01 2019 - 12:56:20 EST




On 25/10/2019 16:01, Andrew Lunn wrote:
On Thu, Oct 24, 2019 at 01:09:06PM +0300, Grygorii Strashko wrote:
As a preparatory patch to add support for a switchdev based cpsw driver,
move common functions to cpsw-priv.c so that they can be used across both
drivers.

Hi Grygorii

Bike shedding, but it seems odd to move common code into a private
file. How common is the current code in cpsw-common.c?

cpsw-common.c is used between cpsw and davinci_emac.c and, as of now, contains
only code to retrieve MAC addr from eFuse regs.
cpsw_priv.x were added intentionally as code moved to these files only used
by ald and new CPSW drivers. This also allows to avoid build/link issues.

--
Best regards,
grygorii