[PATCH v15 0/3] mtd: Add support for stacked memories

Luca Ceresoli luca.ceresoli at bootlin.com
Fri Jan 30 07:40:59 PST 2026


Hi Miquèl,

On Fri Jan 30, 2026 at 3:32 PM CET, Miquel Raynal wrote:
> Hello,
>
> On 29/01/2026 at 20:15:32 +01, Miquel Raynal <miquel.raynal at bootlin.com> wrote:
>
>> On Thu, 29 Jan 2026 13:09:26 +0100, Luca Ceresoli wrote:
>>> [TL;DR for v15: as agreed with Amit I'm sending a new iteration of his
>>> patches to fix the build-time failure due to a module dependency
>>> loop. Original cover follows.]
>>>
>>> This patch series adds stacked support by enhancing the existing mtd-concat
>>> driver to be more generic.
>>>
>>> [...]
>>
>> Thank you for finally re-sending the series after fixing the robot
>> warning, I will not wait for merging it because this needs to finally
>> get in, and it's been over the mailing list for 8 months with just a
>> Kconfig symbol to fix, so:
>
> Unfortunately, for the third time, this series breaks when robots go
> over it (see the oe-kbuild-all at lists.linux.dev ML), so I will drop it
> again :-/

Oh, no!

For the records, here are the reports:

  https://lore.kernel.org/oe-kbuild-all/202601302048.TyA0Uh81-lkp@intel.com/T/#u
  https://lore.kernel.org/oe-kbuild-all/202601302001.mGwPwhGE-lkp@intel.com/T/#u

My bad, I apparently haven't tested with CONFIG_MTD_PARTITIONED_MASTER
disabled on the final code. Sorry about that!

At a quick look I think this is the right fix:

	diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c
	index 3760065c4e08..48de269f4514 100644
	--- a/drivers/mtd/mtdcore.c
	+++ b/drivers/mtd/mtdcore.c
	@@ -2638,8 +2638,10 @@ static int __init init_mtd(void)

	 static void __exit cleanup_mtd(void)
	 {
	+	if (IS_REACHABLE(CONFIG_MTD_VIRT_CONCAT)) {
	 		mtd_virt_concat_destroy_joins();
	 		mtd_virt_concat_destroy_items();
	+	}
	 	debugfs_remove_recursive(dfs_dir_mtd);
	 	cleanup_mtdchar();
	 	if (proc_mtd)

It passes my my quick build tests, but I'll wait until next week to double
check and test on hardware before resending.

Luca

--
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com



More information about the linux-mtd mailing list