mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "tip-bot2 for Qinglang Miao" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Qinglang Miao <miaoqinglang@huawei.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	hch@lst.de, x86 <x86@kernel.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: [tip: core/debugobjects] debugobjects: Convert to DEFINE_SHOW_ATTRIBUTE
Date: Fri, 17 Jul 2020 21:29:16 -0000	[thread overview]
Message-ID: <159502135671.4006.15025741825906317468.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20200716084747.8034-1-miaoqinglang@huawei.com>

The following commit has been merged into the core/debugobjects branch of tip:

Commit-ID:     0f85c4805184765ff35e0079b3241ee8f25d1b2b
Gitweb:        https://git.kernel.org/tip/0f85c4805184765ff35e0079b3241ee8f25d1b2b
Author:        Qinglang Miao <miaoqinglang@huawei.com>
AuthorDate:    Thu, 16 Jul 2020 16:47:47 +08:00
Committer:     Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Fri, 17 Jul 2020 23:25:46 +02:00

debugobjects: Convert to DEFINE_SHOW_ATTRIBUTE

Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code.

[ tglx: Distangled it from the mess in -next ]

Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: hch@lst.de
Link: https://lkml.kernel.org/r/20200716084747.8034-1-miaoqinglang@huawei.com

---
 lib/debugobjects.c | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/lib/debugobjects.c b/lib/debugobjects.c
index 48054db..fe45579 100644
--- a/lib/debugobjects.c
+++ b/lib/debugobjects.c
@@ -1022,18 +1022,7 @@ static int debug_stats_show(struct seq_file *m, void *v)
 	seq_printf(m, "objs_freed    :%d\n", debug_objects_freed);
 	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		= seq_read,
-	.llseek		= seq_lseek,
-	.release	= single_release,
-};
+DEFINE_SHOW_ATTRIBUTE(debug_stats);
 
 static int __init debug_objects_init_debugfs(void)
 {

      parent reply	other threads:[~2020-07-17 21:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-16  8:47 [PATCH -next] " Qinglang Miao
2020-07-17 20:26 ` Thomas Gleixner
2020-07-20  2:18   ` miaoqinglang
2020-07-17 21:29 ` tip-bot2 for Qinglang Miao [this message]

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=159502135671.4006.15025741825906317468.tip-bot2@tip-bot2 \
    --to=tip-bot2@linutronix.de \
    --cc=hch@lst.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=miaoqinglang@huawei.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /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®