Linux-mtd Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Itai Handler <itai.handler@gmail.com>
To: miquel.raynal@bootlin.com
Cc: mwalle@kernel.org, pratyush@kernel.org, richard@nod.at,
	vigneshr@ti.com, takahiro.kuwano@infineon.com,
	tudor.ambarus@linaro.org, linux-mtd@lists.infradead.org,
	linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH v5] mtd: spi-nor: take the flash lock around spi_nor_restore()
Date: Wed, 18 Nov 2026 19:13:20 +0200	[thread overview]
Message-ID: <20261118171320.3887035-1-itai.handler@gmail.com> (raw)
In-Reply-To: <87bj7mi5gy.fsf@bootlin.com>

On Wed Nov 18, 2026 at 3:23 PM CET, Miquel Raynal wrote:
>>> +	ret = spi_nor_prep_and_lock(nor);
>>> +	if (ret == -ESHUTDOWN)
>>
>> This is actually really hard to follow.
>
> Yes, I tried to review this patch and eventually stopped. Please teach
> your AI to not overengineer its solutions.

Sorry for the time it cost you. That one is on me: I sent it, and I
should have made it simpler before sending it.

v6 is simpler. It follows Michael's sketch: spi_nor_restore() takes
the lock itself and then sets a "restored" flag, and the lock helpers
fail any later operation with -EIO. The extra helper and the special
error code are gone, and the commit message is about half as long.
The diff is longer than v5's only because the _pe and _rd unlock
helpers move up, as Michael asked.

Thanks,
Itai

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

  reply	other threads:[~2026-11-18 17:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-29 21:01 [PATCH v5] mtd: spi-nor: take the flash lock around spi_nor_restore() Itai Handler
2026-11-10  8:27 ` Itai Handler
2026-11-18 13:33 ` Michael Walle
2026-11-18 14:23   ` Miquel Raynal
2026-11-18 17:13     ` Itai Handler [this message]
2026-11-18 17:12   ` Itai Handler

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=20261118171320.3887035-1-itai.handler@gmail.com \
    --to=itai.handler@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=miquel.raynal@bootlin.com \
    --cc=mwalle@kernel.org \
    --cc=pratyush@kernel.org \
    --cc=richard@nod.at \
    --cc=stable@vger.kernel.org \
    --cc=takahiro.kuwano@infineon.com \
    --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