Re: [PATCH v2 1/6] spi: dw: Add a symbols namespace for the core module

From: Andy Shevchenko
Date: Mon Nov 15 2021 - 10:18:29 EST


On Mon, Nov 15, 2021 at 5:03 PM Serge Semin <fancer.lancer@xxxxxxxxx> wrote:
> On Mon, Nov 15, 2021 at 04:27:10PM +0200, Andy Shevchenko wrote:
> > On Mon, Nov 15, 2021 at 01:30:21AM +0300, Serge Semin wrote:

...

> > > +MODULE_IMPORT_NS(SPI_DW_CORE);
> >
> > I would rather see this at the end of file, but it should work either way.
>
> I've just realized it, do I really need the
> namespace imported in this object at all?.. It's linked into the
> spi-dw-core.ko. See drivers/spi/Makefile:
> obj-$(CONFIG_SPI_DESIGNWARE) += spi-dw.o
> spi-dw-y := spi-dw-core.o
> spi-dw-$(CONFIG_SPI_DW_DMA) += spi-dw-dma.o
> so the object must have got the same namespace.
>
> Yeah, most likely I shouldn't have used the MODULE_IMPORT_NS() here...

Indeed.

--
With Best Regards,
Andy Shevchenko