Re: [PATCH] mtd: spi-nor: fix selection of uniform erase type in flexible conf

From: Tudor.Ambarus
Date: Fri Nov 16 2018 - 12:36:58 EST




On 11/16/2018 01:17 PM, Tudor Ambarus - M18064 wrote:

[cut]
> @@ -2729,9 +2751,8 @@ static int spi_nor_parse_bfpt(struct spi_nor *nor,
> * uniform_erase_type bitmask. The bitmask will be used later on when
> * selecting the uniform erase.
> */
> - spi_nor_regions_sort_erase_types(map);
> - map->uniform_erase_type = map->uniform_region.offset &
> - SNOR_ERASE_TYPE_MASK;
> + map->uniform_erase_type = spi_nor_sort_erase_mask(map,
> + map->uniform_erase_type);

Even if this particular change does not affect how erase works in uniform case,
it is not quite good because map->uniform_erase_type will not reflect what is in
map->uniform_region.offset & SNOR_ERASE_TYPE_MASK.

This change will be removed in v2.

Cheers,
ta