linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] gpu: host1x: Convert to DEFINE_SHOW_ATTRIBUTE
@ 2020-07-16  9:03 Qinglang Miao
  2020-07-16 13:34 ` Thierry Reding
  0 siblings, 1 reply; 5+ messages in thread
From: Qinglang Miao @ 2020-07-16  9:03 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Thierry Reding; +Cc: dri-devel, linux-tegra, linux-kernel

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(-)

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)
 {
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH -next] gpu: host1x: Convert to DEFINE_SHOW_ATTRIBUTE
  2020-07-16  9:03 [PATCH -next] gpu: host1x: Convert to DEFINE_SHOW_ATTRIBUTE Qinglang Miao
@ 2020-07-16 13:34 ` Thierry Reding
  2020-07-17  1:32   ` miaoqinglang
  0 siblings, 1 reply; 5+ messages in thread
From: Thierry Reding @ 2020-07-16 13:34 UTC (permalink / raw)
  To: Qinglang Miao; +Cc: Greg Kroah-Hartman, dri-devel, linux-tegra, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 468 bytes --]

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH -next] gpu: host1x: Convert to DEFINE_SHOW_ATTRIBUTE
  2020-07-16 13:34 ` Thierry Reding
@ 2020-07-17  1:32   ` miaoqinglang
  2020-07-17 14:25     ` Thierry Reding
  0 siblings, 1 reply; 5+ messages in thread
From: miaoqinglang @ 2020-07-17  1:32 UTC (permalink / raw)
  To: Thierry Reding; +Cc: Greg Kroah-Hartman, dri-devel, linux-tegra, linux-kernel


在 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.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH -next] gpu: host1x: Convert to DEFINE_SHOW_ATTRIBUTE
  2020-07-17  1:32   ` miaoqinglang
@ 2020-07-17 14:25     ` Thierry Reding
  2020-09-17 12:41       ` miaoqinglang
  0 siblings, 1 reply; 5+ messages in thread
From: Thierry Reding @ 2020-07-17 14:25 UTC (permalink / raw)
  To: miaoqinglang; +Cc: Greg Kroah-Hartman, dri-devel, linux-tegra, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1115 bytes --]

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH -next] gpu: host1x: Convert to DEFINE_SHOW_ATTRIBUTE
  2020-07-17 14:25     ` Thierry Reding
@ 2020-09-17 12:41       ` miaoqinglang
  0 siblings, 0 replies; 5+ messages in thread
From: miaoqinglang @ 2020-09-17 12:41 UTC (permalink / raw)
  To: Thierry Reding; +Cc: Greg Kroah-Hartman, dri-devel, linux-tegra, linux-kernel



在 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.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-09-17 12:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-16  9:03 [PATCH -next] gpu: host1x: Convert to DEFINE_SHOW_ATTRIBUTE Qinglang Miao
2020-07-16 13:34 ` Thierry Reding
2020-07-17  1:32   ` miaoqinglang
2020-07-17 14:25     ` Thierry Reding
2020-09-17 12:41       ` miaoqinglang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).