[PATCH] mtd: spi-nor: spansion: Rename method to cypress_nor_get_page_size

Tudor Ambarus tudor.ambarus at linaro.org
Tue Apr 18 03:25:15 PDT 2023



On 4/18/23 10:29, Michael Walle wrote:
> Am 2023-04-05 08:04, schrieb Tudor Ambarus:
>> The method queries SPINOR_REG_CYPRESS_CFR3V to determine the page size.
>> Rename the method accordingly, s/set/get.
> 
> I'm not sure about this one. There is also a
> cypress_nor_set_addr_mode_nbytes() which queries the flash and
> set the params->addr_nbytes and params->addr_mode_nbytes.
> 
> cypress_nor_set_page_size() also queries the flash and set
> params->page_size.
> 
> Secondly, if this function is called get_page_size() I'd assume it
> doesn't modify anything. But thats not true.
> 

Indeed. Maybe I should have returned the page_size instead or don't
change the name at all. I applied this patch as part of
https://lore.kernel.org/linux-mtd/168093614108.51189.3153773628255664983.b4-ty@linaro.org/

Feel free to send a patch on top of latest spi-nor branch, otherwise
I'll handle it after the merge window.

Cheers,
ta.



More information about the linux-mtd mailing list