public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Amit Kumar Mahapatra <amit.kumar-mahapatra@amd.com>
Cc: <richard@nod.at>,  <vigneshr@ti.com>,  <robh@kernel.org>,
	<krzk+dt@kernel.org>,  <conor+dt@kernel.org>,
	<linux-mtd@lists.infradead.org>,  <devicetree@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>,  <git@amd.com>,
	<amitrkcian2002@gmail.com>,
	 Bernhard Frauendienst <kernel@nospam.obeliks.de>
Subject: Re: [PATCH v13 3/3] mtd: Add driver for concatenating devices
Date: Wed, 04 Jun 2025 10:21:50 +0200	[thread overview]
Message-ID: <87sekfkjc1.fsf@bootlin.com> (raw)
In-Reply-To: <20250603194209.1341374-4-amit.kumar-mahapatra@amd.com> (Amit Kumar Mahapatra's message of "Wed, 4 Jun 2025 01:12:09 +0530")

Hi Amit,

> --- a/include/linux/mtd/concat.h
> +++ b/include/linux/mtd/concat.h
> @@ -28,5 +28,37 @@ struct mtd_info *mtd_concat_create(
>  
>  void mtd_concat_destroy(struct mtd_info *mtd);
>  
> +/**
> + * mtd_virt_concat_node_create - Create a component for concatenation
> + *
> + * Returns a positive number representing the no. of devices found for
> + * concatenation, or a negative error code.
> + *
> + * List all the devices for concatenations found in DT and create a
> + * component for concatenation.
> + */
> +int mtd_virt_concat_node_create(void);
> +
> +/**
> + * mtd_virt_concat_add - add mtd_info object to the list of subdevices for concatenation
> + * @mtd: pointer to new MTD device info structure
> + *
> + * Returns true if the mtd_info object is added successfully else returns false.
> + *
> + * The mtd_info object is added to the list of subdevices for concatenation.
> + * It returns true if a match is found, and false if all subdevices have
> + * already been added or if the mtd_info object does not match any of the
> + * intended MTD devices.
> + */
> +bool mtd_virt_concat_add(struct mtd_info *mtd);
> +
> +/**
> + * mtd_virt_concat_create_join - Create and register the concatenated MTD device
> + *
> + * Returns on succes, or a negative error code.
> + *
> + * Creates and registers the concatenated MTD device
> + */
> +int mtd_virt_concat_create_join(void);
>  #endif

Don't we miss some destructors? It seems that removing the mtd device or
the concat module might lead to an unstable state. Can you please test
these two situations?

Thanks,
Miquèl

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

  reply	other threads:[~2025-06-04  8:45 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-03 19:42 [PATCH v13 0/3] mtd: Add support for stacked memories Amit Kumar Mahapatra
2025-06-03 19:42 ` [PATCH v13 1/3] dt-bindings: mtd: Describe MTD partitions concatenation Amit Kumar Mahapatra
2025-06-05 13:47   ` Rob Herring
2025-06-03 19:42 ` [PATCH v13 2/3] mtd: Move struct mtd_concat definition to header file Amit Kumar Mahapatra
2025-06-03 19:42 ` [PATCH v13 3/3] mtd: Add driver for concatenating devices Amit Kumar Mahapatra
2025-06-04  8:21   ` Miquel Raynal [this message]
2025-06-05  4:58     ` Mahapatra, Amit Kumar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87sekfkjc1.fsf@bootlin.com \
    --to=miquel.raynal@bootlin.com \
    --cc=amit.kumar-mahapatra@amd.com \
    --cc=amitrkcian2002@gmail.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=git@amd.com \
    --cc=kernel@nospam.obeliks.de \
    --cc=krzk+dt@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=richard@nod.at \
    --cc=robh@kernel.org \
    --cc=vigneshr@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox