[PATCH 2/2] mtd: spi-nor: Rename spi_nor_spimem_check_op()

Miquel Raynal miquel.raynal at bootlin.com
Tue Mar 17 06:18:21 PDT 2026


On 17/03/2026 at 13:39:36 +02, Tudor Ambarus <tudor.ambarus at linaro.org> wrote:

> On 3/17/26 11:33 AM, Miquel Raynal wrote:
>> 
>>>> -static int spi_nor_spimem_check_op(struct spi_nor *nor,
>>>> -				   struct spi_mem_op *op)
>>>> +static int spi_nor_spimem_check_page_op(struct spi_nor *nor,
>>>> +					struct spi_mem_op *op)
>>>
>>> page is a bit misleading as it can indicate it's used just for page
>>> programs. We need to focus on operations that need address bytes,
>>> reads, pp, page scrub, erase, write/read any register, etc.
>> 
>> This helper is only used for reads and page programs. The point is
>> to not use it when reading/writing registers.
>> 
>
> you're right, it comes from hwcaps, where we verify the reads and pp.
>
>> What about spi_nor_spimem_check_io_op() ? or _iorw_op() ?
>
> spi_nor_spimem_check_hwcaps_op?
>
> IO is involved with read/write any reg.
> rw may work, but it can be applied to registers too.
>
> or maybe spi_nor_spimem_check_read_pp_op?

Ah, this one I almost proposed it, so let's go for it!

Thanks for the feedback!

Miquèl



More information about the linux-mtd mailing list