From: Pratyush Yadav <p.yadav@ti.com>
To: Tudor Ambarus <tudor.ambarus@microchip.com>
Cc: vigneshr@ti.com, richard@nod.at, linux-kernel@vger.kernel.org,
linux-mtd@lists.infradead.org, miquel.raynal@bootlin.com,
Takahiro.Kuwano@infineon.com
Subject: Re: [PATCH 2/2] mtd: spi-nor: core: Add dbg msg for spi_nor_erase_multi_sectors()
Date: Mon, 8 Feb 2021 17:11:25 +0530 [thread overview]
Message-ID: <20210208114125.5bmdvywjcruvhu7a@ti.com> (raw)
In-Reply-To: <20210205135253.675793-2-tudor.ambarus@microchip.com>
On 05/02/21 03:52PM, Tudor Ambarus wrote:
> Useful when debugging non-uniform erase.
>
> Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
> ---
> 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..7401c60b53e6 100644
> --- a/drivers/mtd/spi-nor/core.c
> +++ b/drivers/mtd/spi-nor/core.c
> @@ -1622,6 +1622,9 @@ static int spi_nor_erase_multi_sectors(struct spi_nor *nor, u64 addr, u32 len)
> if (ret)
> goto destroy_erase_cmd_list;
>
> + dev_dbg(nor->dev, "erase_cmd->size = 0x%08x, erase_cmd->opcode = 0x%02x, erase_cmd->count = %d\n",
> + cmd->size, cmd->opcode, cmd->count);
> +
I don't like the position of this debug message. This prints cmd->count
_after_ the erase is done but _before_ cmd->count is updated. It might
end up giving some wrong or misleading information. Can you either move
it before the start of the erase or after all the bookkeeping is done?
> addr += cmd->size;
> cmd->count--;
> }
> --
> 2.25.1
--
Regards,
Pratyush Yadav
Texas Instruments Inc.
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
next prev parent reply other threads:[~2021-02-08 11:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-05 13:52 [PATCH 1/2] mtd: spi-nor: core: Advance erase after the erase cmd has been completed Tudor Ambarus
2021-02-05 13:52 ` [PATCH 2/2] mtd: spi-nor: core: Add dbg msg for spi_nor_erase_multi_sectors() Tudor Ambarus
2021-02-08 11:41 ` Pratyush Yadav [this message]
2021-02-08 11:59 ` Tudor.Ambarus
2021-02-08 11:41 ` [PATCH 1/2] mtd: spi-nor: core: Advance erase after the erase cmd has been completed Pratyush Yadav
2021-02-08 12:14 ` Tudor.Ambarus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210208114125.5bmdvywjcruvhu7a@ti.com \
--to=p.yadav@ti.com \
--cc=Takahiro.Kuwano@infineon.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=miquel.raynal@bootlin.com \
--cc=richard@nod.at \
--cc=tudor.ambarus@microchip.com \
--cc=vigneshr@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox