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

- From: Grygorii Strashko \<grygorii.strashko@ti.com\>
- Date: 2019-11-01 16:56:20 
- List: netdev
- Page: https://ratatoskr.run/netdev/2019/11/5762722
- Thread: https://ratatoskr.run/netdev/2019/10/5754706/t.md

```text


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
```
