* dmaengine: remove DBGFS_FUNC_DECL()
@ 2018-11-30 15:42 ` Yangtao Li
0 siblings, 0 replies; 21+ messages in thread
From: Yangtao Li @ 2018-11-30 15:42 UTC (permalink / raw)
To: dan.j.williams, vkoul, sudeep.dutt, ashutosh.dixit, daniel,
haojian.zhuang, robert.jarzmik, okaya, andy.gross, david.brown
Cc: dmaengine, linux-kernel, linux-arm-kernel, linux-arm-msm,
linux-soc, Yangtao Li
We already have the DEFINE_SHOW_ATTRIBUTE,There is no need to define
such a macro,so remove DBGFS_FUNC_DECL.Also use macro to simplify some
code.
Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
---
drivers/dma/amba-pl08x.c | 14 ++------------
drivers/dma/mic_x100_dma.c | 22 +++-------------------
drivers/dma/pxa_dma.c | 24 ++++++++++++------------
drivers/dma/qcom/hidma_dbg.c | 33 ++++++---------------------------
4 files changed, 23 insertions(+), 70 deletions(-)
diff --git a/drivers/dma/amba-pl08x.c b/drivers/dma/amba-pl08x.c
index 97483df1f82e..fc8c2bab563c 100644
--- a/drivers/dma/amba-pl08x.c
+++ b/drivers/dma/amba-pl08x.c
@@ -2505,24 +2505,14 @@ static int pl08x_debugfs_show(struct seq_file *s, void *data)
return 0;
}
-static int pl08x_debugfs_open(struct inode *inode, struct file *file)
-{
- return single_open(file, pl08x_debugfs_show, inode->i_private);
-}
-
-static const struct file_operations pl08x_debugfs_operations = {
- .open = pl08x_debugfs_open,
- .read = seq_read,
- .llseek = seq_lseek,
- .release = single_release,
-};
+DEFINE_SHOW_ATTRIBUTE(pl08x_debugfs);
static void init_pl08x_debugfs(struct pl08x_driver_data *pl08x)
{
/* Expose a simple debugfs interface to view all clocks */
(void) debugfs_create_file(dev_name(&pl08x->adev->dev),
S_IFREG | S_IRUGO, NULL, pl08x,
- &pl08x_debugfs_operations);
+ &pl08x_debugfs_fops);
}
#else
diff --git a/drivers/dma/mic_x100_dma.c b/drivers/dma/mic_x100_dma.c
index adfd316db1a8..6a91e28d537d 100644
--- a/drivers/dma/mic_x100_dma.c
+++ b/drivers/dma/mic_x100_dma.c
@@ -676,7 +676,7 @@ static void mic_dma_dev_unreg(struct mic_dma_device *mic_dma_dev)
}
/* DEBUGFS CODE */
-static int mic_dma_reg_seq_show(struct seq_file *s, void *pos)
+static int mic_dma_reg_show(struct seq_file *s, void *pos)
{
struct mic_dma_device *mic_dma_dev = s->private;
int i, chan_num, first_chan = mic_dma_dev->start_ch;
@@ -707,23 +707,7 @@ static int mic_dma_reg_seq_show(struct seq_file *s, void *pos)
return 0;
}
-static int mic_dma_reg_debug_open(struct inode *inode, struct file *file)
-{
- return single_open(file, mic_dma_reg_seq_show, inode->i_private);
-}
-
-static int mic_dma_reg_debug_release(struct inode *inode, struct file *file)
-{
- return single_release(inode, file);
-}
-
-static const struct file_operations mic_dma_reg_ops = {
- .owner = THIS_MODULE,
- .open = mic_dma_reg_debug_open,
- .read = seq_read,
- .llseek = seq_lseek,
- .release = mic_dma_reg_debug_release
-};
+DEFINE_SHOW_ATTRIBUTE(mic_dma_reg);
/* Debugfs parent dir */
static struct dentry *mic_dma_dbg;
@@ -747,7 +731,7 @@ static int mic_dma_driver_probe(struct mbus_device *mbdev)
if (mic_dma_dev->dbg_dir)
debugfs_create_file("mic_dma_reg", 0444,
mic_dma_dev->dbg_dir, mic_dma_dev,
- &mic_dma_reg_ops);
+ &mic_dma_reg_fops);
}
return 0;
}
diff --git a/drivers/dma/pxa_dma.c b/drivers/dma/pxa_dma.c
index 825725057e00..8e1e1b07d32f 100644
--- a/drivers/dma/pxa_dma.c
+++ b/drivers/dma/pxa_dma.c
@@ -189,7 +189,7 @@ bool pxad_filter_fn(struct dma_chan *chan, void *param);
#include <linux/uaccess.h>
#include <linux/seq_file.h>
-static int dbg_show_requester_chan(struct seq_file *s, void *p)
+static int requester_chan_show(struct seq_file *s, void *p)
{
struct pxad_phy *phy = s->private;
int i;
@@ -220,7 +220,7 @@ static int is_phys_valid(unsigned long addr)
#define PXA_DCSR_STR(flag) (dcsr & PXA_DCSR_##flag ? #flag" " : "")
#define PXA_DCMD_STR(flag) (dcmd & PXA_DCMD_##flag ? #flag" " : "")
-static int dbg_show_descriptors(struct seq_file *s, void *p)
+static int descriptors_show(struct seq_file *s, void *p)
{
struct pxad_phy *phy = s->private;
int i, max_show = 20, burst, width;
@@ -263,7 +263,7 @@ static int dbg_show_descriptors(struct seq_file *s, void *p)
return 0;
}
-static int dbg_show_chan_state(struct seq_file *s, void *p)
+static int chan_state_show(struct seq_file *s, void *p)
{
struct pxad_phy *phy = s->private;
u32 dcsr, dcmd;
@@ -306,7 +306,7 @@ static int dbg_show_chan_state(struct seq_file *s, void *p)
return 0;
}
-static int dbg_show_state(struct seq_file *s, void *p)
+static int state_show(struct seq_file *s, void *p)
{
struct pxad_device *pdev = s->private;
@@ -329,10 +329,10 @@ static const struct file_operations dbg_fops_##name = { \
.release = single_release, \
}
-DBGFS_FUNC_DECL(state);
-DBGFS_FUNC_DECL(chan_state);
-DBGFS_FUNC_DECL(descriptors);
-DBGFS_FUNC_DECL(requester_chan);
+DEFINE_SHOW_ATTRIBUTE(state);
+DEFINE_SHOW_ATTRIBUTE(chan_state);
+DEFINE_SHOW_ATTRIBUTE(descriptors);
+DEFINE_SHOW_ATTRIBUTE(requester_chan);
static struct dentry *pxad_dbg_alloc_chan(struct pxad_device *pdev,
int ch, struct dentry *chandir)
@@ -348,13 +348,13 @@ static struct dentry *pxad_dbg_alloc_chan(struct pxad_device *pdev,
if (chan)
chan_state = debugfs_create_file("state", 0400, chan, dt,
- &dbg_fops_chan_state);
+ &chan_state_fops);
if (chan_state)
chan_descr = debugfs_create_file("descriptors", 0400, chan, dt,
- &dbg_fops_descriptors);
+ &descriptors_fops);
if (chan_descr)
chan_reqs = debugfs_create_file("requesters", 0400, chan, dt,
- &dbg_fops_requester_chan);
+ &requester_chan_fops);
if (!chan_reqs)
goto err_state;
@@ -375,7 +375,7 @@ static void pxad_init_debugfs(struct pxad_device *pdev)
goto err_root;
pdev->dbgfs_state = debugfs_create_file("state", 0400, pdev->dbgfs_root,
- pdev, &dbg_fops_state);
+ pdev, &state_fops);
if (!pdev->dbgfs_state)
goto err_state;
diff --git a/drivers/dma/qcom/hidma_dbg.c b/drivers/dma/qcom/hidma_dbg.c
index 3bdcb8056a36..9523faf7acdc 100644
--- a/drivers/dma/qcom/hidma_dbg.c
+++ b/drivers/dma/qcom/hidma_dbg.c
@@ -85,11 +85,11 @@ static void hidma_ll_devstats(struct seq_file *s, void *llhndl)
}
/*
- * hidma_chan_stats: display HIDMA channel statistics
+ * hidma_chan_show: display HIDMA channel statistics
*
* Display the statistics for the current HIDMA virtual channel device.
*/
-static int hidma_chan_stats(struct seq_file *s, void *unused)
+static int hidma_chan_show(struct seq_file *s, void *unused)
{
struct hidma_chan *mchan = s->private;
struct hidma_desc *mdesc;
@@ -117,11 +117,11 @@ static int hidma_chan_stats(struct seq_file *s, void *unused)
}
/*
- * hidma_dma_info: display HIDMA device info
+ * hidma_dma_show: display HIDMA device info
*
* Display the info for the current HIDMA device.
*/
-static int hidma_dma_info(struct seq_file *s, void *unused)
+static int hidma_dma_show(struct seq_file *s, void *unused)
{
struct hidma_dev *dmadev = s->private;
resource_size_t sz;
@@ -138,29 +138,8 @@ static int hidma_dma_info(struct seq_file *s, void *unused)
return 0;
}
-static int hidma_chan_stats_open(struct inode *inode, struct file *file)
-{
- return single_open(file, hidma_chan_stats, inode->i_private);
-}
-
-static int hidma_dma_info_open(struct inode *inode, struct file *file)
-{
- return single_open(file, hidma_dma_info, inode->i_private);
-}
-
-static const struct file_operations hidma_chan_fops = {
- .open = hidma_chan_stats_open,
- .read = seq_read,
- .llseek = seq_lseek,
- .release = single_release,
-};
-
-static const struct file_operations hidma_dma_fops = {
- .open = hidma_dma_info_open,
- .read = seq_read,
- .llseek = seq_lseek,
- .release = single_release,
-};
+DEFINE_SHOW_ATTRIBUTE(hidma_chan);
+DEFINE_SHOW_ATTRIBUTE(hidma_dma);
void hidma_debug_uninit(struct hidma_dev *dmadev)
{
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [PATCH] dmaengine: remove DBGFS_FUNC_DECL()
@ 2018-11-30 15:42 ` Yangtao Li
0 siblings, 0 replies; 21+ messages in thread
From: Yangtao Li @ 2018-11-30 15:42 UTC (permalink / raw)
To: dan.j.williams, vkoul, sudeep.dutt, ashutosh.dixit, daniel,
haojian.zhuang, robert.jarzmik, okaya, andy.gross, david.brown
Cc: dmaengine, linux-kernel, linux-arm-kernel, linux-arm-msm,
linux-soc, Yangtao Li
We already have the DEFINE_SHOW_ATTRIBUTE,There is no need to define
such a macro,so remove DBGFS_FUNC_DECL.Also use macro to simplify some
code.
Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
---
drivers/dma/amba-pl08x.c | 14 ++------------
drivers/dma/mic_x100_dma.c | 22 +++-------------------
drivers/dma/pxa_dma.c | 24 ++++++++++++------------
drivers/dma/qcom/hidma_dbg.c | 33 ++++++---------------------------
4 files changed, 23 insertions(+), 70 deletions(-)
diff --git a/drivers/dma/amba-pl08x.c b/drivers/dma/amba-pl08x.c
index 97483df1f82e..fc8c2bab563c 100644
--- a/drivers/dma/amba-pl08x.c
+++ b/drivers/dma/amba-pl08x.c
@@ -2505,24 +2505,14 @@ static int pl08x_debugfs_show(struct seq_file *s, void *data)
return 0;
}
-static int pl08x_debugfs_open(struct inode *inode, struct file *file)
-{
- return single_open(file, pl08x_debugfs_show, inode->i_private);
-}
-
-static const struct file_operations pl08x_debugfs_operations = {
- .open = pl08x_debugfs_open,
- .read = seq_read,
- .llseek = seq_lseek,
- .release = single_release,
-};
+DEFINE_SHOW_ATTRIBUTE(pl08x_debugfs);
static void init_pl08x_debugfs(struct pl08x_driver_data *pl08x)
{
/* Expose a simple debugfs interface to view all clocks */
(void) debugfs_create_file(dev_name(&pl08x->adev->dev),
S_IFREG | S_IRUGO, NULL, pl08x,
- &pl08x_debugfs_operations);
+ &pl08x_debugfs_fops);
}
#else
diff --git a/drivers/dma/mic_x100_dma.c b/drivers/dma/mic_x100_dma.c
index adfd316db1a8..6a91e28d537d 100644
--- a/drivers/dma/mic_x100_dma.c
+++ b/drivers/dma/mic_x100_dma.c
@@ -676,7 +676,7 @@ static void mic_dma_dev_unreg(struct mic_dma_device *mic_dma_dev)
}
/* DEBUGFS CODE */
-static int mic_dma_reg_seq_show(struct seq_file *s, void *pos)
+static int mic_dma_reg_show(struct seq_file *s, void *pos)
{
struct mic_dma_device *mic_dma_dev = s->private;
int i, chan_num, first_chan = mic_dma_dev->start_ch;
@@ -707,23 +707,7 @@ static int mic_dma_reg_seq_show(struct seq_file *s, void *pos)
return 0;
}
-static int mic_dma_reg_debug_open(struct inode *inode, struct file *file)
-{
- return single_open(file, mic_dma_reg_seq_show, inode->i_private);
-}
-
-static int mic_dma_reg_debug_release(struct inode *inode, struct file *file)
-{
- return single_release(inode, file);
-}
-
-static const struct file_operations mic_dma_reg_ops = {
- .owner = THIS_MODULE,
- .open = mic_dma_reg_debug_open,
- .read = seq_read,
- .llseek = seq_lseek,
- .release = mic_dma_reg_debug_release
-};
+DEFINE_SHOW_ATTRIBUTE(mic_dma_reg);
/* Debugfs parent dir */
static struct dentry *mic_dma_dbg;
@@ -747,7 +731,7 @@ static int mic_dma_driver_probe(struct mbus_device *mbdev)
if (mic_dma_dev->dbg_dir)
debugfs_create_file("mic_dma_reg", 0444,
mic_dma_dev->dbg_dir, mic_dma_dev,
- &mic_dma_reg_ops);
+ &mic_dma_reg_fops);
}
return 0;
}
diff --git a/drivers/dma/pxa_dma.c b/drivers/dma/pxa_dma.c
index 825725057e00..8e1e1b07d32f 100644
--- a/drivers/dma/pxa_dma.c
+++ b/drivers/dma/pxa_dma.c
@@ -189,7 +189,7 @@ bool pxad_filter_fn(struct dma_chan *chan, void *param);
#include <linux/uaccess.h>
#include <linux/seq_file.h>
-static int dbg_show_requester_chan(struct seq_file *s, void *p)
+static int requester_chan_show(struct seq_file *s, void *p)
{
struct pxad_phy *phy = s->private;
int i;
@@ -220,7 +220,7 @@ static int is_phys_valid(unsigned long addr)
#define PXA_DCSR_STR(flag) (dcsr & PXA_DCSR_##flag ? #flag" " : "")
#define PXA_DCMD_STR(flag) (dcmd & PXA_DCMD_##flag ? #flag" " : "")
-static int dbg_show_descriptors(struct seq_file *s, void *p)
+static int descriptors_show(struct seq_file *s, void *p)
{
struct pxad_phy *phy = s->private;
int i, max_show = 20, burst, width;
@@ -263,7 +263,7 @@ static int dbg_show_descriptors(struct seq_file *s, void *p)
return 0;
}
-static int dbg_show_chan_state(struct seq_file *s, void *p)
+static int chan_state_show(struct seq_file *s, void *p)
{
struct pxad_phy *phy = s->private;
u32 dcsr, dcmd;
@@ -306,7 +306,7 @@ static int dbg_show_chan_state(struct seq_file *s, void *p)
return 0;
}
-static int dbg_show_state(struct seq_file *s, void *p)
+static int state_show(struct seq_file *s, void *p)
{
struct pxad_device *pdev = s->private;
@@ -329,10 +329,10 @@ static const struct file_operations dbg_fops_##name = { \
.release = single_release, \
}
-DBGFS_FUNC_DECL(state);
-DBGFS_FUNC_DECL(chan_state);
-DBGFS_FUNC_DECL(descriptors);
-DBGFS_FUNC_DECL(requester_chan);
+DEFINE_SHOW_ATTRIBUTE(state);
+DEFINE_SHOW_ATTRIBUTE(chan_state);
+DEFINE_SHOW_ATTRIBUTE(descriptors);
+DEFINE_SHOW_ATTRIBUTE(requester_chan);
static struct dentry *pxad_dbg_alloc_chan(struct pxad_device *pdev,
int ch, struct dentry *chandir)
@@ -348,13 +348,13 @@ static struct dentry *pxad_dbg_alloc_chan(struct pxad_device *pdev,
if (chan)
chan_state = debugfs_create_file("state", 0400, chan, dt,
- &dbg_fops_chan_state);
+ &chan_state_fops);
if (chan_state)
chan_descr = debugfs_create_file("descriptors", 0400, chan, dt,
- &dbg_fops_descriptors);
+ &descriptors_fops);
if (chan_descr)
chan_reqs = debugfs_create_file("requesters", 0400, chan, dt,
- &dbg_fops_requester_chan);
+ &requester_chan_fops);
if (!chan_reqs)
goto err_state;
@@ -375,7 +375,7 @@ static void pxad_init_debugfs(struct pxad_device *pdev)
goto err_root;
pdev->dbgfs_state = debugfs_create_file("state", 0400, pdev->dbgfs_root,
- pdev, &dbg_fops_state);
+ pdev, &state_fops);
if (!pdev->dbgfs_state)
goto err_state;
diff --git a/drivers/dma/qcom/hidma_dbg.c b/drivers/dma/qcom/hidma_dbg.c
index 3bdcb8056a36..9523faf7acdc 100644
--- a/drivers/dma/qcom/hidma_dbg.c
+++ b/drivers/dma/qcom/hidma_dbg.c
@@ -85,11 +85,11 @@ static void hidma_ll_devstats(struct seq_file *s, void *llhndl)
}
/*
- * hidma_chan_stats: display HIDMA channel statistics
+ * hidma_chan_show: display HIDMA channel statistics
*
* Display the statistics for the current HIDMA virtual channel device.
*/
-static int hidma_chan_stats(struct seq_file *s, void *unused)
+static int hidma_chan_show(struct seq_file *s, void *unused)
{
struct hidma_chan *mchan = s->private;
struct hidma_desc *mdesc;
@@ -117,11 +117,11 @@ static int hidma_chan_stats(struct seq_file *s, void *unused)
}
/*
- * hidma_dma_info: display HIDMA device info
+ * hidma_dma_show: display HIDMA device info
*
* Display the info for the current HIDMA device.
*/
-static int hidma_dma_info(struct seq_file *s, void *unused)
+static int hidma_dma_show(struct seq_file *s, void *unused)
{
struct hidma_dev *dmadev = s->private;
resource_size_t sz;
@@ -138,29 +138,8 @@ static int hidma_dma_info(struct seq_file *s, void *unused)
return 0;
}
-static int hidma_chan_stats_open(struct inode *inode, struct file *file)
-{
- return single_open(file, hidma_chan_stats, inode->i_private);
-}
-
-static int hidma_dma_info_open(struct inode *inode, struct file *file)
-{
- return single_open(file, hidma_dma_info, inode->i_private);
-}
-
-static const struct file_operations hidma_chan_fops = {
- .open = hidma_chan_stats_open,
- .read = seq_read,
- .llseek = seq_lseek,
- .release = single_release,
-};
-
-static const struct file_operations hidma_dma_fops = {
- .open = hidma_dma_info_open,
- .read = seq_read,
- .llseek = seq_lseek,
- .release = single_release,
-};
+DEFINE_SHOW_ATTRIBUTE(hidma_chan);
+DEFINE_SHOW_ATTRIBUTE(hidma_dma);
void hidma_debug_uninit(struct hidma_dev *dmadev)
{
--
2.17.0
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [PATCH] dmaengine: remove DBGFS_FUNC_DECL()
@ 2018-11-30 15:42 ` Yangtao Li
0 siblings, 0 replies; 21+ messages in thread
From: Yangtao Li @ 2018-11-30 15:42 UTC (permalink / raw)
To: dan.j.williams, vkoul, sudeep.dutt, ashutosh.dixit, daniel,
haojian.zhuang, robert.jarzmik, okaya, andy.gross, david.brown
Cc: Yangtao Li, linux-arm-msm, linux-kernel, dmaengine, linux-soc,
linux-arm-kernel
We already have the DEFINE_SHOW_ATTRIBUTE,There is no need to define
such a macro,so remove DBGFS_FUNC_DECL.Also use macro to simplify some
code.
Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
---
drivers/dma/amba-pl08x.c | 14 ++------------
drivers/dma/mic_x100_dma.c | 22 +++-------------------
drivers/dma/pxa_dma.c | 24 ++++++++++++------------
drivers/dma/qcom/hidma_dbg.c | 33 ++++++---------------------------
4 files changed, 23 insertions(+), 70 deletions(-)
diff --git a/drivers/dma/amba-pl08x.c b/drivers/dma/amba-pl08x.c
index 97483df1f82e..fc8c2bab563c 100644
--- a/drivers/dma/amba-pl08x.c
+++ b/drivers/dma/amba-pl08x.c
@@ -2505,24 +2505,14 @@ static int pl08x_debugfs_show(struct seq_file *s, void *data)
return 0;
}
-static int pl08x_debugfs_open(struct inode *inode, struct file *file)
-{
- return single_open(file, pl08x_debugfs_show, inode->i_private);
-}
-
-static const struct file_operations pl08x_debugfs_operations = {
- .open = pl08x_debugfs_open,
- .read = seq_read,
- .llseek = seq_lseek,
- .release = single_release,
-};
+DEFINE_SHOW_ATTRIBUTE(pl08x_debugfs);
static void init_pl08x_debugfs(struct pl08x_driver_data *pl08x)
{
/* Expose a simple debugfs interface to view all clocks */
(void) debugfs_create_file(dev_name(&pl08x->adev->dev),
S_IFREG | S_IRUGO, NULL, pl08x,
- &pl08x_debugfs_operations);
+ &pl08x_debugfs_fops);
}
#else
diff --git a/drivers/dma/mic_x100_dma.c b/drivers/dma/mic_x100_dma.c
index adfd316db1a8..6a91e28d537d 100644
--- a/drivers/dma/mic_x100_dma.c
+++ b/drivers/dma/mic_x100_dma.c
@@ -676,7 +676,7 @@ static void mic_dma_dev_unreg(struct mic_dma_device *mic_dma_dev)
}
/* DEBUGFS CODE */
-static int mic_dma_reg_seq_show(struct seq_file *s, void *pos)
+static int mic_dma_reg_show(struct seq_file *s, void *pos)
{
struct mic_dma_device *mic_dma_dev = s->private;
int i, chan_num, first_chan = mic_dma_dev->start_ch;
@@ -707,23 +707,7 @@ static int mic_dma_reg_seq_show(struct seq_file *s, void *pos)
return 0;
}
-static int mic_dma_reg_debug_open(struct inode *inode, struct file *file)
-{
- return single_open(file, mic_dma_reg_seq_show, inode->i_private);
-}
-
-static int mic_dma_reg_debug_release(struct inode *inode, struct file *file)
-{
- return single_release(inode, file);
-}
-
-static const struct file_operations mic_dma_reg_ops = {
- .owner = THIS_MODULE,
- .open = mic_dma_reg_debug_open,
- .read = seq_read,
- .llseek = seq_lseek,
- .release = mic_dma_reg_debug_release
-};
+DEFINE_SHOW_ATTRIBUTE(mic_dma_reg);
/* Debugfs parent dir */
static struct dentry *mic_dma_dbg;
@@ -747,7 +731,7 @@ static int mic_dma_driver_probe(struct mbus_device *mbdev)
if (mic_dma_dev->dbg_dir)
debugfs_create_file("mic_dma_reg", 0444,
mic_dma_dev->dbg_dir, mic_dma_dev,
- &mic_dma_reg_ops);
+ &mic_dma_reg_fops);
}
return 0;
}
diff --git a/drivers/dma/pxa_dma.c b/drivers/dma/pxa_dma.c
index 825725057e00..8e1e1b07d32f 100644
--- a/drivers/dma/pxa_dma.c
+++ b/drivers/dma/pxa_dma.c
@@ -189,7 +189,7 @@ bool pxad_filter_fn(struct dma_chan *chan, void *param);
#include <linux/uaccess.h>
#include <linux/seq_file.h>
-static int dbg_show_requester_chan(struct seq_file *s, void *p)
+static int requester_chan_show(struct seq_file *s, void *p)
{
struct pxad_phy *phy = s->private;
int i;
@@ -220,7 +220,7 @@ static int is_phys_valid(unsigned long addr)
#define PXA_DCSR_STR(flag) (dcsr & PXA_DCSR_##flag ? #flag" " : "")
#define PXA_DCMD_STR(flag) (dcmd & PXA_DCMD_##flag ? #flag" " : "")
-static int dbg_show_descriptors(struct seq_file *s, void *p)
+static int descriptors_show(struct seq_file *s, void *p)
{
struct pxad_phy *phy = s->private;
int i, max_show = 20, burst, width;
@@ -263,7 +263,7 @@ static int dbg_show_descriptors(struct seq_file *s, void *p)
return 0;
}
-static int dbg_show_chan_state(struct seq_file *s, void *p)
+static int chan_state_show(struct seq_file *s, void *p)
{
struct pxad_phy *phy = s->private;
u32 dcsr, dcmd;
@@ -306,7 +306,7 @@ static int dbg_show_chan_state(struct seq_file *s, void *p)
return 0;
}
-static int dbg_show_state(struct seq_file *s, void *p)
+static int state_show(struct seq_file *s, void *p)
{
struct pxad_device *pdev = s->private;
@@ -329,10 +329,10 @@ static const struct file_operations dbg_fops_##name = { \
.release = single_release, \
}
-DBGFS_FUNC_DECL(state);
-DBGFS_FUNC_DECL(chan_state);
-DBGFS_FUNC_DECL(descriptors);
-DBGFS_FUNC_DECL(requester_chan);
+DEFINE_SHOW_ATTRIBUTE(state);
+DEFINE_SHOW_ATTRIBUTE(chan_state);
+DEFINE_SHOW_ATTRIBUTE(descriptors);
+DEFINE_SHOW_ATTRIBUTE(requester_chan);
static struct dentry *pxad_dbg_alloc_chan(struct pxad_device *pdev,
int ch, struct dentry *chandir)
@@ -348,13 +348,13 @@ static struct dentry *pxad_dbg_alloc_chan(struct pxad_device *pdev,
if (chan)
chan_state = debugfs_create_file("state", 0400, chan, dt,
- &dbg_fops_chan_state);
+ &chan_state_fops);
if (chan_state)
chan_descr = debugfs_create_file("descriptors", 0400, chan, dt,
- &dbg_fops_descriptors);
+ &descriptors_fops);
if (chan_descr)
chan_reqs = debugfs_create_file("requesters", 0400, chan, dt,
- &dbg_fops_requester_chan);
+ &requester_chan_fops);
if (!chan_reqs)
goto err_state;
@@ -375,7 +375,7 @@ static void pxad_init_debugfs(struct pxad_device *pdev)
goto err_root;
pdev->dbgfs_state = debugfs_create_file("state", 0400, pdev->dbgfs_root,
- pdev, &dbg_fops_state);
+ pdev, &state_fops);
if (!pdev->dbgfs_state)
goto err_state;
diff --git a/drivers/dma/qcom/hidma_dbg.c b/drivers/dma/qcom/hidma_dbg.c
index 3bdcb8056a36..9523faf7acdc 100644
--- a/drivers/dma/qcom/hidma_dbg.c
+++ b/drivers/dma/qcom/hidma_dbg.c
@@ -85,11 +85,11 @@ static void hidma_ll_devstats(struct seq_file *s, void *llhndl)
}
/*
- * hidma_chan_stats: display HIDMA channel statistics
+ * hidma_chan_show: display HIDMA channel statistics
*
* Display the statistics for the current HIDMA virtual channel device.
*/
-static int hidma_chan_stats(struct seq_file *s, void *unused)
+static int hidma_chan_show(struct seq_file *s, void *unused)
{
struct hidma_chan *mchan = s->private;
struct hidma_desc *mdesc;
@@ -117,11 +117,11 @@ static int hidma_chan_stats(struct seq_file *s, void *unused)
}
/*
- * hidma_dma_info: display HIDMA device info
+ * hidma_dma_show: display HIDMA device info
*
* Display the info for the current HIDMA device.
*/
-static int hidma_dma_info(struct seq_file *s, void *unused)
+static int hidma_dma_show(struct seq_file *s, void *unused)
{
struct hidma_dev *dmadev = s->private;
resource_size_t sz;
@@ -138,29 +138,8 @@ static int hidma_dma_info(struct seq_file *s, void *unused)
return 0;
}
-static int hidma_chan_stats_open(struct inode *inode, struct file *file)
-{
- return single_open(file, hidma_chan_stats, inode->i_private);
-}
-
-static int hidma_dma_info_open(struct inode *inode, struct file *file)
-{
- return single_open(file, hidma_dma_info, inode->i_private);
-}
-
-static const struct file_operations hidma_chan_fops = {
- .open = hidma_chan_stats_open,
- .read = seq_read,
- .llseek = seq_lseek,
- .release = single_release,
-};
-
-static const struct file_operations hidma_dma_fops = {
- .open = hidma_dma_info_open,
- .read = seq_read,
- .llseek = seq_lseek,
- .release = single_release,
-};
+DEFINE_SHOW_ATTRIBUTE(hidma_chan);
+DEFINE_SHOW_ATTRIBUTE(hidma_dma);
void hidma_debug_uninit(struct hidma_dev *dmadev)
{
--
2.17.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 21+ messages in thread
* dmaengine: remove DBGFS_FUNC_DECL()
2018-11-30 15:42 ` Yangtao Li
(?)
@ 2018-11-30 15:59 ` Sinan Kaya
-1 siblings, 0 replies; 21+ messages in thread
From: Sinan Kaya @ 2018-11-30 15:59 UTC (permalink / raw)
To: Yangtao Li, dan.j.williams, vkoul, sudeep.dutt, ashutosh.dixit,
daniel, haojian.zhuang, robert.jarzmik, andy.gross, david.brown
Cc: dmaengine, linux-kernel, linux-arm-kernel, linux-arm-msm, linux-soc
On 11/30/2018 10:42 AM, Yangtao Li wrote:
> We already have the DEFINE_SHOW_ATTRIBUTE,There is no need to define
> such a macro,so remove DBGFS_FUNC_DECL.Also use macro to simplify some
> code.
>
> Signed-off-by: Yangtao Li<tiny.windzz@gmail.com>
> ---
> drivers/dma/amba-pl08x.c | 14 ++------------
> drivers/dma/mic_x100_dma.c | 22 +++-------------------
> drivers/dma/pxa_dma.c | 24 ++++++++++++------------
> drivers/dma/qcom/hidma_dbg.c | 33 ++++++---------------------------
Acked-by: Sinan Kaya <okaya@kernel.org> for drivers/dma/qcom/hidma_dbg.c
> 4 files changed, 23 insertions(+), 70 deletions(-)
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH] dmaengine: remove DBGFS_FUNC_DECL()
@ 2018-11-30 15:59 ` Sinan Kaya
0 siblings, 0 replies; 21+ messages in thread
From: Sinan Kaya @ 2018-11-30 15:59 UTC (permalink / raw)
To: Yangtao Li, dan.j.williams, vkoul, sudeep.dutt, ashutosh.dixit,
daniel, haojian.zhuang, robert.jarzmik, andy.gross, david.brown
Cc: dmaengine, linux-kernel, linux-arm-kernel, linux-arm-msm, linux-soc
On 11/30/2018 10:42 AM, Yangtao Li wrote:
> We already have the DEFINE_SHOW_ATTRIBUTE,There is no need to define
> such a macro,so remove DBGFS_FUNC_DECL.Also use macro to simplify some
> code.
>
> Signed-off-by: Yangtao Li<tiny.windzz@gmail.com>
> ---
> drivers/dma/amba-pl08x.c | 14 ++------------
> drivers/dma/mic_x100_dma.c | 22 +++-------------------
> drivers/dma/pxa_dma.c | 24 ++++++++++++------------
> drivers/dma/qcom/hidma_dbg.c | 33 ++++++---------------------------
Acked-by: Sinan Kaya <okaya@kernel.org> for drivers/dma/qcom/hidma_dbg.c
> 4 files changed, 23 insertions(+), 70 deletions(-)
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH] dmaengine: remove DBGFS_FUNC_DECL()
@ 2018-11-30 15:59 ` Sinan Kaya
0 siblings, 0 replies; 21+ messages in thread
From: Sinan Kaya @ 2018-11-30 15:59 UTC (permalink / raw)
To: Yangtao Li, dan.j.williams, vkoul, sudeep.dutt, ashutosh.dixit,
daniel, haojian.zhuang, robert.jarzmik, andy.gross, david.brown
Cc: dmaengine, linux-arm-msm, linux-soc, linux-kernel, linux-arm-kernel
On 11/30/2018 10:42 AM, Yangtao Li wrote:
> We already have the DEFINE_SHOW_ATTRIBUTE,There is no need to define
> such a macro,so remove DBGFS_FUNC_DECL.Also use macro to simplify some
> code.
>
> Signed-off-by: Yangtao Li<tiny.windzz@gmail.com>
> ---
> drivers/dma/amba-pl08x.c | 14 ++------------
> drivers/dma/mic_x100_dma.c | 22 +++-------------------
> drivers/dma/pxa_dma.c | 24 ++++++++++++------------
> drivers/dma/qcom/hidma_dbg.c | 33 ++++++---------------------------
Acked-by: Sinan Kaya <okaya@kernel.org> for drivers/dma/qcom/hidma_dbg.c
> 4 files changed, 23 insertions(+), 70 deletions(-)
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 21+ messages in thread
* dmaengine: remove DBGFS_FUNC_DECL()
2018-11-30 15:59 ` Sinan Kaya
(?)
@ 2018-11-30 19:18 ` Robert Jarzmik
-1 siblings, 0 replies; 21+ messages in thread
From: Robert Jarzmik @ 2018-11-30 19:18 UTC (permalink / raw)
To: Sinan Kaya
Cc: Yangtao Li, dan.j.williams, vkoul, sudeep.dutt, ashutosh.dixit,
daniel, haojian.zhuang, andy.gross, david.brown, dmaengine,
linux-kernel, linux-arm-kernel, linux-arm-msm, linux-soc
Sinan Kaya <okaya@kernel.org> writes:
> On 11/30/2018 10:42 AM, Yangtao Li wrote:
>> We already have the DEFINE_SHOW_ATTRIBUTE,There is no need to define
>> such a macro,so remove DBGFS_FUNC_DECL.Also use macro to simplify some
>> code.
>>
>> Signed-off-by: Yangtao Li<tiny.windzz@gmail.com>
>> ---
>> drivers/dma/amba-pl08x.c | 14 ++------------
>> drivers/dma/mic_x100_dma.c | 22 +++-------------------
>> drivers/dma/pxa_dma.c | 24 ++++++++++++------------
>> drivers/dma/qcom/hidma_dbg.c | 33 ++++++---------------------------
For pxa_dma:
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Cheers.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH] dmaengine: remove DBGFS_FUNC_DECL()
@ 2018-11-30 19:18 ` Robert Jarzmik
0 siblings, 0 replies; 21+ messages in thread
From: Robert Jarzmik @ 2018-11-30 19:18 UTC (permalink / raw)
To: Sinan Kaya
Cc: Yangtao Li, dan.j.williams, vkoul, sudeep.dutt, ashutosh.dixit,
daniel, haojian.zhuang, andy.gross, david.brown, dmaengine,
linux-kernel, linux-arm-kernel, linux-arm-msm, linux-soc
Sinan Kaya <okaya@kernel.org> writes:
> On 11/30/2018 10:42 AM, Yangtao Li wrote:
>> We already have the DEFINE_SHOW_ATTRIBUTE,There is no need to define
>> such a macro,so remove DBGFS_FUNC_DECL.Also use macro to simplify some
>> code.
>>
>> Signed-off-by: Yangtao Li<tiny.windzz@gmail.com>
>> ---
>> drivers/dma/amba-pl08x.c | 14 ++------------
>> drivers/dma/mic_x100_dma.c | 22 +++-------------------
>> drivers/dma/pxa_dma.c | 24 ++++++++++++------------
>> drivers/dma/qcom/hidma_dbg.c | 33 ++++++---------------------------
For pxa_dma:
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Cheers.
--
Robert
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH] dmaengine: remove DBGFS_FUNC_DECL()
@ 2018-11-30 19:18 ` Robert Jarzmik
0 siblings, 0 replies; 21+ messages in thread
From: Robert Jarzmik @ 2018-11-30 19:18 UTC (permalink / raw)
To: Sinan Kaya
Cc: dmaengine, Yangtao Li, linux-arm-msm, sudeep.dutt,
haojian.zhuang, linux-kernel, ashutosh.dixit, david.brown, vkoul,
linux-arm-kernel, andy.gross, dan.j.williams, linux-soc, daniel
Sinan Kaya <okaya@kernel.org> writes:
> On 11/30/2018 10:42 AM, Yangtao Li wrote:
>> We already have the DEFINE_SHOW_ATTRIBUTE,There is no need to define
>> such a macro,so remove DBGFS_FUNC_DECL.Also use macro to simplify some
>> code.
>>
>> Signed-off-by: Yangtao Li<tiny.windzz@gmail.com>
>> ---
>> drivers/dma/amba-pl08x.c | 14 ++------------
>> drivers/dma/mic_x100_dma.c | 22 +++-------------------
>> drivers/dma/pxa_dma.c | 24 ++++++++++++------------
>> drivers/dma/qcom/hidma_dbg.c | 33 ++++++---------------------------
For pxa_dma:
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Cheers.
--
Robert
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 21+ messages in thread
* dmaengine: remove DBGFS_FUNC_DECL()
2018-11-30 15:42 ` Yangtao Li
(?)
@ 2018-12-05 8:27 ` Vinod Koul
-1 siblings, 0 replies; 21+ messages in thread
From: Vinod Koul @ 2018-12-05 8:27 UTC (permalink / raw)
To: Yangtao Li
Cc: dan.j.williams, sudeep.dutt, ashutosh.dixit, daniel,
haojian.zhuang, robert.jarzmik, okaya, andy.gross, david.brown,
dmaengine, linux-kernel, linux-arm-kernel, linux-arm-msm,
linux-soc
On 30-11-18, 10:42, Yangtao Li wrote:
> We already have the DEFINE_SHOW_ATTRIBUTE,There is no need to define
> such a macro,so remove DBGFS_FUNC_DECL.Also use macro to simplify some
> code.
Spaces after full stop and comma please
>
> Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
> ---
> drivers/dma/amba-pl08x.c | 14 ++------------
> drivers/dma/mic_x100_dma.c | 22 +++-------------------
> drivers/dma/pxa_dma.c | 24 ++++++++++++------------
> drivers/dma/qcom/hidma_dbg.c | 33 ++++++---------------------------
Do you mind splitting it per file.
> 4 files changed, 23 insertions(+), 70 deletions(-)
>
> diff --git a/drivers/dma/amba-pl08x.c b/drivers/dma/amba-pl08x.c
> index 97483df1f82e..fc8c2bab563c 100644
> --- a/drivers/dma/amba-pl08x.c
> +++ b/drivers/dma/amba-pl08x.c
> @@ -2505,24 +2505,14 @@ static int pl08x_debugfs_show(struct seq_file *s, void *data)
> return 0;
> }
>
> -static int pl08x_debugfs_open(struct inode *inode, struct file *file)
> -{
> - return single_open(file, pl08x_debugfs_show, inode->i_private);
> -}
> -
> -static const struct file_operations pl08x_debugfs_operations = {
> - .open = pl08x_debugfs_open,
> - .read = seq_read,
> - .llseek = seq_lseek,
> - .release = single_release,
> -};
> +DEFINE_SHOW_ATTRIBUTE(pl08x_debugfs);
>
> static void init_pl08x_debugfs(struct pl08x_driver_data *pl08x)
> {
> /* Expose a simple debugfs interface to view all clocks */
> (void) debugfs_create_file(dev_name(&pl08x->adev->dev),
> S_IFREG | S_IRUGO, NULL, pl08x,
> - &pl08x_debugfs_operations);
> + &pl08x_debugfs_fops);
> }
>
> #else
> diff --git a/drivers/dma/mic_x100_dma.c b/drivers/dma/mic_x100_dma.c
> index adfd316db1a8..6a91e28d537d 100644
> --- a/drivers/dma/mic_x100_dma.c
> +++ b/drivers/dma/mic_x100_dma.c
> @@ -676,7 +676,7 @@ static void mic_dma_dev_unreg(struct mic_dma_device *mic_dma_dev)
> }
>
> /* DEBUGFS CODE */
> -static int mic_dma_reg_seq_show(struct seq_file *s, void *pos)
> +static int mic_dma_reg_show(struct seq_file *s, void *pos)
> {
> struct mic_dma_device *mic_dma_dev = s->private;
> int i, chan_num, first_chan = mic_dma_dev->start_ch;
> @@ -707,23 +707,7 @@ static int mic_dma_reg_seq_show(struct seq_file *s, void *pos)
> return 0;
> }
>
> -static int mic_dma_reg_debug_open(struct inode *inode, struct file *file)
> -{
> - return single_open(file, mic_dma_reg_seq_show, inode->i_private);
> -}
> -
> -static int mic_dma_reg_debug_release(struct inode *inode, struct file *file)
> -{
> - return single_release(inode, file);
> -}
> -
> -static const struct file_operations mic_dma_reg_ops = {
> - .owner = THIS_MODULE,
> - .open = mic_dma_reg_debug_open,
> - .read = seq_read,
> - .llseek = seq_lseek,
> - .release = mic_dma_reg_debug_release
> -};
> +DEFINE_SHOW_ATTRIBUTE(mic_dma_reg);
>
> /* Debugfs parent dir */
> static struct dentry *mic_dma_dbg;
> @@ -747,7 +731,7 @@ static int mic_dma_driver_probe(struct mbus_device *mbdev)
> if (mic_dma_dev->dbg_dir)
> debugfs_create_file("mic_dma_reg", 0444,
> mic_dma_dev->dbg_dir, mic_dma_dev,
> - &mic_dma_reg_ops);
> + &mic_dma_reg_fops);
> }
> return 0;
> }
> diff --git a/drivers/dma/pxa_dma.c b/drivers/dma/pxa_dma.c
> index 825725057e00..8e1e1b07d32f 100644
> --- a/drivers/dma/pxa_dma.c
> +++ b/drivers/dma/pxa_dma.c
> @@ -189,7 +189,7 @@ bool pxad_filter_fn(struct dma_chan *chan, void *param);
> #include <linux/uaccess.h>
> #include <linux/seq_file.h>
>
> -static int dbg_show_requester_chan(struct seq_file *s, void *p)
> +static int requester_chan_show(struct seq_file *s, void *p)
> {
> struct pxad_phy *phy = s->private;
> int i;
> @@ -220,7 +220,7 @@ static int is_phys_valid(unsigned long addr)
> #define PXA_DCSR_STR(flag) (dcsr & PXA_DCSR_##flag ? #flag" " : "")
> #define PXA_DCMD_STR(flag) (dcmd & PXA_DCMD_##flag ? #flag" " : "")
>
> -static int dbg_show_descriptors(struct seq_file *s, void *p)
> +static int descriptors_show(struct seq_file *s, void *p)
> {
> struct pxad_phy *phy = s->private;
> int i, max_show = 20, burst, width;
> @@ -263,7 +263,7 @@ static int dbg_show_descriptors(struct seq_file *s, void *p)
> return 0;
> }
>
> -static int dbg_show_chan_state(struct seq_file *s, void *p)
> +static int chan_state_show(struct seq_file *s, void *p)
> {
> struct pxad_phy *phy = s->private;
> u32 dcsr, dcmd;
> @@ -306,7 +306,7 @@ static int dbg_show_chan_state(struct seq_file *s, void *p)
> return 0;
> }
>
> -static int dbg_show_state(struct seq_file *s, void *p)
> +static int state_show(struct seq_file *s, void *p)
> {
> struct pxad_device *pdev = s->private;
>
> @@ -329,10 +329,10 @@ static const struct file_operations dbg_fops_##name = { \
> .release = single_release, \
> }
>
> -DBGFS_FUNC_DECL(state);
> -DBGFS_FUNC_DECL(chan_state);
> -DBGFS_FUNC_DECL(descriptors);
> -DBGFS_FUNC_DECL(requester_chan);
> +DEFINE_SHOW_ATTRIBUTE(state);
> +DEFINE_SHOW_ATTRIBUTE(chan_state);
> +DEFINE_SHOW_ATTRIBUTE(descriptors);
> +DEFINE_SHOW_ATTRIBUTE(requester_chan);
>
> static struct dentry *pxad_dbg_alloc_chan(struct pxad_device *pdev,
> int ch, struct dentry *chandir)
> @@ -348,13 +348,13 @@ static struct dentry *pxad_dbg_alloc_chan(struct pxad_device *pdev,
>
> if (chan)
> chan_state = debugfs_create_file("state", 0400, chan, dt,
> - &dbg_fops_chan_state);
> + &chan_state_fops);
> if (chan_state)
> chan_descr = debugfs_create_file("descriptors", 0400, chan, dt,
> - &dbg_fops_descriptors);
> + &descriptors_fops);
> if (chan_descr)
> chan_reqs = debugfs_create_file("requesters", 0400, chan, dt,
> - &dbg_fops_requester_chan);
> + &requester_chan_fops);
> if (!chan_reqs)
> goto err_state;
>
> @@ -375,7 +375,7 @@ static void pxad_init_debugfs(struct pxad_device *pdev)
> goto err_root;
>
> pdev->dbgfs_state = debugfs_create_file("state", 0400, pdev->dbgfs_root,
> - pdev, &dbg_fops_state);
> + pdev, &state_fops);
> if (!pdev->dbgfs_state)
> goto err_state;
>
> diff --git a/drivers/dma/qcom/hidma_dbg.c b/drivers/dma/qcom/hidma_dbg.c
> index 3bdcb8056a36..9523faf7acdc 100644
> --- a/drivers/dma/qcom/hidma_dbg.c
> +++ b/drivers/dma/qcom/hidma_dbg.c
> @@ -85,11 +85,11 @@ static void hidma_ll_devstats(struct seq_file *s, void *llhndl)
> }
>
> /*
> - * hidma_chan_stats: display HIDMA channel statistics
> + * hidma_chan_show: display HIDMA channel statistics
> *
> * Display the statistics for the current HIDMA virtual channel device.
> */
> -static int hidma_chan_stats(struct seq_file *s, void *unused)
> +static int hidma_chan_show(struct seq_file *s, void *unused)
> {
> struct hidma_chan *mchan = s->private;
> struct hidma_desc *mdesc;
> @@ -117,11 +117,11 @@ static int hidma_chan_stats(struct seq_file *s, void *unused)
> }
>
> /*
> - * hidma_dma_info: display HIDMA device info
> + * hidma_dma_show: display HIDMA device info
> *
> * Display the info for the current HIDMA device.
> */
> -static int hidma_dma_info(struct seq_file *s, void *unused)
> +static int hidma_dma_show(struct seq_file *s, void *unused)
> {
> struct hidma_dev *dmadev = s->private;
> resource_size_t sz;
> @@ -138,29 +138,8 @@ static int hidma_dma_info(struct seq_file *s, void *unused)
> return 0;
> }
>
> -static int hidma_chan_stats_open(struct inode *inode, struct file *file)
> -{
> - return single_open(file, hidma_chan_stats, inode->i_private);
> -}
> -
> -static int hidma_dma_info_open(struct inode *inode, struct file *file)
> -{
> - return single_open(file, hidma_dma_info, inode->i_private);
> -}
> -
> -static const struct file_operations hidma_chan_fops = {
> - .open = hidma_chan_stats_open,
> - .read = seq_read,
> - .llseek = seq_lseek,
> - .release = single_release,
> -};
> -
> -static const struct file_operations hidma_dma_fops = {
> - .open = hidma_dma_info_open,
> - .read = seq_read,
> - .llseek = seq_lseek,
> - .release = single_release,
> -};
> +DEFINE_SHOW_ATTRIBUTE(hidma_chan);
> +DEFINE_SHOW_ATTRIBUTE(hidma_dma);
>
> void hidma_debug_uninit(struct hidma_dev *dmadev)
> {
> --
> 2.17.0
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH] dmaengine: remove DBGFS_FUNC_DECL()
@ 2018-12-05 8:27 ` Vinod Koul
0 siblings, 0 replies; 21+ messages in thread
From: Vinod Koul @ 2018-12-05 8:27 UTC (permalink / raw)
To: Yangtao Li
Cc: dan.j.williams, sudeep.dutt, ashutosh.dixit, daniel,
haojian.zhuang, robert.jarzmik, okaya, andy.gross, david.brown,
dmaengine, linux-kernel, linux-arm-kernel, linux-arm-msm,
linux-soc
On 30-11-18, 10:42, Yangtao Li wrote:
> We already have the DEFINE_SHOW_ATTRIBUTE,There is no need to define
> such a macro,so remove DBGFS_FUNC_DECL.Also use macro to simplify some
> code.
Spaces after full stop and comma please
>
> Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
> ---
> drivers/dma/amba-pl08x.c | 14 ++------------
> drivers/dma/mic_x100_dma.c | 22 +++-------------------
> drivers/dma/pxa_dma.c | 24 ++++++++++++------------
> drivers/dma/qcom/hidma_dbg.c | 33 ++++++---------------------------
Do you mind splitting it per file.
> 4 files changed, 23 insertions(+), 70 deletions(-)
>
> diff --git a/drivers/dma/amba-pl08x.c b/drivers/dma/amba-pl08x.c
> index 97483df1f82e..fc8c2bab563c 100644
> --- a/drivers/dma/amba-pl08x.c
> +++ b/drivers/dma/amba-pl08x.c
> @@ -2505,24 +2505,14 @@ static int pl08x_debugfs_show(struct seq_file *s, void *data)
> return 0;
> }
>
> -static int pl08x_debugfs_open(struct inode *inode, struct file *file)
> -{
> - return single_open(file, pl08x_debugfs_show, inode->i_private);
> -}
> -
> -static const struct file_operations pl08x_debugfs_operations = {
> - .open = pl08x_debugfs_open,
> - .read = seq_read,
> - .llseek = seq_lseek,
> - .release = single_release,
> -};
> +DEFINE_SHOW_ATTRIBUTE(pl08x_debugfs);
>
> static void init_pl08x_debugfs(struct pl08x_driver_data *pl08x)
> {
> /* Expose a simple debugfs interface to view all clocks */
> (void) debugfs_create_file(dev_name(&pl08x->adev->dev),
> S_IFREG | S_IRUGO, NULL, pl08x,
> - &pl08x_debugfs_operations);
> + &pl08x_debugfs_fops);
> }
>
> #else
> diff --git a/drivers/dma/mic_x100_dma.c b/drivers/dma/mic_x100_dma.c
> index adfd316db1a8..6a91e28d537d 100644
> --- a/drivers/dma/mic_x100_dma.c
> +++ b/drivers/dma/mic_x100_dma.c
> @@ -676,7 +676,7 @@ static void mic_dma_dev_unreg(struct mic_dma_device *mic_dma_dev)
> }
>
> /* DEBUGFS CODE */
> -static int mic_dma_reg_seq_show(struct seq_file *s, void *pos)
> +static int mic_dma_reg_show(struct seq_file *s, void *pos)
> {
> struct mic_dma_device *mic_dma_dev = s->private;
> int i, chan_num, first_chan = mic_dma_dev->start_ch;
> @@ -707,23 +707,7 @@ static int mic_dma_reg_seq_show(struct seq_file *s, void *pos)
> return 0;
> }
>
> -static int mic_dma_reg_debug_open(struct inode *inode, struct file *file)
> -{
> - return single_open(file, mic_dma_reg_seq_show, inode->i_private);
> -}
> -
> -static int mic_dma_reg_debug_release(struct inode *inode, struct file *file)
> -{
> - return single_release(inode, file);
> -}
> -
> -static const struct file_operations mic_dma_reg_ops = {
> - .owner = THIS_MODULE,
> - .open = mic_dma_reg_debug_open,
> - .read = seq_read,
> - .llseek = seq_lseek,
> - .release = mic_dma_reg_debug_release
> -};
> +DEFINE_SHOW_ATTRIBUTE(mic_dma_reg);
>
> /* Debugfs parent dir */
> static struct dentry *mic_dma_dbg;
> @@ -747,7 +731,7 @@ static int mic_dma_driver_probe(struct mbus_device *mbdev)
> if (mic_dma_dev->dbg_dir)
> debugfs_create_file("mic_dma_reg", 0444,
> mic_dma_dev->dbg_dir, mic_dma_dev,
> - &mic_dma_reg_ops);
> + &mic_dma_reg_fops);
> }
> return 0;
> }
> diff --git a/drivers/dma/pxa_dma.c b/drivers/dma/pxa_dma.c
> index 825725057e00..8e1e1b07d32f 100644
> --- a/drivers/dma/pxa_dma.c
> +++ b/drivers/dma/pxa_dma.c
> @@ -189,7 +189,7 @@ bool pxad_filter_fn(struct dma_chan *chan, void *param);
> #include <linux/uaccess.h>
> #include <linux/seq_file.h>
>
> -static int dbg_show_requester_chan(struct seq_file *s, void *p)
> +static int requester_chan_show(struct seq_file *s, void *p)
> {
> struct pxad_phy *phy = s->private;
> int i;
> @@ -220,7 +220,7 @@ static int is_phys_valid(unsigned long addr)
> #define PXA_DCSR_STR(flag) (dcsr & PXA_DCSR_##flag ? #flag" " : "")
> #define PXA_DCMD_STR(flag) (dcmd & PXA_DCMD_##flag ? #flag" " : "")
>
> -static int dbg_show_descriptors(struct seq_file *s, void *p)
> +static int descriptors_show(struct seq_file *s, void *p)
> {
> struct pxad_phy *phy = s->private;
> int i, max_show = 20, burst, width;
> @@ -263,7 +263,7 @@ static int dbg_show_descriptors(struct seq_file *s, void *p)
> return 0;
> }
>
> -static int dbg_show_chan_state(struct seq_file *s, void *p)
> +static int chan_state_show(struct seq_file *s, void *p)
> {
> struct pxad_phy *phy = s->private;
> u32 dcsr, dcmd;
> @@ -306,7 +306,7 @@ static int dbg_show_chan_state(struct seq_file *s, void *p)
> return 0;
> }
>
> -static int dbg_show_state(struct seq_file *s, void *p)
> +static int state_show(struct seq_file *s, void *p)
> {
> struct pxad_device *pdev = s->private;
>
> @@ -329,10 +329,10 @@ static const struct file_operations dbg_fops_##name = { \
> .release = single_release, \
> }
>
> -DBGFS_FUNC_DECL(state);
> -DBGFS_FUNC_DECL(chan_state);
> -DBGFS_FUNC_DECL(descriptors);
> -DBGFS_FUNC_DECL(requester_chan);
> +DEFINE_SHOW_ATTRIBUTE(state);
> +DEFINE_SHOW_ATTRIBUTE(chan_state);
> +DEFINE_SHOW_ATTRIBUTE(descriptors);
> +DEFINE_SHOW_ATTRIBUTE(requester_chan);
>
> static struct dentry *pxad_dbg_alloc_chan(struct pxad_device *pdev,
> int ch, struct dentry *chandir)
> @@ -348,13 +348,13 @@ static struct dentry *pxad_dbg_alloc_chan(struct pxad_device *pdev,
>
> if (chan)
> chan_state = debugfs_create_file("state", 0400, chan, dt,
> - &dbg_fops_chan_state);
> + &chan_state_fops);
> if (chan_state)
> chan_descr = debugfs_create_file("descriptors", 0400, chan, dt,
> - &dbg_fops_descriptors);
> + &descriptors_fops);
> if (chan_descr)
> chan_reqs = debugfs_create_file("requesters", 0400, chan, dt,
> - &dbg_fops_requester_chan);
> + &requester_chan_fops);
> if (!chan_reqs)
> goto err_state;
>
> @@ -375,7 +375,7 @@ static void pxad_init_debugfs(struct pxad_device *pdev)
> goto err_root;
>
> pdev->dbgfs_state = debugfs_create_file("state", 0400, pdev->dbgfs_root,
> - pdev, &dbg_fops_state);
> + pdev, &state_fops);
> if (!pdev->dbgfs_state)
> goto err_state;
>
> diff --git a/drivers/dma/qcom/hidma_dbg.c b/drivers/dma/qcom/hidma_dbg.c
> index 3bdcb8056a36..9523faf7acdc 100644
> --- a/drivers/dma/qcom/hidma_dbg.c
> +++ b/drivers/dma/qcom/hidma_dbg.c
> @@ -85,11 +85,11 @@ static void hidma_ll_devstats(struct seq_file *s, void *llhndl)
> }
>
> /*
> - * hidma_chan_stats: display HIDMA channel statistics
> + * hidma_chan_show: display HIDMA channel statistics
> *
> * Display the statistics for the current HIDMA virtual channel device.
> */
> -static int hidma_chan_stats(struct seq_file *s, void *unused)
> +static int hidma_chan_show(struct seq_file *s, void *unused)
> {
> struct hidma_chan *mchan = s->private;
> struct hidma_desc *mdesc;
> @@ -117,11 +117,11 @@ static int hidma_chan_stats(struct seq_file *s, void *unused)
> }
>
> /*
> - * hidma_dma_info: display HIDMA device info
> + * hidma_dma_show: display HIDMA device info
> *
> * Display the info for the current HIDMA device.
> */
> -static int hidma_dma_info(struct seq_file *s, void *unused)
> +static int hidma_dma_show(struct seq_file *s, void *unused)
> {
> struct hidma_dev *dmadev = s->private;
> resource_size_t sz;
> @@ -138,29 +138,8 @@ static int hidma_dma_info(struct seq_file *s, void *unused)
> return 0;
> }
>
> -static int hidma_chan_stats_open(struct inode *inode, struct file *file)
> -{
> - return single_open(file, hidma_chan_stats, inode->i_private);
> -}
> -
> -static int hidma_dma_info_open(struct inode *inode, struct file *file)
> -{
> - return single_open(file, hidma_dma_info, inode->i_private);
> -}
> -
> -static const struct file_operations hidma_chan_fops = {
> - .open = hidma_chan_stats_open,
> - .read = seq_read,
> - .llseek = seq_lseek,
> - .release = single_release,
> -};
> -
> -static const struct file_operations hidma_dma_fops = {
> - .open = hidma_dma_info_open,
> - .read = seq_read,
> - .llseek = seq_lseek,
> - .release = single_release,
> -};
> +DEFINE_SHOW_ATTRIBUTE(hidma_chan);
> +DEFINE_SHOW_ATTRIBUTE(hidma_dma);
>
> void hidma_debug_uninit(struct hidma_dev *dmadev)
> {
> --
> 2.17.0
--
~Vinod
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH] dmaengine: remove DBGFS_FUNC_DECL()
@ 2018-12-05 8:27 ` Vinod Koul
0 siblings, 0 replies; 21+ messages in thread
From: Vinod Koul @ 2018-12-05 8:27 UTC (permalink / raw)
To: Yangtao Li
Cc: linux-soc, dmaengine, linux-arm-msm, okaya, sudeep.dutt,
haojian.zhuang, linux-kernel, ashutosh.dixit, david.brown,
linux-arm-kernel, andy.gross, dan.j.williams, robert.jarzmik,
daniel
On 30-11-18, 10:42, Yangtao Li wrote:
> We already have the DEFINE_SHOW_ATTRIBUTE,There is no need to define
> such a macro,so remove DBGFS_FUNC_DECL.Also use macro to simplify some
> code.
Spaces after full stop and comma please
>
> Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
> ---
> drivers/dma/amba-pl08x.c | 14 ++------------
> drivers/dma/mic_x100_dma.c | 22 +++-------------------
> drivers/dma/pxa_dma.c | 24 ++++++++++++------------
> drivers/dma/qcom/hidma_dbg.c | 33 ++++++---------------------------
Do you mind splitting it per file.
> 4 files changed, 23 insertions(+), 70 deletions(-)
>
> diff --git a/drivers/dma/amba-pl08x.c b/drivers/dma/amba-pl08x.c
> index 97483df1f82e..fc8c2bab563c 100644
> --- a/drivers/dma/amba-pl08x.c
> +++ b/drivers/dma/amba-pl08x.c
> @@ -2505,24 +2505,14 @@ static int pl08x_debugfs_show(struct seq_file *s, void *data)
> return 0;
> }
>
> -static int pl08x_debugfs_open(struct inode *inode, struct file *file)
> -{
> - return single_open(file, pl08x_debugfs_show, inode->i_private);
> -}
> -
> -static const struct file_operations pl08x_debugfs_operations = {
> - .open = pl08x_debugfs_open,
> - .read = seq_read,
> - .llseek = seq_lseek,
> - .release = single_release,
> -};
> +DEFINE_SHOW_ATTRIBUTE(pl08x_debugfs);
>
> static void init_pl08x_debugfs(struct pl08x_driver_data *pl08x)
> {
> /* Expose a simple debugfs interface to view all clocks */
> (void) debugfs_create_file(dev_name(&pl08x->adev->dev),
> S_IFREG | S_IRUGO, NULL, pl08x,
> - &pl08x_debugfs_operations);
> + &pl08x_debugfs_fops);
> }
>
> #else
> diff --git a/drivers/dma/mic_x100_dma.c b/drivers/dma/mic_x100_dma.c
> index adfd316db1a8..6a91e28d537d 100644
> --- a/drivers/dma/mic_x100_dma.c
> +++ b/drivers/dma/mic_x100_dma.c
> @@ -676,7 +676,7 @@ static void mic_dma_dev_unreg(struct mic_dma_device *mic_dma_dev)
> }
>
> /* DEBUGFS CODE */
> -static int mic_dma_reg_seq_show(struct seq_file *s, void *pos)
> +static int mic_dma_reg_show(struct seq_file *s, void *pos)
> {
> struct mic_dma_device *mic_dma_dev = s->private;
> int i, chan_num, first_chan = mic_dma_dev->start_ch;
> @@ -707,23 +707,7 @@ static int mic_dma_reg_seq_show(struct seq_file *s, void *pos)
> return 0;
> }
>
> -static int mic_dma_reg_debug_open(struct inode *inode, struct file *file)
> -{
> - return single_open(file, mic_dma_reg_seq_show, inode->i_private);
> -}
> -
> -static int mic_dma_reg_debug_release(struct inode *inode, struct file *file)
> -{
> - return single_release(inode, file);
> -}
> -
> -static const struct file_operations mic_dma_reg_ops = {
> - .owner = THIS_MODULE,
> - .open = mic_dma_reg_debug_open,
> - .read = seq_read,
> - .llseek = seq_lseek,
> - .release = mic_dma_reg_debug_release
> -};
> +DEFINE_SHOW_ATTRIBUTE(mic_dma_reg);
>
> /* Debugfs parent dir */
> static struct dentry *mic_dma_dbg;
> @@ -747,7 +731,7 @@ static int mic_dma_driver_probe(struct mbus_device *mbdev)
> if (mic_dma_dev->dbg_dir)
> debugfs_create_file("mic_dma_reg", 0444,
> mic_dma_dev->dbg_dir, mic_dma_dev,
> - &mic_dma_reg_ops);
> + &mic_dma_reg_fops);
> }
> return 0;
> }
> diff --git a/drivers/dma/pxa_dma.c b/drivers/dma/pxa_dma.c
> index 825725057e00..8e1e1b07d32f 100644
> --- a/drivers/dma/pxa_dma.c
> +++ b/drivers/dma/pxa_dma.c
> @@ -189,7 +189,7 @@ bool pxad_filter_fn(struct dma_chan *chan, void *param);
> #include <linux/uaccess.h>
> #include <linux/seq_file.h>
>
> -static int dbg_show_requester_chan(struct seq_file *s, void *p)
> +static int requester_chan_show(struct seq_file *s, void *p)
> {
> struct pxad_phy *phy = s->private;
> int i;
> @@ -220,7 +220,7 @@ static int is_phys_valid(unsigned long addr)
> #define PXA_DCSR_STR(flag) (dcsr & PXA_DCSR_##flag ? #flag" " : "")
> #define PXA_DCMD_STR(flag) (dcmd & PXA_DCMD_##flag ? #flag" " : "")
>
> -static int dbg_show_descriptors(struct seq_file *s, void *p)
> +static int descriptors_show(struct seq_file *s, void *p)
> {
> struct pxad_phy *phy = s->private;
> int i, max_show = 20, burst, width;
> @@ -263,7 +263,7 @@ static int dbg_show_descriptors(struct seq_file *s, void *p)
> return 0;
> }
>
> -static int dbg_show_chan_state(struct seq_file *s, void *p)
> +static int chan_state_show(struct seq_file *s, void *p)
> {
> struct pxad_phy *phy = s->private;
> u32 dcsr, dcmd;
> @@ -306,7 +306,7 @@ static int dbg_show_chan_state(struct seq_file *s, void *p)
> return 0;
> }
>
> -static int dbg_show_state(struct seq_file *s, void *p)
> +static int state_show(struct seq_file *s, void *p)
> {
> struct pxad_device *pdev = s->private;
>
> @@ -329,10 +329,10 @@ static const struct file_operations dbg_fops_##name = { \
> .release = single_release, \
> }
>
> -DBGFS_FUNC_DECL(state);
> -DBGFS_FUNC_DECL(chan_state);
> -DBGFS_FUNC_DECL(descriptors);
> -DBGFS_FUNC_DECL(requester_chan);
> +DEFINE_SHOW_ATTRIBUTE(state);
> +DEFINE_SHOW_ATTRIBUTE(chan_state);
> +DEFINE_SHOW_ATTRIBUTE(descriptors);
> +DEFINE_SHOW_ATTRIBUTE(requester_chan);
>
> static struct dentry *pxad_dbg_alloc_chan(struct pxad_device *pdev,
> int ch, struct dentry *chandir)
> @@ -348,13 +348,13 @@ static struct dentry *pxad_dbg_alloc_chan(struct pxad_device *pdev,
>
> if (chan)
> chan_state = debugfs_create_file("state", 0400, chan, dt,
> - &dbg_fops_chan_state);
> + &chan_state_fops);
> if (chan_state)
> chan_descr = debugfs_create_file("descriptors", 0400, chan, dt,
> - &dbg_fops_descriptors);
> + &descriptors_fops);
> if (chan_descr)
> chan_reqs = debugfs_create_file("requesters", 0400, chan, dt,
> - &dbg_fops_requester_chan);
> + &requester_chan_fops);
> if (!chan_reqs)
> goto err_state;
>
> @@ -375,7 +375,7 @@ static void pxad_init_debugfs(struct pxad_device *pdev)
> goto err_root;
>
> pdev->dbgfs_state = debugfs_create_file("state", 0400, pdev->dbgfs_root,
> - pdev, &dbg_fops_state);
> + pdev, &state_fops);
> if (!pdev->dbgfs_state)
> goto err_state;
>
> diff --git a/drivers/dma/qcom/hidma_dbg.c b/drivers/dma/qcom/hidma_dbg.c
> index 3bdcb8056a36..9523faf7acdc 100644
> --- a/drivers/dma/qcom/hidma_dbg.c
> +++ b/drivers/dma/qcom/hidma_dbg.c
> @@ -85,11 +85,11 @@ static void hidma_ll_devstats(struct seq_file *s, void *llhndl)
> }
>
> /*
> - * hidma_chan_stats: display HIDMA channel statistics
> + * hidma_chan_show: display HIDMA channel statistics
> *
> * Display the statistics for the current HIDMA virtual channel device.
> */
> -static int hidma_chan_stats(struct seq_file *s, void *unused)
> +static int hidma_chan_show(struct seq_file *s, void *unused)
> {
> struct hidma_chan *mchan = s->private;
> struct hidma_desc *mdesc;
> @@ -117,11 +117,11 @@ static int hidma_chan_stats(struct seq_file *s, void *unused)
> }
>
> /*
> - * hidma_dma_info: display HIDMA device info
> + * hidma_dma_show: display HIDMA device info
> *
> * Display the info for the current HIDMA device.
> */
> -static int hidma_dma_info(struct seq_file *s, void *unused)
> +static int hidma_dma_show(struct seq_file *s, void *unused)
> {
> struct hidma_dev *dmadev = s->private;
> resource_size_t sz;
> @@ -138,29 +138,8 @@ static int hidma_dma_info(struct seq_file *s, void *unused)
> return 0;
> }
>
> -static int hidma_chan_stats_open(struct inode *inode, struct file *file)
> -{
> - return single_open(file, hidma_chan_stats, inode->i_private);
> -}
> -
> -static int hidma_dma_info_open(struct inode *inode, struct file *file)
> -{
> - return single_open(file, hidma_dma_info, inode->i_private);
> -}
> -
> -static const struct file_operations hidma_chan_fops = {
> - .open = hidma_chan_stats_open,
> - .read = seq_read,
> - .llseek = seq_lseek,
> - .release = single_release,
> -};
> -
> -static const struct file_operations hidma_dma_fops = {
> - .open = hidma_dma_info_open,
> - .read = seq_read,
> - .llseek = seq_lseek,
> - .release = single_release,
> -};
> +DEFINE_SHOW_ATTRIBUTE(hidma_chan);
> +DEFINE_SHOW_ATTRIBUTE(hidma_dma);
>
> void hidma_debug_uninit(struct hidma_dev *dmadev)
> {
> --
> 2.17.0
--
~Vinod
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 21+ messages in thread
* dmaengine: remove DBGFS_FUNC_DECL()
2018-12-05 8:27 ` Vinod Koul
(?)
@ 2018-12-05 15:49 ` Frank Lee
-1 siblings, 0 replies; 21+ messages in thread
From: Yangtao Li @ 2018-12-05 15:49 UTC (permalink / raw)
To: vkoul
Cc: dan.j.williams, sudeep.dutt, ashutosh.dixit, daniel,
Haojian Zhuang, robert.jarzmik, okaya, Andy Gross, David Brown,
dmaengine, linux-kernel, linux-arm-kernel, linux-arm-msm,
linux-soc
On Wed, Dec 5, 2018 at 4:27 PM Vinod Koul <vkoul@kernel.org> wrote:
>
> On 30-11-18, 10:42, Yangtao Li wrote:
> > We already have the DEFINE_SHOW_ATTRIBUTE,There is no need to define
> > such a macro,so remove DBGFS_FUNC_DECL.Also use macro to simplify some
> > code.
>
> Spaces after full stop and comma please
>
> >
> > Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
> > ---
> > drivers/dma/amba-pl08x.c | 14 ++------------
> > drivers/dma/mic_x100_dma.c | 22 +++-------------------
> > drivers/dma/pxa_dma.c | 24 ++++++++++++------------
> > drivers/dma/qcom/hidma_dbg.c | 33 ++++++---------------------------
>
> Do you mind splitting it per file.
Hi Vinod:
Why not apply it once ?The change is not too big.
Thanks,
Yangtao
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH] dmaengine: remove DBGFS_FUNC_DECL()
@ 2018-12-05 15:49 ` Frank Lee
0 siblings, 0 replies; 21+ messages in thread
From: Frank Lee @ 2018-12-05 15:49 UTC (permalink / raw)
To: vkoul
Cc: dan.j.williams, sudeep.dutt, ashutosh.dixit, daniel,
Haojian Zhuang, robert.jarzmik, okaya, Andy Gross, David Brown,
dmaengine, linux-kernel, linux-arm-kernel, linux-arm-msm,
linux-soc
On Wed, Dec 5, 2018 at 4:27 PM Vinod Koul <vkoul@kernel.org> wrote:
>
> On 30-11-18, 10:42, Yangtao Li wrote:
> > We already have the DEFINE_SHOW_ATTRIBUTE,There is no need to define
> > such a macro,so remove DBGFS_FUNC_DECL.Also use macro to simplify some
> > code.
>
> Spaces after full stop and comma please
>
> >
> > Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
> > ---
> > drivers/dma/amba-pl08x.c | 14 ++------------
> > drivers/dma/mic_x100_dma.c | 22 +++-------------------
> > drivers/dma/pxa_dma.c | 24 ++++++++++++------------
> > drivers/dma/qcom/hidma_dbg.c | 33 ++++++---------------------------
>
> Do you mind splitting it per file.
Hi Vinod:
Why not apply it once ?The change is not too big.
Thanks,
Yangtao
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH] dmaengine: remove DBGFS_FUNC_DECL()
@ 2018-12-05 15:49 ` Frank Lee
0 siblings, 0 replies; 21+ messages in thread
From: Frank Lee @ 2018-12-05 15:49 UTC (permalink / raw)
To: vkoul
Cc: linux-soc, dmaengine, linux-arm-msm, okaya, sudeep.dutt,
Haojian Zhuang, linux-kernel, ashutosh.dixit, David Brown,
linux-arm-kernel, Andy Gross, dan.j.williams, robert.jarzmik,
daniel
On Wed, Dec 5, 2018 at 4:27 PM Vinod Koul <vkoul@kernel.org> wrote:
>
> On 30-11-18, 10:42, Yangtao Li wrote:
> > We already have the DEFINE_SHOW_ATTRIBUTE,There is no need to define
> > such a macro,so remove DBGFS_FUNC_DECL.Also use macro to simplify some
> > code.
>
> Spaces after full stop and comma please
>
> >
> > Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
> > ---
> > drivers/dma/amba-pl08x.c | 14 ++------------
> > drivers/dma/mic_x100_dma.c | 22 +++-------------------
> > drivers/dma/pxa_dma.c | 24 ++++++++++++------------
> > drivers/dma/qcom/hidma_dbg.c | 33 ++++++---------------------------
>
> Do you mind splitting it per file.
Hi Vinod:
Why not apply it once ?The change is not too big.
Thanks,
Yangtao
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 21+ messages in thread
* dmaengine: remove DBGFS_FUNC_DECL()
2018-12-05 15:49 ` Frank Lee
(?)
@ 2018-12-05 15:59 ` Vinod Koul
-1 siblings, 0 replies; 21+ messages in thread
From: Vinod Koul @ 2018-12-05 15:59 UTC (permalink / raw)
To: Frank Lee
Cc: dan.j.williams, sudeep.dutt, ashutosh.dixit, daniel,
Haojian Zhuang, robert.jarzmik, okaya, Andy Gross, David Brown,
dmaengine, linux-kernel, linux-arm-kernel, linux-arm-msm,
linux-soc
On 05-12-18, 23:49, Frank Lee wrote:
> On Wed, Dec 5, 2018 at 4:27 PM Vinod Koul <vkoul@kernel.org> wrote:
> >
> > On 30-11-18, 10:42, Yangtao Li wrote:
> > > We already have the DEFINE_SHOW_ATTRIBUTE,There is no need to define
> > > such a macro,so remove DBGFS_FUNC_DECL.Also use macro to simplify some
> > > code.
> >
> > Spaces after full stop and comma please
> >
> > >
> > > Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
> > > ---
> > > drivers/dma/amba-pl08x.c | 14 ++------------
> > > drivers/dma/mic_x100_dma.c | 22 +++-------------------
> > > drivers/dma/pxa_dma.c | 24 ++++++++++++------------
> > > drivers/dma/qcom/hidma_dbg.c | 33 ++++++---------------------------
> >
> > Do you mind splitting it per file.
> Hi Vinod:
>
> Why not apply it once ?The change is not too big.
It is not about big or small. A patch should do one thing and touch a
single module.
It also helps people when they look at changes and backports.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH] dmaengine: remove DBGFS_FUNC_DECL()
@ 2018-12-05 15:59 ` Vinod Koul
0 siblings, 0 replies; 21+ messages in thread
From: Vinod Koul @ 2018-12-05 15:59 UTC (permalink / raw)
To: Frank Lee
Cc: dan.j.williams, sudeep.dutt, ashutosh.dixit, daniel,
Haojian Zhuang, robert.jarzmik, okaya, Andy Gross, David Brown,
dmaengine, linux-kernel, linux-arm-kernel, linux-arm-msm,
linux-soc
On 05-12-18, 23:49, Frank Lee wrote:
> On Wed, Dec 5, 2018 at 4:27 PM Vinod Koul <vkoul@kernel.org> wrote:
> >
> > On 30-11-18, 10:42, Yangtao Li wrote:
> > > We already have the DEFINE_SHOW_ATTRIBUTE,There is no need to define
> > > such a macro,so remove DBGFS_FUNC_DECL.Also use macro to simplify some
> > > code.
> >
> > Spaces after full stop and comma please
> >
> > >
> > > Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
> > > ---
> > > drivers/dma/amba-pl08x.c | 14 ++------------
> > > drivers/dma/mic_x100_dma.c | 22 +++-------------------
> > > drivers/dma/pxa_dma.c | 24 ++++++++++++------------
> > > drivers/dma/qcom/hidma_dbg.c | 33 ++++++---------------------------
> >
> > Do you mind splitting it per file.
> Hi Vinod:
>
> Why not apply it once ?The change is not too big.
It is not about big or small. A patch should do one thing and touch a
single module.
It also helps people when they look at changes and backports.
--
~Vinod
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH] dmaengine: remove DBGFS_FUNC_DECL()
@ 2018-12-05 15:59 ` Vinod Koul
0 siblings, 0 replies; 21+ messages in thread
From: Vinod Koul @ 2018-12-05 15:59 UTC (permalink / raw)
To: Frank Lee
Cc: linux-soc, dmaengine, linux-arm-msm, okaya, sudeep.dutt,
Haojian Zhuang, linux-kernel, ashutosh.dixit, David Brown,
linux-arm-kernel, Andy Gross, dan.j.williams, robert.jarzmik,
daniel
On 05-12-18, 23:49, Frank Lee wrote:
> On Wed, Dec 5, 2018 at 4:27 PM Vinod Koul <vkoul@kernel.org> wrote:
> >
> > On 30-11-18, 10:42, Yangtao Li wrote:
> > > We already have the DEFINE_SHOW_ATTRIBUTE,There is no need to define
> > > such a macro,so remove DBGFS_FUNC_DECL.Also use macro to simplify some
> > > code.
> >
> > Spaces after full stop and comma please
> >
> > >
> > > Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
> > > ---
> > > drivers/dma/amba-pl08x.c | 14 ++------------
> > > drivers/dma/mic_x100_dma.c | 22 +++-------------------
> > > drivers/dma/pxa_dma.c | 24 ++++++++++++------------
> > > drivers/dma/qcom/hidma_dbg.c | 33 ++++++---------------------------
> >
> > Do you mind splitting it per file.
> Hi Vinod:
>
> Why not apply it once ?The change is not too big.
It is not about big or small. A patch should do one thing and touch a
single module.
It also helps people when they look at changes and backports.
--
~Vinod
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 21+ messages in thread
* dmaengine: remove DBGFS_FUNC_DECL()
2018-12-05 15:59 ` Vinod Koul
(?)
@ 2018-12-05 16:21 ` Frank Lee
-1 siblings, 0 replies; 21+ messages in thread
From: Yangtao Li @ 2018-12-05 16:21 UTC (permalink / raw)
To: vkoul
Cc: dan.j.williams, sudeep.dutt, ashutosh.dixit, daniel,
Haojian Zhuang, robert.jarzmik, okaya, Andy Gross, David Brown,
dmaengine, linux-kernel, linux-arm-kernel, linux-arm-msm,
linux-soc
On Wed, Dec 5, 2018 at 11:59 PM Vinod Koul <vkoul@kernel.org> wrote:
>
> On 05-12-18, 23:49, Frank Lee wrote:
> > On Wed, Dec 5, 2018 at 4:27 PM Vinod Koul <vkoul@kernel.org> wrote:
> > >
> > > On 30-11-18, 10:42, Yangtao Li wrote:
> > > > We already have the DEFINE_SHOW_ATTRIBUTE,There is no need to define
> > > > such a macro,so remove DBGFS_FUNC_DECL.Also use macro to simplify some
> > > > code.
> > >
> > > Spaces after full stop and comma please
> > >
> > > >
> > > > Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
> > > > ---
> > > > drivers/dma/amba-pl08x.c | 14 ++------------
> > > > drivers/dma/mic_x100_dma.c | 22 +++-------------------
> > > > drivers/dma/pxa_dma.c | 24 ++++++++++++------------
> > > > drivers/dma/qcom/hidma_dbg.c | 33 ++++++---------------------------
> > >
> > > Do you mind splitting it per file.
> > Hi Vinod:
> >
> > Why not apply it once ?The change is not too big.
>
> It is not about big or small. A patch should do one thing and touch a
> single module.
>
> It also helps people when they look at changes and backports.
Already divided into small files, as you need.
MBR,
Yangtao
>
> --
> ~Vinod
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH] dmaengine: remove DBGFS_FUNC_DECL()
@ 2018-12-05 16:21 ` Frank Lee
0 siblings, 0 replies; 21+ messages in thread
From: Frank Lee @ 2018-12-05 16:21 UTC (permalink / raw)
To: vkoul
Cc: dan.j.williams, sudeep.dutt, ashutosh.dixit, daniel,
Haojian Zhuang, robert.jarzmik, okaya, Andy Gross, David Brown,
dmaengine, linux-kernel, linux-arm-kernel, linux-arm-msm,
linux-soc
On Wed, Dec 5, 2018 at 11:59 PM Vinod Koul <vkoul@kernel.org> wrote:
>
> On 05-12-18, 23:49, Frank Lee wrote:
> > On Wed, Dec 5, 2018 at 4:27 PM Vinod Koul <vkoul@kernel.org> wrote:
> > >
> > > On 30-11-18, 10:42, Yangtao Li wrote:
> > > > We already have the DEFINE_SHOW_ATTRIBUTE,There is no need to define
> > > > such a macro,so remove DBGFS_FUNC_DECL.Also use macro to simplify some
> > > > code.
> > >
> > > Spaces after full stop and comma please
> > >
> > > >
> > > > Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
> > > > ---
> > > > drivers/dma/amba-pl08x.c | 14 ++------------
> > > > drivers/dma/mic_x100_dma.c | 22 +++-------------------
> > > > drivers/dma/pxa_dma.c | 24 ++++++++++++------------
> > > > drivers/dma/qcom/hidma_dbg.c | 33 ++++++---------------------------
> > >
> > > Do you mind splitting it per file.
> > Hi Vinod:
> >
> > Why not apply it once ?The change is not too big.
>
> It is not about big or small. A patch should do one thing and touch a
> single module.
>
> It also helps people when they look at changes and backports.
Already divided into small files, as you need.
MBR,
Yangtao
>
> --
> ~Vinod
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH] dmaengine: remove DBGFS_FUNC_DECL()
@ 2018-12-05 16:21 ` Frank Lee
0 siblings, 0 replies; 21+ messages in thread
From: Frank Lee @ 2018-12-05 16:21 UTC (permalink / raw)
To: vkoul
Cc: linux-soc, dmaengine, linux-arm-msm, okaya, sudeep.dutt,
Haojian Zhuang, linux-kernel, ashutosh.dixit, David Brown,
linux-arm-kernel, Andy Gross, dan.j.williams, robert.jarzmik,
daniel
On Wed, Dec 5, 2018 at 11:59 PM Vinod Koul <vkoul@kernel.org> wrote:
>
> On 05-12-18, 23:49, Frank Lee wrote:
> > On Wed, Dec 5, 2018 at 4:27 PM Vinod Koul <vkoul@kernel.org> wrote:
> > >
> > > On 30-11-18, 10:42, Yangtao Li wrote:
> > > > We already have the DEFINE_SHOW_ATTRIBUTE,There is no need to define
> > > > such a macro,so remove DBGFS_FUNC_DECL.Also use macro to simplify some
> > > > code.
> > >
> > > Spaces after full stop and comma please
> > >
> > > >
> > > > Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
> > > > ---
> > > > drivers/dma/amba-pl08x.c | 14 ++------------
> > > > drivers/dma/mic_x100_dma.c | 22 +++-------------------
> > > > drivers/dma/pxa_dma.c | 24 ++++++++++++------------
> > > > drivers/dma/qcom/hidma_dbg.c | 33 ++++++---------------------------
> > >
> > > Do you mind splitting it per file.
> > Hi Vinod:
> >
> > Why not apply it once ?The change is not too big.
>
> It is not about big or small. A patch should do one thing and touch a
> single module.
>
> It also helps people when they look at changes and backports.
Already divided into small files, as you need.
MBR,
Yangtao
>
> --
> ~Vinod
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 21+ messages in thread
end of thread, other threads:[~2018-12-05 16:21 UTC | newest]
Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-30 19:18 dmaengine: remove DBGFS_FUNC_DECL() Robert Jarzmik
2018-11-30 19:18 ` [PATCH] " Robert Jarzmik
2018-11-30 19:18 ` Robert Jarzmik
-- strict thread matches above, loose matches on Subject: below --
2018-12-05 16:21 Yangtao Li
2018-12-05 16:21 ` [PATCH] " Frank Lee
2018-12-05 16:21 ` Frank Lee
2018-12-05 15:59 Vinod Koul
2018-12-05 15:59 ` [PATCH] " Vinod Koul
2018-12-05 15:59 ` Vinod Koul
2018-12-05 15:49 Yangtao Li
2018-12-05 15:49 ` [PATCH] " Frank Lee
2018-12-05 15:49 ` Frank Lee
2018-12-05 8:27 Vinod Koul
2018-12-05 8:27 ` [PATCH] " Vinod Koul
2018-12-05 8:27 ` Vinod Koul
2018-11-30 15:59 Sinan Kaya
2018-11-30 15:59 ` [PATCH] " Sinan Kaya
2018-11-30 15:59 ` Sinan Kaya
2018-11-30 15:42 Yangtao Li
2018-11-30 15:42 ` [PATCH] " Yangtao Li
2018-11-30 15:42 ` Yangtao Li
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.