[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181202081832.08de39b2@bbrezillon>
Date: Sun, 2 Dec 2018 08:18:32 +0100
From: Boris Brezillon <boris.brezillon@...tlin.com>
To: Yangtao Li <tiny.windzz@...il.com>
Cc: robert.jarzmik@...e.fr, dwmw2@...radead.org,
computersforpeace@...il.com, marek.vasut@...il.com, richard@....at,
miquel.raynal@...tlin.com, keescook@...omium.org,
shreeya.patel23498@...il.com, linux-mtd@...ts.infradead.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] mtd: remove DEBUGFS_RO_ATTR()
On Sat, 1 Dec 2018 20:54:17 -0500
Yangtao Li <tiny.windzz@...il.com> 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@...il.com>
> ---
> 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()?
Powered by blists - more mailing lists