[PATCH v2 1/2] mtd: spi-nor: core: rework struct spi_nor_erase_region

Tudor Ambarus tudor.ambarus at linaro.org
Sun Feb 4 21:59:51 PST 2024



On 05.02.2024 06:21, Takahiro Kuwano wrote:
>>>  static u64 spi_nor_region_is_last(const struct spi_nor_erase_region *region)
>>>  {
>>> -    return region->offset & SNOR_LAST_REGION;
>>> +    return region->flags & SNOR_LAST_REGION;
>>>  }
>> Do you think we can get rid of this, too? Just save the number
>> of erase regions instead of having this flag. IIRC Tudor had also
>> suggested this.
>>
> Yes, I will remove this and rework related functions.
> 
> If we remove this flag, the SNOR_OVERLAID_REGION will be only one flag.
> How about removing the SNOR_OVERLAID_REGION as well, and change 'region->flags'
> to a bool value like 'region->overlaid'?

sounds good, yes. Thanks!



More information about the linux-mtd mailing list