[PATCH v2 10/41] mtd: spi-nor: make sector_size optional

Michael Walle mwalle at kernel.org
Tue Sep 5 23:52:22 PDT 2023


>>  #define SPI_NOR_GEOMETRY(_sector_size, _n_sectors, _n_banks)		\
>>  	.size = (_sector_size) * (_n_sectors),				\
>> -	.sector_size = (_sector_size),					\
>> +	.sector_size = (_sector_size == SZ_64K) ? 0 : (_sector_size),	\
> 
> why do you clear the sector_size?

Because that is also a preparation for the large conversion, where the
default value of 64k is dropped. And to be able to verify (because you
can't really review these conversion patches) the ro segments are the
same, this patch already set it to zero if the INFO entry has the
default size.

I'll amend the commit message.

-michael



More information about the linux-mtd mailing list