[PATCH v2 2/5] mtd: spi-nor: core: Add vdbg msg for spi_nor_erase_multi_sectors()
Pratyush Yadav
p.yadav at ti.com
Mon Mar 8 06:21:37 GMT 2021
On 06/03/21 11:49AM, Tudor Ambarus wrote:
> Useful when debugging non-uniform erase.
>
> Signed-off-by: Tudor Ambarus <tudor.ambarus at microchip.com>
> ---
> v2:
> - s/dev_dbg/dev_vdb
> - move vdbg message the first thing in the while
>
> drivers/mtd/spi-nor/core.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/mtd/spi-nor/core.c b/drivers/mtd/spi-nor/core.c
> index bcaa161bc7db..498da1ec3a89 100644
> --- a/drivers/mtd/spi-nor/core.c
> +++ b/drivers/mtd/spi-nor/core.c
> @@ -1610,6 +1610,9 @@ static int spi_nor_erase_multi_sectors(struct spi_nor *nor, u64 addr, u32 len)
> list_for_each_entry_safe(cmd, next, &erase_list, list) {
> nor->erase_opcode = cmd->opcode;
> while (cmd->count) {
> + dev_vdbg(nor->dev, "erase_cmd->size = 0x%08x, erase_cmd->opcode = 0x%02x, erase_cmd->count = %d\n",
erase_cmd->count is an unsigned value (u32) so it should be %u instead
of %d.
Other than this,
Reviewed-by: Pratyush Yadav <p.yadav at ti.com>
> + cmd->size, cmd->opcode, cmd->count);
> +
> ret = spi_nor_write_enable(nor);
> if (ret)
> goto destroy_erase_cmd_list;
> --
> 2.25.1
>
--
Regards,
Pratyush Yadav
Texas Instruments Inc.
More information about the linux-mtd
mailing list