Re: [PATCH 06/10] fpga manager: Add altera-ps-spi driver for Altera FPGAs

From: stillcompiling
Date: Fri Jun 09 2017 - 18:08:09 EST


On Friday, June 9, 2017 3:18:40 PM PDT Anatolij Gustschin wrote:
> On Fri, 9 Jun 2017 11:51:12 +0200
> Greg Kroah-Hartman gregkh@xxxxxxxxxxxxxxxxxxx wrote:
> ...
>
> >I get the following build error with this patch:
> >
> >ERROR: "__spi_register_driver" [drivers/fpga/altera-ps-spi.ko] undefined!
>
> it is due to enabled COMPILE_TEST and disabled CONFIG_SPI.
>
> >So I'll just ignore this whole series, can you fix these issues up and
> >resend?
>
> would "depends on SPI || (COMPILE_TEST && SPI)" in Kconfig be a proper
> fix for this? Anyone an idea?
>

> Thanks,
> Anatolij
I don't think that ends up being any different than "depends on SPI"
But, it is an SPI slave driver driver, after all.
COMPILE_TEST is intended to build stuff that can't work due to a lack of
hardware support, or lack of crosscompiler.
"selects SPI" would work, but is discouraged.

I just built successfully on native x86_64 with no problem, by enabling SPI.
"depends on SPI" is the right thing here.
I'm not sure when || COMPILE_TEST sneaked in there.

I'll submit a v13 with that small change.
--
~Joshua A Clayton