From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Tudor Ambarus <tudor.ambarus@linaro.org>
Cc: Renjun Wang <renjunw0@foxmail.com>,
Pratyush Yadav <pratyush@kernel.org>,
Michael Walle <mwalle@kernel.org>,
Richard Weinberger <richard@nod.at>,
Vignesh Raghavendra <vigneshr@ti.com>,
linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mtd: spi-nor: extend description of size member of struct flash_info
Date: Thu, 19 Dec 2024 17:15:52 +0100 [thread overview]
Message-ID: <871py3abt3.fsf@bootlin.com> (raw)
In-Reply-To: <4660f0ea-b1d1-46c3-b5ea-efe549c9adf6@linaro.org> (Tudor Ambarus's message of "Thu, 19 Dec 2024 10:01:41 +0000")
On 19/12/2024 at 10:01:41 GMT, Tudor Ambarus <tudor.ambarus@linaro.org> wrote:
> On 12/19/24 9:38 AM, Miquel Raynal wrote:
>> On 19/12/2024 at 09:20:04 GMT, Tudor Ambarus <tudor.ambarus@linaro.org> wrote:
>>
>>> We use the size as an indicator whether to parse SFDP or not. We don't
>>> introduce a dedicated member for SFDP parsing because we'd like to keep
>>> the struct size at a minimum, as it's used for every flash declaration.
>>> Ideally we won't have flash entries at all, but there are still flash
>>> parameters that aren't defined by SFDP, thus we need to statically
>>> specify them.
>>
>> TBH I'd be perfectly fine (and prefer) a dedicated member, because
>> code clarity is IMO more important than memory footprint today.
>>
>> However for now I am totally agreeing with changes clarifying what we
>> currently do, so:
>>
>> Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
>>
>> One minor nit below though:
>>
>>> + * @size: the size of the flash in bytes. The flash size is one
>>> + * property parsed by the SFDP. We use it as an indicator
>>> + * whether we need SFDP parsing for a particular flash.
>>> + * I.e. non-legacy flash entries in flash_info will have
>>> + * a size of zero iff SFDP should be used.
>>
>> typo, 'if' ^^^
>>
>
> iff is a conjunction: if and only if.
>
> I think Michael used it to emphasize that we don't allow size > 0 when
> we want SFDP parsing. Using if allows it.
Ah, ok, I didn't know the abbreviation.
next prev parent reply other threads:[~2024-12-19 16:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-19 9:20 [PATCH] mtd: spi-nor: extend description of size member of struct flash_info Tudor Ambarus
2024-12-19 9:38 ` Miquel Raynal
2024-12-19 10:01 ` Tudor Ambarus
2024-12-19 16:15 ` Miquel Raynal [this message]
2024-12-20 8:36 ` Michael Walle
2024-12-20 8:59 ` Miquel Raynal
2025-01-13 17:52 ` 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=871py3abt3.fsf@bootlin.com \
--to=miquel.raynal@bootlin.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=mwalle@kernel.org \
--cc=pratyush@kernel.org \
--cc=renjunw0@foxmail.com \
--cc=richard@nod.at \
--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