Message ID | 20231215082138.16063-2-tudor.ambarus@linaro.org |
---|---|
State | Accepted |
Delegated to: | Ambarus Tudor |
Headers | show |
Series | mtd: spi-nor: mark the flash name as obsolete | expand |
Am 2023-12-15 09:21, schrieb Tudor Ambarus: > We saw flash ID collisions which make the flash name unreliable. Print > the manufacgturer and device ID instead of the flash name. > > Lower the print to dev_dbg to stop polluting the kernel log. > > Suggested-by: Miquel Raynal <miquel.raynal@bootlin.com> > Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org> Reviewed-by: Michael Walle <michael@walle.cc>
On Fri, Dec 15 2023, Tudor Ambarus wrote: > We saw flash ID collisions which make the flash name unreliable. Print > the manufacgturer and device ID instead of the flash name. Typo. s/manufacgturer/manufacturer/ > > Lower the print to dev_dbg to stop polluting the kernel log. FWIW, I find these prints to be somewhat useful. they serve to "announce" that the kernel probed a device successfully. This can be somewhat helpful when reading logs from customers trying to figure out why something doesn't work. I don't have any strong opinions of course since it is not such a big deal but I wanted to point out that these prints _are_ somewhat useful. Acked-by: Pratyush Yadav <pratyush@kernel.org> > Suggested-by: Miquel Raynal <miquel.raynal@bootlin.com> > Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org>
diff --git a/drivers/mtd/spi-nor/core.c b/drivers/mtd/spi-nor/core.c index 503fed90c2fa..ca5bd93d1f17 100644 --- a/drivers/mtd/spi-nor/core.c +++ b/drivers/mtd/spi-nor/core.c @@ -3558,8 +3558,8 @@ 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); + dev_dbg(dev, "Manufacturer and device ID: %*phN\n", + SPI_NOR_MAX_ID_LEN, nor->id); dev_dbg(dev, "mtd .name = %s, .size = 0x%llx (%lldMiB), "
We saw flash ID collisions which make the flash name unreliable. Print the manufacgturer and device ID instead of the flash name. Lower the print to dev_dbg to stop polluting the kernel log. Suggested-by: Miquel Raynal <miquel.raynal@bootlin.com> Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org> --- drivers/mtd/spi-nor/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)