Re: [PATCH v4 02/13] mtd: spi-nor: Introduce spi_nor_set_mtd_info()
From: <hidden>
Date: 2021-12-03 12:07:29
On 12/2/21 11:19 AM, Pratyush Yadav wrote:
EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe On 22/11/21 11:50AM, Tudor Ambarus wrote:quoted
Used to init all the mtd_info fields. Move the mtd_info init the last thing in the spi_nor_scan(), so that we avoid superfluous initialization of the mtd_info fields in case of errors. While here use common naming scheme for functions that are setting mtd_info fields: s/spi_nor_register_locking_ops/spi_nor_set_mtd_locking_ops s/spi_nor_otp_init/spi_nor_set_mtd_otp_ops The functions names are self explanatory, get rid of the comment for the OTP function. Signed-off-by: Tudor Ambarus <redacted> Reviewed-by: Michael Walle <redacted>I am not particularly happy with spi_nor_try_unlock_all() using nor->mtd, but I can live with it. Reviewed-by: Pratyush Yadav <redacted> One small nitpick below.quoted
- /* Configure OTP parameters and ops */ - spi_nor_otp_init(nor); + /* No mtd_info fields are used up to this point. */How about "No mtd_info fields should be used up to this point" so we give the programmer a command to not use mtd_info fields rather than just stating a fact.
ok, will do. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel