[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <87tt70h2yc.fsf@bootlin.com>
Date: Mon, 07 Apr 2025 08:59:23 +0200
From: Miquel Raynal <miquel.raynal@...tlin.com>
To: Wentao Liang <vulab@...as.ac.cn>
Cc: richard@....at, vigneshr@...com, linux-mtd@...ts.infradead.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mtd: nand: Add error log for marvell_nfc_end_cmd()
Hello Liang,
On 07/04/2025 at 10:09:16 +08, Wentao Liang <vulab@...as.ac.cn> wrote:
> The function marvell_nfc_hw_ecc_bch_read_chunk() calls the function
> marvell_nfc_end_cmd(), but dose not check its return value. Since it
> is incorrect to bail from the loop if the marvell_nfc_end_cmd() fails,
> an error log is necessary to prevent silent failure.
The failure will not be silent, *_read_chunk() is called in
marvell_nfc_hw_ecc_bch_read_page() only, where the validity of the data
will be checked. If you really want to make it visible *there* I believe
the correct approach is to change the caller prototype and forward the
error instead.
Thanks,
Miquèl
Powered by blists - more mailing lists