Re: [PATCH v2] mtd: remove DEBUGFS_RO_ATTR()

From: Frank Lee
Date: Sun Dec 02 2018 - 02:34:22 EST


On Sun, Dec 2, 2018 at 3:18 PM Boris Brezillon
<boris.brezillon@xxxxxxxxxxx> wrote:
>
> On Sat, 1 Dec 2018 20:54:17 -0500
> Yangtao Li <tiny.windzz@xxxxxxxxx> wrote:
>
> > We already have the DEFINE_SHOW_ATTRIBUTE.There is no need to define
> > such a macro,so remove DEBUGFS_RO_ATTR.Also use DEFINE_SHOW_ATTRIBUTE
> > to simplify some code.
> >
> > Signed-off-by: Yangtao Li <tiny.windzz@xxxxxxxxx>
> > ---
> > Changes in v2:
> > -Remove a missing DEBUGFS_RO_ATTR
> > ---
> > drivers/mtd/devices/docg3.c | 20 ++++++++++++--------
> > drivers/mtd/devices/docg3.h | 11 -----------
> > drivers/mtd/mtdswap.c | 12 +-----------
> > drivers/mtd/nand/raw/nandsim.c | 16 +++-------------
> > 4 files changed, 16 insertions(+), 43 deletions(-)
> >
> > diff --git a/drivers/mtd/devices/docg3.c b/drivers/mtd/devices/docg3.c
> > index 512bd4c2eec0..80143972963e 100644
> > --- a/drivers/mtd/devices/docg3.c
> > +++ b/drivers/mtd/devices/docg3.c
> > @@ -1603,7 +1603,7 @@ static void doc_unregister_sysfs(struct platform_device *pdev,
> > /*
> > * Debug sysfs entries
> > */
> > -static int dbg_flashctrl_show(struct seq_file *s, void *p)
> > +static int flashcontrol_show(struct seq_file *s, void *p)
> > {
> > struct docg3 *docg3 = (struct docg3 *)s->private;
> >
> > @@ -1623,9 +1623,10 @@ static int dbg_flashctrl_show(struct seq_file *s, void *p)
> >
> > return 0;
> > }
> > -DEBUGFS_RO_ATTR(flashcontrol, dbg_flashctrl_show);
> >
> > -static int dbg_asicmode_show(struct seq_file *s, void *p)
> > +DEFINE_SHOW_ATTRIBUTE(flashcontrol);
>
> Just nitpicking, but can you remove the blank line between the function
> definition and DEFINE_SHOW_ATTRIBUTE()?
The third edition has been sent, can you review it?

Yours,
Yangtao