* [PATCH] spi: spi-qpic: fix common module build
@ 2025-04-07 7:27 Arnd Bergmann
2025-04-07 8:00 ` Miquel Raynal
0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2025-04-07 7:27 UTC (permalink / raw)
To: Miquel Raynal, Richard Weinberger, Vignesh Raghavendra,
Md Sadre Alam, Mark Brown, Varadarajan Narayanan,
Sricharan Ramabadhran
Cc: Arnd Bergmann, linux-mtd, linux-kernel
From: Arnd Bergmann <arnd@arndb.de>
When the NAND driver is a loadable module, and the SPI driver is
turned off, the common part is not built:
ERROR: modpost: "qcom_nandc_unalloc" [drivers/spi/spi-qpic-snand.ko] undefined!
ERROR: modpost: "qcom_write_reg_dma" [drivers/spi/spi-qpic-snand.ko] undefined!
ERROR: modpost: "qcom_read_reg_dma" [drivers/spi/spi-qpic-snand.ko] undefined!
ERROR: modpost: "qcom_nandc_dev_to_mem" [drivers/spi/spi-qpic-snand.ko] undefined!
ERROR: modpost: "qcom_nandc_alloc" [drivers/spi/spi-qpic-snand.ko] undefined!
ERROR: modpost: "qcom_submit_descs" [drivers/spi/spi-qpic-snand.ko] undefined!
ERROR: modpost: "qcom_clear_read_regs" [drivers/spi/spi-qpic-snand.ko] undefined!
ERROR: modpost: "qcom_clear_bam_transaction" [drivers/spi/spi-qpic-snand.ko] undefined!
ERROR: modpost: "qcom_read_data_dma" [drivers/spi/spi-qpic-snand.ko] undefined!
ERROR: modpost: "qcom_write_data_dma" [drivers/spi/spi-qpic-snand.ko] undefined!
Simplify the Makefile to just build the common bits for either of the two,
so it will be built-in whenever one of them is, or otherwise a loadable
module if needed.
Fixes: 7304d1909080 ("spi: spi-qpic: add driver for QCOM SPI NAND flash Interface")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/mtd/nand/Makefile | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/mtd/nand/Makefile b/drivers/mtd/nand/Makefile
index db516a45f0c5..44913ff1bf12 100644
--- a/drivers/mtd/nand/Makefile
+++ b/drivers/mtd/nand/Makefile
@@ -3,11 +3,8 @@
nandcore-objs := core.o bbt.o
obj-$(CONFIG_MTD_NAND_CORE) += nandcore.o
obj-$(CONFIG_MTD_NAND_ECC_MEDIATEK) += ecc-mtk.o
-ifeq ($(CONFIG_SPI_QPIC_SNAND),y)
obj-$(CONFIG_SPI_QPIC_SNAND) += qpic_common.o
-else
obj-$(CONFIG_MTD_NAND_QCOM) += qpic_common.o
-endif
obj-y += onenand/
obj-y += raw/
obj-y += spi/
--
2.39.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] spi: spi-qpic: fix common module build
2025-04-07 7:27 [PATCH] spi: spi-qpic: fix common module build Arnd Bergmann
@ 2025-04-07 8:00 ` Miquel Raynal
0 siblings, 0 replies; 2+ messages in thread
From: Miquel Raynal @ 2025-04-07 8:00 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Richard Weinberger, Vignesh Raghavendra, Md Sadre Alam,
Mark Brown, Varadarajan Narayanan, Sricharan Ramabadhran,
Arnd Bergmann, linux-mtd, linux-kernel
Hi Arnd,
On 07/04/2025 at 09:27:14 +02, Arnd Bergmann <arnd@kernel.org> wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> When the NAND driver is a loadable module, and the SPI driver is
> turned off, the common part is not built:
>
> ERROR: modpost: "qcom_nandc_unalloc" [drivers/spi/spi-qpic-snand.ko] undefined!
> ERROR: modpost: "qcom_write_reg_dma" [drivers/spi/spi-qpic-snand.ko] undefined!
> ERROR: modpost: "qcom_read_reg_dma" [drivers/spi/spi-qpic-snand.ko] undefined!
> ERROR: modpost: "qcom_nandc_dev_to_mem" [drivers/spi/spi-qpic-snand.ko] undefined!
> ERROR: modpost: "qcom_nandc_alloc" [drivers/spi/spi-qpic-snand.ko] undefined!
> ERROR: modpost: "qcom_submit_descs" [drivers/spi/spi-qpic-snand.ko] undefined!
> ERROR: modpost: "qcom_clear_read_regs" [drivers/spi/spi-qpic-snand.ko] undefined!
> ERROR: modpost: "qcom_clear_bam_transaction" [drivers/spi/spi-qpic-snand.ko] undefined!
> ERROR: modpost: "qcom_read_data_dma" [drivers/spi/spi-qpic-snand.ko] undefined!
> ERROR: modpost: "qcom_write_data_dma" [drivers/spi/spi-qpic-snand.ko] undefined!
>
> Simplify the Makefile to just build the common bits for either of the two,
> so it will be built-in whenever one of them is, or otherwise a loadable
> module if needed.
>
> Fixes: 7304d1909080 ("spi: spi-qpic: add driver for QCOM SPI NAND flash Interface")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Thanks for the fix, I just applied Geert's identical patch this morning,
I was waiting for -rc1 to synchronize everything again:
https://lore.kernel.org/linux-mtd/174401012746.998658.11206994348683987630.b4-ty@bootlin.com/T/#t
Sorry for the delay.
Thanks,
Miquèl
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-04-07 8:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-07 7:27 [PATCH] spi: spi-qpic: fix common module build Arnd Bergmann
2025-04-07 8:00 ` Miquel Raynal
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox