linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fs/debugfs: Convert to DEFINE_SHOW_ATTRIBUTE
@ 2021-04-02 12:11 zuoqilin1
  2021-04-02 12:22 ` Greg KH
  0 siblings, 1 reply; 5+ messages in thread
From: zuoqilin1 @ 2021-04-02 12:11 UTC (permalink / raw)
  To: gregkh, rafael; +Cc: linux-kernel, zuoqilin

From: zuoqilin <zuoqilin@yulong.com>

Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code.

Signed-off-by: zuoqilin <zuoqilin@yulong.com>
---
 fs/debugfs/file.c | 16 +++-------------
 1 file changed, 3 insertions(+), 13 deletions(-)

diff --git a/fs/debugfs/file.c b/fs/debugfs/file.c
index 686e0ad..d670ca3 100644
--- a/fs/debugfs/file.c
+++ b/fs/debugfs/file.c
@@ -1045,7 +1045,7 @@ void debugfs_print_regs32(struct seq_file *s, const struct debugfs_reg32 *regs,
 }
 EXPORT_SYMBOL_GPL(debugfs_print_regs32);
 
-static int debugfs_show_regset32(struct seq_file *s, void *data)
+static int regset32_show(struct seq_file *s, void *data)
 {
 	struct debugfs_regset32 *regset = s->private;
 
@@ -1060,17 +1060,7 @@ static int debugfs_show_regset32(struct seq_file *s, void *data)
 	return 0;
 }
 
-static int debugfs_open_regset32(struct inode *inode, struct file *file)
-{
-	return single_open(file, debugfs_show_regset32, inode->i_private);
-}
-
-static const struct file_operations fops_regset32 = {
-	.open =		debugfs_open_regset32,
-	.read =		seq_read,
-	.llseek =	seq_lseek,
-	.release =	single_release,
-};
+DEFINE_SHOW_ATTRIBUTE(regset32);
 
 /**
  * debugfs_create_regset32 - create a debugfs file that returns register values
@@ -1091,7 +1081,7 @@ void debugfs_create_regset32(const char *name, umode_t mode,
 			     struct dentry *parent,
 			     struct debugfs_regset32 *regset)
 {
-	debugfs_create_file(name, mode, parent, regset, &fops_regset32);
+	debugfs_create_file(name, mode, parent, regset, &regset32_fops);
 }
 EXPORT_SYMBOL_GPL(debugfs_create_regset32);
 
-- 
1.9.1


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

* Re: [PATCH] fs/debugfs: Convert to DEFINE_SHOW_ATTRIBUTE
  2021-04-02 12:11 [PATCH] fs/debugfs: Convert to DEFINE_SHOW_ATTRIBUTE zuoqilin1
@ 2021-04-02 12:22 ` Greg KH
  2021-04-07  2:22   ` Zuo Qi Lin
  0 siblings, 1 reply; 5+ messages in thread
From: Greg KH @ 2021-04-02 12:22 UTC (permalink / raw)
  To: zuoqilin1; +Cc: rafael, linux-kernel, zuoqilin

On Fri, Apr 02, 2021 at 08:11:41PM +0800, zuoqilin1@163.com wrote:
> From: zuoqilin <zuoqilin@yulong.com>

Please use your full/real name.

thanks,

greg k-h

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

* Re: [PATCH] fs/debugfs: Convert to DEFINE_SHOW_ATTRIBUTE
  2021-04-02 12:22 ` Greg KH
@ 2021-04-07  2:22   ` Zuo Qi Lin
  2021-04-07  5:05     ` Greg KH
  0 siblings, 1 reply; 5+ messages in thread
From: Zuo Qi Lin @ 2021-04-07  2:22 UTC (permalink / raw)
  To: Greg KH; +Cc: rafael, linux-kernel, zuoqilin

On Fri, 2 Apr 2021 14:22:24 +0200
Greg KH <gregkh@linuxfoundation.org> wrote:

> On Fri, Apr 02, 2021 at 08:11:41PM +0800, zuoqilin1@163.com wrote:
> > From: zuoqilin <zuoqilin@yulong.com>  
> 
> Please use your full/real name.
> 
> thanks,
> 
> greg k-h

-----------------------------------------------------------
Hi 

My name is Zuo Qilin. I think if the number after my name is causing
you doubts, i am sorry for that, because my name has been registered by
others, so i can only distinguish by adding numbers after my name.

Thanks.
BR.


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

* Re: [PATCH] fs/debugfs: Convert to DEFINE_SHOW_ATTRIBUTE
  2021-04-07  2:22   ` Zuo Qi Lin
@ 2021-04-07  5:05     ` Greg KH
  2021-04-14 13:25       ` Zuo Qi Lin
  0 siblings, 1 reply; 5+ messages in thread
From: Greg KH @ 2021-04-07  5:05 UTC (permalink / raw)
  To: Zuo Qi Lin; +Cc: rafael, linux-kernel, zuoqilin

On Wed, Apr 07, 2021 at 10:22:06AM +0800, Zuo Qi Lin wrote:
> On Fri, 2 Apr 2021 14:22:24 +0200
> Greg KH <gregkh@linuxfoundation.org> wrote:
> 
> > On Fri, Apr 02, 2021 at 08:11:41PM +0800, zuoqilin1@163.com wrote:
> > > From: zuoqilin <zuoqilin@yulong.com>  
> > 
> > Please use your full/real name.
> > 
> > thanks,
> > 
> > greg k-h
> 
> -----------------------------------------------------------
> Hi 
> 
> My name is Zuo Qilin.

Great!  Then use that above :)

Also that name does not match your "From: " name in your email, here
either, so please just get them all the same when sending a patch.

thanks,

greg k-h

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

* Re: [PATCH] fs/debugfs: Convert to DEFINE_SHOW_ATTRIBUTE
  2021-04-07  5:05     ` Greg KH
@ 2021-04-14 13:25       ` Zuo Qi Lin
  0 siblings, 0 replies; 5+ messages in thread
From: Zuo Qi Lin @ 2021-04-14 13:25 UTC (permalink / raw)
  To: Greg KH; +Cc: rafael, linux-kernel, zuoqilin

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=GB18030, Size: 1063 bytes --]

On Wed, 7 Apr 2021 07:05:17 +0200
Greg KH <gregkh@linuxfoundation.org> wrote:

> On Wed, Apr 07, 2021 at 10:22:06AM +0800, Zuo Qi Lin wrote:
> > On Fri, 2 Apr 2021 14:22:24 +0200
> > Greg KH <gregkh@linuxfoundation.org> wrote:
> >   
> > > On Fri, Apr 02, 2021 at 08:11:41PM +0800, zuoqilin1@163.com
> > > wrote:  
> > > > From: zuoqilin <zuoqilin@yulong.com>    
> > > 
> > > Please use your full/real name.
> > > 
> > > thanks,
> > > 
> > > greg k-h  
> > 
> > -----------------------------------------------------------
> > Hi 
> > 
> > My name is Zuo Qilin.  
> 
> Great!  Then use that above :)
> 
> Also that name does not match your "From: " name in your email, here
> either, so please just get them all the same when sending a patch.
> 
> thanks,
> 
> greg k-h

-----------------------------------------------------------
Hi 
  I understand what you mean, i also tried some methods, but when using
git send-email. I still can¡¯t change it to my name, it¡¯s still my email
account. Sorry about this, and accept your rejection of my patch.
Thanks!
BR.





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

end of thread, other threads:[~2021-04-14 13:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-02 12:11 [PATCH] fs/debugfs: Convert to DEFINE_SHOW_ATTRIBUTE zuoqilin1
2021-04-02 12:22 ` Greg KH
2021-04-07  2:22   ` Zuo Qi Lin
2021-04-07  5:05     ` Greg KH
2021-04-14 13:25       ` Zuo Qi Lin

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