[PATCH v3 02/25] mtd: spi-nor: core: Use container_of to get the pointer to struct spi_nor

Michael Walle michael at walle.cc
Tue Nov 9 00:21:15 PST 2021


Am 2021-10-29 19:26, schrieb Tudor Ambarus:
> "struct mtd_info mtd" is member of "struct spi_nor", there's no need
> to use "mtd->priv". Get the pointer to the containing struct spi_nor
> by using container_of. While here, make the function inline and
> get rid of the __maybe_unused.
> 
> Signed-off-by: Tudor Ambarus <tudor.ambarus at microchip.com>

Reviewed-by: Michael Walle <michael at walle.cc>



More information about the linux-arm-kernel mailing list