[PATCH v2] mtd: spi-nor: Check for zero erase size in spi_nor_find_best_erase_type()

Alexander Sverdlin alexander.sverdlin at nokia.com
Mon Dec 20 04:34:56 PST 2021


Hi!

On 20/12/2021 12:28, Tudor.Ambarus at microchip.com wrote:
>> I however run the above patch because of the reasons described in the commit message.
>> Nevertheless, the bug fixed now remains a bug no matter what triggers it.
> I'm not yet convinced that this is the best way to fix it. Should we update
> the erase mask to cover this case?

Well, let's wait until the maintainers form their opinion. I've listed the functions which
zero the size (spi_nor_parse_4bait() or spi_nor_init_non_uniform_erase_map()), there are
already functions which check for zero:
spi_nor_select_uniform_erase()
spi_nor_select_erase()

-- 
Best regards,
Alexander Sverdlin.



More information about the linux-mtd mailing list