Re: [PATCH v2 16/35] mtd: spi-nor: core: Mark default_init() as deprecated
From: Pratyush Yadav <hidden>
Date: 2021-08-16 19:39:07
On 27/07/21 07:52AM, Tudor Ambarus wrote:
The goal is to remove the spagetti init of params. The flash should
be initialized by the SFDP data, and when SFDP tables are not defined,
by the flash_info flags. SFDP data can be corrected by the
post_{bfpt, sfdp} when wrong, and in case of flash_info flags init,
we'll use the late_init() hook, where checking for the
SPI_NOR_SKIP_SFDP flag.Why depreciate it? It is not like we have external callers that we need to notify. We know and control all the users of this function. Just move all users to late_init() and delete this. You have already done a large part of that work in the previous patches. Why not convert all other callers as well? Is there some complicated piece of code that stops you from touching it for now?
quoted hunk ↗ jump to hunk
Signed-off-by: Tudor Ambarus <redacted> --- drivers/mtd/spi-nor/core.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)diff --git a/drivers/mtd/spi-nor/core.h b/drivers/mtd/spi-nor/core.h index 13d5c5edfd27..625f4eed75f1 100644 --- a/drivers/mtd/spi-nor/core.h +++ b/drivers/mtd/spi-nor/core.h@@ -289,9 +289,8 @@ struct spi_nor_flash_parameter { /** * struct spi_nor_fixups - SPI NOR fixup hooks - * @default_init: called after default flash parameters init. Used to tweak - * flash parameters when information provided by the flash_info - * table is incomplete or wrong. + * @default_init: Deprecated. Use the post_{bfpt, sfdp}, or the late_init() + * hooks instead. * @post_bfpt: called after the BFPT table has been parsed * @post_sfdp: called after SFDP has been parsed (is also called for SPI NORs * that do not support RDSFDP). Typically used to tweak various-- 2.25.1
-- Regards, Pratyush Yadav Texas Instruments Inc. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel