From: Pratyush Yadav <pratyush@kernel.org>
To: Michael Walle <mwalle@kernel.org>
Cc: Tudor Ambarus <tudor.ambarus@linaro.org>,
Pratyush Yadav <pratyush@kernel.org>,
Miquel Raynal <miquel.raynal@bootlin.com>,
Richard Weinberger <richard@nod.at>,
Vignesh Raghavendra <vigneshr@ti.com>,
linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org, Jean-Marc Ranger <jmranger@hotmail.com>
Subject: Re: [PATCH] mtd: spi-nor: Fix spi_nor_try_unlock_all()
Date: Thu, 03 Jul 2025 16:36:30 +0200 [thread overview]
Message-ID: <mafs0sejd1gup.fsf@kernel.org> (raw)
In-Reply-To: <20250701140426.2355182-1-mwalle@kernel.org>
On Tue, Jul 01 2025, Michael Walle wrote:
> Commit ff67592cbdfc ("mtd: spi-nor: Introduce spi_nor_set_mtd_info()")
> moved all initialization of the mtd fields at the end of spi_nor_scan().
> Normally, the mtd info is only needed for the mtd ops on the device,
> with one exception: spi_nor_try_unlock_all(), which will also make use
> of the mtd->size parameter. With that commit, the size will always be
> zero because it is not initialized. Fix that by not using the size of
> the mtd_info struct, but use the size from struct spi_nor_flash_parameter.
I suppose some of this code would be cleaner if we declared a size
variable instead of typing out nor->params->size every time, but I don't
think it matters too much so this patch is fine too. Thanks for fixing
this!
Reviewed-by: Pratyush Yadav <pratyush@kernel.org>
[...]
--
Regards,
Pratyush Yadav
next prev parent reply other threads:[~2025-07-03 14:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-01 14:04 [PATCH] mtd: spi-nor: Fix spi_nor_try_unlock_all() Michael Walle
2025-07-03 14:36 ` Pratyush Yadav [this message]
2025-07-03 15:13 ` Pratyush Yadav
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=mafs0sejd1gup.fsf@kernel.org \
--to=pratyush@kernel.org \
--cc=jmranger@hotmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=miquel.raynal@bootlin.com \
--cc=mwalle@kernel.org \
--cc=richard@nod.at \
--cc=stable@vger.kernel.org \
--cc=tudor.ambarus@linaro.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