Re: [PATCH 10/28] mtd: spinand: Make use of the operation templates through SPINAND_OP()

From: Tudor Ambarus

Date: Thu Nov 20 2025 - 03:35:51 EST




On 11/19/25 7:23 PM, Miquel Raynal wrote:
> On 05/11/2025 at 17:28:29 +01, Tudor Ambarus <tudor.ambarus@xxxxxxxxxx> wrote:
>
>> On 10/31/25 6:26 PM, Miquel Raynal wrote:
>>> index 4afebaf5f0195b9bc617ea1f125f637f76fff9f8..a8fd04a67cfa9925bd68c57539d86e0816b76274 100644
>>> --- a/include/linux/mtd/spinand.h
>>> +++ b/include/linux/mtd/spinand.h
>>> @@ -701,6 +701,93 @@ struct spinand_device {
>>> unsigned int retry_mode);
>>> };
>>>
>>> +static inline struct spi_mem_op
>>
>> Do we still do inlines?
>
> Defining functions in headers like that, I think yes? (static inline,
> not just inline). The full line is something like:
>
> +static inline struct spi_mem_op
> +spinand_fill_reset_op(struct spinand_device *spinand)
> +{
>
> So it's not an inline declaration of a variable, but the definition of a
> function (just saying, in case the diff mislead you).

I saw it's a static inline function. Check this please:
https://lore.kernel.org/all/Pine.LNX.4.64.0601021105000.3668@xxxxxxxxxxx/T/#u