Re: [PATCH] staging: bcm2835: fix vchiq_mmal dependencies

From: Arnd Bergmann
Date: Fri Dec 04 2020 - 07:50:55 EST


On Fri, Dec 4, 2020 at 11:44 AM Jacopo Mondi <jacopo@xxxxxxxxxx> wrote:
>
> Hi Arnd,
>
> On Thu, Dec 03, 2020 at 11:38:30PM +0100, Arnd Bergmann wrote:
> > From: Arnd Bergmann <arnd@xxxxxxxx>
> >
> > When the MMAL code is built-in but the vchiq core config is
> > set to =m, the mmal code never gets built, which in turn can
> > lead to link errors:
>
> My bad, I repetedly ignored the error report received from the 'kernel
> test robot' about this. Thanks for fixing.
>
> For my eduction, why would the vchiq-mmal code not get build if
> vchiq-core is set to M ? I mean, that configuration is indeed wrong,
> as vchiq-mmal uses symbols from vchiq-core and I would expect that to
> fail when building the kernel image, not have the other modules (as
> bcm2835-camera) fail as a consequence when building modules.


drivers/staging/Makefile has this line:

obj-$(CONFIG_BCM2835_VCHIQ) += vc04_services/

when CONFIG_BCM2835_VCHIQ=m, the kbuild infrastructure
only enters the subdirectory while building modules, but a built-in
mmal driver is not a loadable module, so it does not get built
at that time. When compiling the built-in code, the subdirectory is
not entered.

> > Fixes: b18ee53ad297 ("staging: bcm2835: Break MMAL support out from camera")
> > Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
>
> Acked-by: Jacopo Mondi <jacopo@xxxxxxxxxx>
>
> If you noticed this from the same error notification I recevied it
> might be fair to report:
> Reported-by: kernel test robot <lkp@xxxxxxxxx>

I had not seen that report but found it during my own testing,
thanks for adding.

Arnd