Re: [PATCH RFC 2/7] mtd: spinand: Add support for clock to RX delay setting
From: Frank Li
Date: Tue Mar 03 2026 - 16:08:30 EST
From: Frank Li (AI-BOT) <frank.li@xxxxxxx>
> + spinand->spimem->spi->rx_sampling_delay_ns = table[i].rx_sampling_delay_ns;
Line exceeds 80 columns (currently ~85). Break into two lines or shorten
variable names.
Also, this assignment happens unconditionally for every matched device.
Should there be a null check on spinand->spimem or spinand->spimem->spi
before dereferencing? Or is this guaranteed to be initialized at this
point in the probe flow?
> + * @rx_sampling_delay_ns: clock to rx data delay timing (tCLQV)
Good. Clarifies the datasheet reference.
> + u32 rx_sampling_delay_ns;
Consider whether this field should be initialized to 0 or a sensible
default in the macro. Currently, devices that don't use the
SPINAND_RX_SAMPLING_DELAY() macro will have an uninitialized value
(likely 0 from kzalloc, but worth documenting).
> +#define SPINAND_RX_SAMPLING_DELAY(__delay) \
> + .rx_sampling_delay_ns = __delay
Macro looks fine. Consistent with existing SPINAND_* patterns.
---
AI bot review and may be useless.