Re: [PATCH] mtd: rawnand: qcom: embed nand_controller into qcom_nand_controller

From: Miquel Raynal

Date: Wed May 27 2026 - 05:16:53 EST


On Mon, 25 May 2026 15:04:40 -0700, Rosen Penev wrote:
> The qcom_nand_controller had a struct nand_controller *controller
> pointer that was assigned to (struct nand_controller *)&nandc[1],
> with the allocation oversized by sizeof(*controller) to make room.
> get_qcom_nand_controller() then walked backwards from chip->controller
> using sizeof()-based arithmetic to recover the enclosing nandc.
>
> Embed the nand_controller directly into qcom_nand_controller and use
> container_of() in get_qcom_nand_controller(). The header now needs
> the full rawnand.h definition rather than a forward declaration.
>
> [...]

Applied to nand/next, thanks!

[1/1] mtd: rawnand: qcom: embed nand_controller into qcom_nand_controller
commit: 7fbdbc7d028a20a78b7d28a9510a216c76b5fbfd

Patche(s) should be available on mtd/linux.git and will be
part of the next PR (provided that no robot complains by then).

Kind regards,
Miquèl