[PATCH v5 12/13] spi: mxic: Use spi_mem_generic_supports_op()
Boris Brezillon
boris.brezillon at collabora.com
Wed Dec 15 10:52:19 PST 2021
On Wed, 15 Dec 2021 18:44:26 +0100
Miquel Raynal <miquel.raynal at bootlin.com> wrote:
> In order to keep the series easy to review I decided to go for the
> following approach:
> * Introduce the spi_mem_generic_supports_op_helper() which takes a
> capabilities structure. This helper gathers all the checks from
> spi_mem_default_supports_op() and spi_mem_dtr_supports_op(). These
> two helpers now call the new one with either a NULL pointer in the
> former case, or a structure with the .dtr parameter set to true in
> the latter.
Is there a benefit adding an extra NULL check when you could make sure
all callers pass a zero-initialized caps object when they don't support
fancy features like DTR or ECC.
More information about the linux-mtd
mailing list