[PATCH] mtd: spi-nor: extend description of size member of struct flash_info
Miquel Raynal
miquel.raynal at bootlin.com
Thu Dec 19 01:38:56 PST 2024
On 19/12/2024 at 09:20:04 GMT, Tudor Ambarus <tudor.ambarus at 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 at 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' ^^^
Cheers,
Miquèl
More information about the linux-mtd
mailing list