Skip to content

mtd: mtdcore: add debugfs nodes for querying the flash name and id

[email protected] linux-mtd lkml 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2mtd: mtdcore: add debugfs nodes for querying the flash name and iddrivers/mtd/mtdcore.c include/linux/mtd/mtd.h+80 -90 replies
2/2mtd: spi-nor: enable the debugfs for the partname and partiddrivers/mtd/spi-nor/spi-nor.c+12 -00 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchBoris Brezillon
1/2R-b
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] mtd: mtdcore: add debugfs nodes for querying the flash name and id

From: Tudor Ambarus <[email protected]>

I just rebased Zhuohao's patches and fixed some checkpatch warnings and checks. I'll let this a little bit here for some short review, and I intend to apply the patches later today.

For patch 1/, I fixed the following:
CHECK: multiple assignments should be avoided
#82: FILE: drivers/mtd/mtdcore.c:390:
+ root = mtd->dbg.dfs_dir = debugfs_create_dir(dev_name(dev),

WARNING: Symbolic permissions 'S_IRUSR' are not preferred. Consider using octal permissions '0400'. #90: FILE: drivers/mtd/mtdcore.c:398:
+ dent = debugfs_create_file("partid", S_IRUSR, root, mtd,

WARNING: Symbolic permissions 'S_IRUSR' are not preferred. Consider using octal permissions '0400'. #97: FILE: drivers/mtd/mtdcore.c:405:
+ dent = debugfs_create_file("partname", S_IRUSR, root, mtd,

For patch 2/, I fixed some alignment checks, and I moved the call to spi_nor_debugfs_init() immediately after spi_nor_get_flash_info(), because it uses some info data set there.
CHECK: Alignment should match open parenthesis
#162: FILE: drivers/mtd/spi-nor/spi-nor.c:3939:
+static void spi_nor_debugfs_init(struct spi_nor *nor,
+ const struct flash_info *info)

CHECK: Alignment should match open parenthesis
#168: FILE: drivers/mtd/spi-nor/spi-nor.c:3945:
+ mtd->dbg.partid = devm_kasprintf(nor->dev, GFP_KERNEL,
+ "spi-nor:%*phN",

Zhuohao Lee (2):
mtd: mtdcore: add debugfs nodes for querying the flash name and id
mtd: spi-nor: enable the debugfs for the partname and partid

 drivers/mtd/mtdcore.c         | 86 ++++++++++++++++++++++++++++++++++++++-----
 drivers/mtd/spi-nor/spi-nor.c | 12 ++++++
 include/linux/mtd/mtd.h       |  3 ++
 3 files changed, 92 insertions(+), 9 deletions(-)
Signature · 1 line
2.9.5