From: Thomas Gleixner <tglx@linutronix.de>
To: Qinglang Miao <miaoqinglang@huawei.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Marco Elver <elver@google.com>, Qian Cai <cai@lca.pw>
Cc: linux-kernel@vger.kernel.org, Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCH -next] debugobjects: Convert to DEFINE_SHOW_ATTRIBUTE
Date: Fri, 17 Jul 2020 22:26:24 +0200 [thread overview]
Message-ID: <87h7u5riq7.fsf@nanos.tec.linutronix.de> (raw)
In-Reply-To: <20200716084747.8034-1-miaoqinglang@huawei.com>
Qinglang Miao <miaoqinglang@huawei.com> writes:
> Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code.
>
> Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
> ---
> lib/debugobjects.c | 12 +-----------
> 1 file changed, 1 insertion(+), 11 deletions(-)
>
> diff --git a/lib/debugobjects.c b/lib/debugobjects.c
> index 5d2bbfc55..916a5c492 100644
> --- a/lib/debugobjects.c
> +++ b/lib/debugobjects.c
> @@ -1023,17 +1023,7 @@ static int debug_stats_show(struct seq_file *m, void *v)
> return 0;
> }
>
> -static int debug_stats_open(struct inode *inode, struct file *filp)
> -{
> - return single_open(filp, debug_stats_show, NULL);
> -}
> -
> -static const struct file_operations debug_stats_fops = {
> - .open = debug_stats_open,
> - .read_iter = seq_read_iter,
This does not apply against mainline, so I assume this malformatted
thing comes from Christophs seq_read_iter changes in -next.
The seq_read_iter here makes no sense whatsoever if the same thing can
be achieved by using
> +DEFINE_SHOW_ATTRIBUTE(debug_stats);
and fixing it at the generic level.
Thanks,
tglx
next prev parent reply other threads:[~2020-07-17 20:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-16 8:47 Qinglang Miao
2020-07-17 20:26 ` Thomas Gleixner [this message]
2020-07-20 2:18 ` miaoqinglang
2020-07-17 21:29 ` [tip: core/debugobjects] " tip-bot2 for Qinglang Miao
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87h7u5riq7.fsf@nanos.tec.linutronix.de \
--to=tglx@linutronix.de \
--cc=cai@lca.pw \
--cc=elver@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=hch@lst.de \
--cc=linux-kernel@vger.kernel.org \
--cc=miaoqinglang@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®