From: Tudor Ambarus <tudor.ambarus@microchip.com>
To: <miquel.raynal@bootlin.com>, <richard@nod.at>, <vigneshr@ti.com>,
<zhuohao@chromium.org>, <p.yadav@ti.com>, <michael@walle.cc>
Cc: <linux-mtd@lists.infradead.org>, <linux-kernel@vger.kernel.org>,
"Tudor Ambarus" <tudor.ambarus@microchip.com>
Subject: [PATCH 1/2] mtd: spi-nor: Remove debugfs entries that duplicate sysfs entries
Date: Fri, 17 Dec 2021 14:26:35 +0200 [thread overview]
Message-ID: <20211217122636.474976-2-tudor.ambarus@microchip.com> (raw)
In-Reply-To: <20211217122636.474976-1-tudor.ambarus@microchip.com>
SPI NOR sysfs defines partname and jedec_id device attributes, which
duplicate the information from debugfs. Since the sysfs directory
structure and the attributes in each directory define an ABI between the
kernel and user space, thus it can never be removed, remove the debugfs
entries so that we don't duplicate the information.
Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
---
drivers/mtd/spi-nor/core.c | 12 ------------
1 file changed, 12 deletions(-)
diff --git a/drivers/mtd/spi-nor/core.c b/drivers/mtd/spi-nor/core.c
index 2e21d5ac0e2d..435bd17af0b4 100644
--- a/drivers/mtd/spi-nor/core.c
+++ b/drivers/mtd/spi-nor/core.c
@@ -3126,16 +3126,6 @@ static const struct flash_info *spi_nor_match_id(struct spi_nor *nor,
return NULL;
}
-static void spi_nor_debugfs_init(struct spi_nor *nor,
- const struct flash_info *info)
-{
- struct mtd_info *mtd = &nor->mtd;
-
- mtd->dbg.partname = info->name;
- mtd->dbg.partid = devm_kasprintf(nor->dev, GFP_KERNEL, "spi-nor:%*phN",
- info->id_len, info->id);
-}
-
static const struct flash_info *spi_nor_get_flash_info(struct spi_nor *nor,
const char *name)
{
@@ -3243,8 +3233,6 @@ int spi_nor_scan(struct spi_nor *nor, const char *name,
nor->info = info;
- spi_nor_debugfs_init(nor, info);
-
mutex_init(&nor->lock);
/* Init flash parameters based on flash_info struct and SFDP */
--
2.25.1
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
next prev parent reply other threads:[~2021-12-17 12:28 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-17 12:26 [PATCH 0/2] mtd: core: Remove partid and partname debugfs files Tudor Ambarus
2021-12-17 12:26 ` Tudor Ambarus [this message]
2021-12-20 12:59 ` [PATCH 1/2] mtd: spi-nor: Remove debugfs entries that duplicate sysfs entries Pratyush Yadav
2021-12-17 12:26 ` [PATCH 2/2] mtd: core: Remove partid and partname debugfs files Tudor Ambarus
2021-12-20 13:07 ` Pratyush Yadav
2021-12-20 13:23 ` Tudor.Ambarus
2021-12-20 19:05 ` Pratyush Yadav
2021-12-20 13:05 ` [PATCH 0/2] " Michael Walle
2021-12-29 8:27 ` (subset) " 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=20211217122636.474976-2-tudor.ambarus@microchip.com \
--to=tudor.ambarus@microchip.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=michael@walle.cc \
--cc=miquel.raynal@bootlin.com \
--cc=p.yadav@ti.com \
--cc=richard@nod.at \
--cc=vigneshr@ti.com \
--cc=zhuohao@chromium.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