lkml.org 
[lkml]   [2022]   [Oct]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [RFC net-next 2/2] net: dsa: Add driver for Maxlinear GSW1XX switch
From
On 27/10/2022 02:35, Camel Guo wrote:
utdown(priv->ds);
> >> +
> >> +     dev_set_drvdata(priv->dev, NULL);
> >> +}
> >> +EXPORT_SYMBOL(gsw1xx_shutdown);
> >
> > 1. EXPORT_SYMBOL_GPL
>
> Will update in v2
>
> > 2. Why do you do it in the first place? It's one driver, no need for
> > building two modules. Same applies to other places.
>
> All stuff in drivers/net/dsa/gsw1xx_core.c is supposed to be generic and
> totally independent of the actual management interface (mdio, spi, uart,
> maybe memory-mapped IO). This way, I think the gsw1xx_core.ko can be
> reused in
> gsw1xx_spi.ko, gsw1xx_uart.ko and so on.
>
> I don't how similar the chips that lantiq_gswip.c supports are due to
> no datasheet. If not too much, maybe someone the gsw1xx_core.ko can also
> be reused in lantiq_gswip as well.

Keep the files separate but there is no need to make two modules and
exprt this. Your patch should stand on its own, not prepare for some
imaginary future work which might or might not bring more modules.

Once these future modules appear, it will be easy to change existing
file to a module.

Best regards,
Krzysztof

\
 
 \ /
  Last update: 2022-10-27 14:49    [W:0.102 / U:0.348 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site