Skip to contentSkip to conversation

dmaengine: pl330: Move device specific debugfs file to its directory

PATCH Applied Vladimir Zapolskiy 3 participants 3 messages Jul 25 – Sep 3 dmaengine

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dmaengine: pl330: Move device specific debugfs file to its directory

Under DMA framework every DMA device gets its dedicated directory dmaengine/$device_name in debugfs to store any supplementary data accessible from userspace. This change moves a single registered debugfs file of each PL330 device from debugfs top directory to the device specific directory, the file is renamed to "stats" to match the most popular name among all DMA device debugfs files.

The S_IFREG mask is dropped as excessive for debugfs_create_file() function.

---
 drivers/dma/pl330.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/dma/pl330.c +1 -2
index 25ba84b18704..9736eb24e5ac 100644
@@ -2952,8 +2952,7 @@ DEFINE_SHOW_ATTRIBUTE(pl330_debugfs);
 
 static inline void init_pl330_debugfs(struct pl330_dmac *pl330)
 {
-	debugfs_create_file(dev_name(pl330->ddma.dev),
-			    S_IFREG | 0444, NULL, pl330,
+	debugfs_create_file("stats", 0444, pl330->ddma.dbg_dev_root, pl330,
 			    &pl330_debugfs_fops);
 }
 #else
Signature · 1 line
2.51.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · Vladimir Zapolskiy

Under DMA framework every DMA device gets its dedicated directory dmaengine/$device_name in debugfs to store any supplementary data accessible from userspace. This change moves a single registered debugfs file of each PL330 device from debugfs top directory to the device specific directory, the file is renamed to "stats" to match the most popular name among all DMA device debugfs files.

Quoted 5 lines

The S_IFREG mask is dropped as excessive for debugfs_create_file() function.

---

Quoted 20 lines
 drivers/dma/pl330.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/dma/pl330.c +1 -3
index 25ba84b18704..9736eb24e5ac 100644
@@ -2952,8 +2952,7 @@ DEFINE_SHOW_ATTRIBUTE(pl330_debugfs);
 
 static inline void init_pl330_debugfs(struct pl330_dmac *pl330)
 {
-	debugfs_create_file(dev_name(pl330->ddma.dev),
-			    S_IFREG | 0444, NULL, pl330,
+	debugfs_create_file("stats", 0444, pl330->ddma.dbg_dev_root, pl330,
 			    &pl330_debugfs_fops);
 }
 #else
--

2.51.0

maintainer Applied
#2 lore raw
In reply to Vladimir Zapolskiy
Quoted 8 lines · Vladimir Zapolskiy

Under DMA framework every DMA device gets its dedicated directory dmaengine/$device_name in debugfs to store any supplementary data accessible from userspace. This change moves a single registered debugfs file of each PL330 device from debugfs top directory to the device specific directory, the file is renamed to "stats" to match the most popular name among all DMA device debugfs files.

[...]

Applied, thanks!

[1/1] dmaengine: pl330: Move device specific debugfs file to its directory

      commit: d2d5b3dbd97e50261c1ad6a5f0eb09963f421848

Best regards,

Signature · 1 line
~Vinod