diff mbox series

[-next] gpu: host1x: Convert to DEFINE_SHOW_ATTRIBUTE

Message ID 20200716090323.13274-1-miaoqinglang@huawei.com
State Changes Requested
Headers show
Series [-next] gpu: host1x: Convert to DEFINE_SHOW_ATTRIBUTE | expand

Commit Message

Qinglang Miao July 16, 2020, 9:03 a.m. UTC
From: Yongqiang Liu <liuyongqiang13@huawei.com>

Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code.

Signed-off-by: Yongqiang Liu <liuyongqiang13@huawei.com>
---
 drivers/gpu/host1x/debug.c | 28 ++++------------------------
 1 file changed, 4 insertions(+), 24 deletions(-)

Comments

Thierry Reding July 16, 2020, 1:34 p.m. UTC | #1
On Thu, Jul 16, 2020 at 05:03:23PM +0800, Qinglang Miao wrote:
> From: Yongqiang Liu <liuyongqiang13@huawei.com>
> 
> Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code.
> 
> Signed-off-by: Yongqiang Liu <liuyongqiang13@huawei.com>
> ---
>  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
Qinglang Miao July 17, 2020, 1:32 a.m. UTC | #2
在 2020/7/16 21:34, Thierry Reding 写道:
> On Thu, Jul 16, 2020 at 05:03:23PM +0800, Qinglang Miao wrote:
>> From: Yongqiang Liu <liuyongqiang13@huawei.com>
>>
>> Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code.
>>
>> Signed-off-by: Yongqiang Liu <liuyongqiang13@huawei.com>
>> ---
>>   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
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.
Thierry Reding July 17, 2020, 2:25 p.m. UTC | #3
On Fri, Jul 17, 2020 at 09:32:21AM +0800, miaoqinglang wrote:
> 
> 在 2020/7/16 21:34, Thierry Reding 写道:
> > On Thu, Jul 16, 2020 at 05:03:23PM +0800, Qinglang Miao wrote:
> > > From: Yongqiang Liu <liuyongqiang13@huawei.com>
> > > 
> > > Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code.
> > > 
> > > Signed-off-by: Yongqiang Liu <liuyongqiang13@huawei.com>
> > > ---
> > >   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
> 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?

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
Qinglang Miao Sept. 17, 2020, 12:41 p.m. UTC | #4
在 2020/7/17 22:25, Thierry Reding 写道:
> On Fri, Jul 17, 2020 at 09:32:21AM +0800, miaoqinglang wrote:
>>
>> 在 2020/7/16 21:34, Thierry Reding 写道:
>>> On Thu, Jul 16, 2020 at 05:03:23PM +0800, Qinglang Miao wrote:
>>>> From: Yongqiang Liu <liuyongqiang13@huawei.com>
>>>>
>>>> Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code.
>>>>
>>>> Signed-off-by: Yongqiang Liu <liuyongqiang13@huawei.com>
>>>> ---
>>>>    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
>> 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?
> 
> 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.
diff mbox series

Patch

diff --git a/drivers/gpu/host1x/debug.c b/drivers/gpu/host1x/debug.c
index 545fc0afb..1688e98c4 100644
--- a/drivers/gpu/host1x/debug.c
+++ b/drivers/gpu/host1x/debug.c
@@ -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)
 {