Re: [PATCH net-next 1/6] net: stmmac: add platform library

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Sep 12, 2023 at 12:32:40PM +0300, Serge Semin wrote:
> On Tue, Sep 12, 2023 at 07:59:49AM +0000, Jose Abreu wrote:
> > From: Russell King (Oracle) <rmk+kernel@xxxxxxxxxxxxxxx>
> > Date: Mon, Sep 11, 2023 at 16:28:40
> > 
> > > Add a platform library of helper functions for common traits in the
> > > platform drivers. Currently, this is setting the tx clock.
> > > 
> > > Signed-off-by: Russell King (Oracle) <rmk+kernel@xxxxxxxxxxxxxxx>
> > > ---
> 
> > >  drivers/net/ethernet/stmicro/stmmac/Makefile  |  2 +-
> > >  .../ethernet/stmicro/stmmac/stmmac_plat_lib.c | 29 +++++++++++++++++++
> > >  .../ethernet/stmicro/stmmac/stmmac_plat_lib.h |  8 +++++
> > 
> > Wouldn't it be better to just call it "stmmac_lib{.c,.h}" in case we need to add
> > more helpers on the future that are not only for platform-based drivers?
> 
> What is the difference between stmmac_platform.{c,h} and
> stmmac_plat_lib.{c,h} files? It isn't clear really. In perspective it
> may cause confusions like mixed definitions in both of these files.
> 
> Why not to use the stmmac_platform.{c,h} instead of adding one more
> file?

Is stmmac_platform.{c,h} used by all the drivers that are making use of
this? I'm not entirely sure.

If it is, then yes, it can go in stmmac_platform.[ch]. If not, then I
don't think we'd want the bloat of forcing all of stmmac_platform.[ch]
onto drivers that only want to use this one function.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux