From: Richard GENOUD <richard.genoud@bootlin.com>
To: "Jernej Škrabec" <jernej.skrabec@gmail.com>,
"Miquel Raynal" <miquel.raynal@bootlin.com>,
"Richard Weinberger" <richard@nod.at>,
"Vignesh Raghavendra" <vigneshr@ti.com>,
"Chen-Yu Tsai" <wens@csie.org>,
"Samuel Holland" <samuel@sholland.org>
Cc: Wentao Liang <vulab@iscas.ac.cn>,
Maxime Ripard <mripard@kernel.org>,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
linux-mtd@lists.infradead.org,
linux-arm-kernel@lists.infradead.org,
linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/6] mtd: rawnand: sunxi: fix sunxi_nand_ooblayout_free
Date: Thu, 5 Mar 2026 10:25:57 +0100 [thread overview]
Message-ID: <2d65c928-8b4e-4224-93db-a1430945d719@bootlin.com> (raw)
In-Reply-To: <5967652.DvuYhMxLoT@jernej-laptop>
Le 21/02/2026 à 10:13, Jernej Škrabec a écrit :
> Dne petek, 20. februar 2026 ob 17:10:06 Srednjeevropski standardni čas je Richard Genoud napisal(a):
>> The available length is really USER_DATA_LEN - 2 instead of just 2 (the
>> user data length minus the BBM length)
>> That doesn't change anything now, but if USER_DATA_LEN changes, it will.
>
> s/USER_DATA_LEN/USER_DATA_SZ/
>
>>
>> Signed-off-by: Richard Genoud <richard.genoud@bootlin.com>
>
> If this is really a fix as subject suggest, then Fixes tag is in order. However,
> this looks more like code refactor as end result is the same. So maybe
> reword subject?
Yes, it's more a code clarification, I'll reword that.
Thanks!
>
> Best regards,
> Jernej
>
>> ---
>> drivers/mtd/nand/raw/sunxi_nand.c | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/mtd/nand/raw/sunxi_nand.c b/drivers/mtd/nand/raw/sunxi_nand.c
>> index 9dcdc93734cb..c420909b944b 100644
>> --- a/drivers/mtd/nand/raw/sunxi_nand.c
>> +++ b/drivers/mtd/nand/raw/sunxi_nand.c
>> @@ -1761,12 +1761,12 @@ static int sunxi_nand_ooblayout_free(struct mtd_info *mtd, int section,
>>
>> /*
>> * The first 2 bytes are used for BB markers, hence we
>> - * only have 2 bytes available in the first user data
>> + * only have USER_DATA_SZ - 2 bytes available in the first user data
>> * section.
>> */
>> if (!section && ecc->engine_type == NAND_ECC_ENGINE_TYPE_ON_HOST) {
>> oobregion->offset = 2;
>> - oobregion->length = 2;
>> + oobregion->length = USER_DATA_SZ - 2;
>>
>> return 0;
>> }
>>
>
>
>
>
next prev parent reply other threads:[~2026-03-05 9:26 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-20 16:10 [PATCH 0/6] mtd: rawnand: sunxi: Fixes user data length for H6 Richard Genoud
2026-02-20 16:10 ` [PATCH 1/6] mtd: rawnand: sunxi: fix sunxi_nand_ooblayout_free Richard Genoud
2026-02-21 9:13 ` Jernej Škrabec
2026-03-05 9:25 ` Richard GENOUD [this message]
2026-02-20 16:10 ` [PATCH 2/6] mtd: rawnand: sunxi: fix sunxi_nfc_hw_ecc_read_extra_oob Richard Genoud
2026-02-21 9:15 ` Jernej Škrabec
2026-02-20 16:10 ` [PATCH 3/6] mtd: rawnand: sunxi: do not count BBM bytes twice Richard Genoud
2026-02-21 9:21 ` Jernej Škrabec
2026-03-05 9:43 ` Richard GENOUD
2026-02-20 16:10 ` [PATCH 4/6] mtd: rawnand: sunxi: replace hard coded value by a define - take2 Richard Genoud
2026-02-21 9:23 ` Jernej Škrabec
2026-03-05 9:44 ` Richard GENOUD
2026-02-20 16:10 ` [PATCH 5/6] mtd: rawnand: sunxi: make the code mode self-explanatory Richard Genoud
2026-02-21 9:33 ` Jernej Škrabec
2026-02-20 16:10 ` [PATCH 6/6] mtd: rawnand: sunxi: introduce variable user data length Richard Genoud
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=2d65c928-8b4e-4224-93db-a1430945d719@bootlin.com \
--to=richard.genoud@bootlin.com \
--cc=jernej.skrabec@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=linux-sunxi@lists.linux.dev \
--cc=miquel.raynal@bootlin.com \
--cc=mripard@kernel.org \
--cc=richard@nod.at \
--cc=samuel@sholland.org \
--cc=thomas.petazzoni@bootlin.com \
--cc=vigneshr@ti.com \
--cc=vulab@iscas.ac.cn \
--cc=wens@csie.org \
/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