[PATCH v2 02/35] mtd: spi-nor: core: Report correct name in case of ID collisions
Michael Walle
michael at walle.cc
Mon Aug 23 15:32:27 PDT 2021
Am 2021-08-04 10:23, schrieb Pratyush Yadav:
> On 27/07/21 07:51AM, Tudor Ambarus wrote:
>> Provide a way to report the correct flash name in case of ID
>> collisions.
>> There will be a single flash_info entry when flash IDs collide, and
>> the
>> differentiation between the flash types will be made at runtime
>> if possible.
>
> I have the same comments as last time around. I am not convinced that
> this approach is better than having multiple entries, one for each
> colliding flash. I wonder how you will handle different fixups for the
> colliding flashes for example, since nor->info is const.
I thought of multple entries in xx_parts[], too. But how would you
choose
between those? The flash id is the same, only the name would be
different.
Searching by name seems cumbersome. Also, the fixup of the first match
will change the pointer (or maybe an additional pointer, so we still
have the original match), and thus also changes the pointer to the fixup
itself.
-michael
More information about the linux-mtd
mailing list