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

Pratyush Yadav p.yadav at ti.com
Mon Nov 15 02:59:16 PST 2021


On 29/10/21 08:26PM, Tudor Ambarus wrote:
> "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: Pratyush Yadav <p.yadav at ti.com>

-- 
Regards,
Pratyush Yadav
Texas Instruments Inc.



More information about the linux-mtd mailing list