Re: [PATCH v12 net-next 9/9] mfd: ocelot: add support for the vsc7512 chip via spi

Colin Foster
2022-07-02T16:26:20Z

On Fri, Jul 01, 2022 at 08:02:41PM -0700, Jakub Kicinski wrote:
> On Fri, 1 Jul 2022 12:26:09 -0700 Colin Foster wrote:
> > The VSC7512 is a networking chip that contains several peripherals. Many of
> > these peripherals are currently supported by the VSC7513 and VSC7514 chips,
> > but those run on an internal CPU. The VSC7512 lacks this CPU, and must be
> > controlled externally.
> >
> > Utilize the existing drivers by referencing the chip as an MFD. Add support
> > for the two MDIO buses, the internal phys, pinctrl, and serial GPIO.
>
> allmodconfig is not happy, I didn't spot that being mentioned as
> expected:
>
> ERROR: modpost: "ocelot_spi_init_regmap" [drivers/mfd/ocelot-core.ko] undefined!
> WARNING: modpost: module ocelot-spi uses symbol ocelot_chip_reset from namespace MFD_OCELOT, but does not import it.
> WARNING: modpost: module ocelot-spi uses symbol ocelot_core_init from namespace MFD_OCELOT, but does not import it.
> make[2]: *** [../scripts/Makefile.modpost:128: modules-only.symvers] Error 1
> make[1]: *** [/home/nipa/net-next/Makefile:1757: modules] Error 2

Yikes. I'll button this up. I'm surprised that I need to import the
namespace of my own module... but I don't have a strong enough
understanding of what all is going on.

Also, allmodconfig never compiles for me, so I can't really test it:

make W=1 ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- -j$(nproc)
...
arch/arm/vdso/vgettimeofday.c:10:5: error: no previous prototype for ‘__vdso_clock_gettime’ [-Werror=missing-prototypes]
10 | int __vdso_clock_gettime(clockid_t clock,
| ^~~~~~~~~~~~~~~~~~~~
arch/arm/vdso/vgettimeofday.c:16:5: error: no previous prototype for ‘__vdso_clock_gettime64’ [-Werror=missing-prototypes]
16 | int __vdso_clock_gettime64(clockid_t clock,
| ^~~~~~~~~~~~~~~~~~~~~~
arch/arm/vdso/vgettimeofday.c:22:5: error: no previous prototype for ‘__vdso_gettimeofday’ [-Werror=missing-prototypes]
22 | int __vdso_gettimeofday(struct __kernel_old_timeval *tv,
| ^~~~~~~~~~~~~~~~~~~
arch/arm/vdso/vgettimeofday.c:28:5: error: no previous prototype for ‘__vdso_clock_getres’ [-Werror=missing-prototypes]
28 | int __vdso_clock_getres(clockid_t clock_id,

I'll try it without cross-compile and see if I have better luck.