From: Michael Walle <michael@walle.cc>
To: Tudor Ambarus <tudor.ambarus@linaro.org>
Cc: miquel.raynal@bootlin.com, jaimeliao.tw@gmail.com,
jaimeliao@mxic.com.tw, pratyush@kernel.org, richard@nod.at,
linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mtd: spi-nor: stop printing superfluous debug info
Date: Tue, 28 Nov 2023 09:47:28 +0100 [thread overview]
Message-ID: <42c96d63d1ea4f7e8f16a3c8eb0a4cf1@walle.cc> (raw)
In-Reply-To: <20231127165908.1734951-1-tudor.ambarus@linaro.org>
Hi,
> The mtd data can be obtain with the mtd ioctls and the SPI NOR
> flash name can be determined interrogating the sysfs entries.
> Stop polluting the kernel log.
>
> Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org>
>
> ---
> drivers/mtd/spi-nor/core.c | 19 -------------------
> 1 file changed, 19 deletions(-)
>
> diff --git a/drivers/mtd/spi-nor/core.c b/drivers/mtd/spi-nor/core.c
> index 25a64c65717d..6de76fd009d1 100644
> --- a/drivers/mtd/spi-nor/core.c
> +++ b/drivers/mtd/spi-nor/core.c
> @@ -3517,25 +3517,6 @@ int spi_nor_scan(struct spi_nor *nor, const char
> *name,
> /* No mtd_info fields should be used up to this point. */
> spi_nor_set_mtd_info(nor);
>
> - dev_info(dev, "%s (%lld Kbytes)\n", info->name,
> - (long long)mtd->size >> 10);
I'd lower this to dev_dbg() and print the jedec id. It might come in
handy for a quick glance during bootup if debug is enabled.
> -
> - dev_dbg(dev,
> - "mtd .name = %s, .size = 0x%llx (%lldMiB), "
> - ".erasesize = 0x%.8x (%uKiB) .numeraseregions = %d\n",
> - mtd->name, (long long)mtd->size, (long long)(mtd->size >> 20),
> - mtd->erasesize, mtd->erasesize / 1024, mtd->numeraseregions);
> -
> - if (mtd->numeraseregions)
> - for (i = 0; i < mtd->numeraseregions; i++)
> - dev_dbg(dev,
> - "mtd.eraseregions[%d] = { .offset = 0x%llx, "
> - ".erasesize = 0x%.8x (%uKiB), "
> - ".numblocks = %d }\n",
> - i, (long long)mtd->eraseregions[i].offset,
> - mtd->eraseregions[i].erasesize,
> - mtd->eraseregions[i].erasesize / 1024,
> - mtd->eraseregions[i].numblocks);
> return 0;
Part of this is already available through the spi-nor debugfs, although
not
the actual mtd properties. These I think, should go into the mtdcore
itself if really needed. Either through dev_dbg() or debugfs.
-michael
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
next prev parent reply other threads:[~2023-11-28 8:47 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-27 16:59 [PATCH] mtd: spi-nor: stop printing superfluous debug info Tudor Ambarus
2023-11-27 17:15 ` Miquel Raynal
2023-11-28 8:14 ` Tudor Ambarus
2023-11-28 8:47 ` Michael Walle [this message]
2023-11-28 9:03 ` Miquel Raynal
2023-11-28 9:10 ` Michael Walle
2023-11-28 9:24 ` liao jaime
2023-11-28 9:39 ` Tudor Ambarus
2023-11-28 9:47 ` Tudor Ambarus
2023-11-28 11:04 ` Miquel Raynal
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=42c96d63d1ea4f7e8f16a3c8eb0a4cf1@walle.cc \
--to=michael@walle.cc \
--cc=jaimeliao.tw@gmail.com \
--cc=jaimeliao@mxic.com.tw \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=miquel.raynal@bootlin.com \
--cc=pratyush@kernel.org \
--cc=richard@nod.at \
--cc=tudor.ambarus@linaro.org \
/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