gpu: host1x: Convert to DEFINE_SHOW_ATTRIBUTE
PATCH 1/1 gpu: host1x: Convert to DEFINE_SHOW_ATTRIBUTE
From: Yongqiang Liu <[email protected]>
Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code.
--- drivers/gpu/host1x/debug.c | 28 ++++------------------------ 1 file changed, 4 insertions(+), 24 deletions(-)
drivers/gpu/host1x/debug.c +4 -24
@@ -110,7 +110,7 @@ static void show_all(struct host1x *m, struct output *o, bool show_fifo) } } -static int host1x_debug_show_all (struct seq_file *s,void *unused) +static int host1x_debug_all_show (struct seq_file *s,void *unused) {struct output o = { .fn = write_to_seqfile,
@@ -122,6 +122,8 @@ static int host1x_debug_show_all(struct seq_file *s, void *unused)return 0 ; } +DEFINE_SHOW_ATTRIBUTE (host1x_debug_all); +static int host1x_debug_show (struct seq_file *s,void *unused) {struct output o = {
@@ -134,29 +136,7 @@ static int host1x_debug_show(struct seq_file *s, void *unused)return 0 ; } -static int host1x_debug_open_all (struct inode *inode,struct file *file) -{ -return single_open (file, host1x_debug_show_all, inode->i_private); -} - -static const struct file_operations host1x_debug_all_fops = { - .open = host1x_debug_open_all, - .read_iter = seq_read_iter, - .llseek = seq_lseek, - .release = single_release, -}; - -static int host1x_debug_open (struct inode *inode,struct file *file) -{ -return single_open (file, host1x_debug_show, inode->i_private); -} - -static const struct file_operations host1x_debug_fops = { - .open = host1x_debug_open, - .read_iter = seq_read_iter, - .llseek = seq_lseek, - .release = single_release, -}; +DEFINE_SHOW_ATTRIBUTE (host1x_debug);static void host1x_debugfs_init (struct host1x *host1x) {
Signature · 1 line
2.17.1
Quoted 8 lines · Qinglang Miao
From: Yongqiang Liu <[email protected]>
Use
DEFINE_SHOW_ATTRIBUTEmacro to simplify the code.Signed-off-by Yongqiang Liu <[email protected]>--- drivers/gpu/host1x/debug.c | 28 ++++------------------------ 1 file changed, 4 insertions(+), 24 deletions(-)
This doesn't apply. Can you please resend, based on something like linux-next?
Thanks,
Thierry
Quoted 9 lines · Thierry Reding
Quoted 8 lines · Qinglang Miao
From: Yongqiang Liu <[email protected]>
Use
DEFINE_SHOW_ATTRIBUTEmacro to simplify the code.Signed-off-by Yongqiang Liu <[email protected]>--- drivers/gpu/host1x/debug.c | 28 ++++------------------------ 1 file changed, 4 insertions(+), 24 deletions(-)
Quoted 5 lines
This doesn't apply. Can you please resend, based on something like linux-next?
Thanks,
Thierry
Hi, Thierry
Sorry I didn't mention it in commit log, but this patch is based on linux-next where commit <4d4901c6d7> has switched over direct seq_read method calls to seq_read_iter, this is why there's conflict in your apply.
Do you think I should send a new patch based on 5.8rc?
Thanks.
Quoted 16 lines · miaoqinglang
Quoted 9 lines · Thierry Reding
Quoted 8 lines · Qinglang Miao
From: Yongqiang Liu <[email protected]>
Use
DEFINE_SHOW_ATTRIBUTEmacro to simplify the code.Signed-off-by Yongqiang Liu <[email protected]>--- drivers/gpu/host1x/debug.c | 28 ++++------------------------ 1 file changed, 4 insertions(+), 24 deletions(-)Quoted 5 lines
This doesn't apply. Can you please resend, based on something like linux-next?
Thanks,
Thierry
Quoted 7 lines
Hi, Thierry
Sorry I didn't mention it in commit log, but this patch is based on linux-next where commit <
4d4901c6d7> has switched over directseq_readmethod calls toseq_read_iter, this is why there's conflict in your apply.Do you think I should send a new patch based on 5.8rc?
No need to. I'm about to send out the pull request for v5.9-rc1, so I'll just defer this to v5.10 since it doesn't look like it's anything urgent.
Thierry
Quoted 23 lines · Thierry Reding
Quoted 22 lines · miaoqinglang
Quoted 9 lines · Thierry Reding
Quoted 8 lines · Qinglang Miao
From: Yongqiang Liu <[email protected]>
Use
DEFINE_SHOW_ATTRIBUTEmacro to simplify the code.Signed-off-by Yongqiang Liu <[email protected]>--- drivers/gpu/host1x/debug.c | 28 ++++------------------------ 1 file changed, 4 insertions(+), 24 deletions(-)Quoted 5 lines
This doesn't apply. Can you please resend, based on something like linux-next?
Thanks,
ThierryHi, Thierry
Sorry I didn't mention it in commit log, but this patch is based on
linux-next where commit <4d4901c6d7> has switched over directseq_readmethod calls toseq_read_iter, this is why there's conflict in your apply.
Quoted 8 lines
Quoted 1 line
Do you think I should send a new patch based on 5.8rc?
No need to. I'm about to send out the pull request for v5.9-rc1, so I'll just defer this to v5.10 since it doesn't look like it's anything urgent.
Thierry
Hi, Thierry
I've sent a new patch against linux-next(20200917), and can be applied to mainline cleanly now. So I suggest you v2 patch.
Thanks.