* [PATCH] 6lowpan: convert to DEFINE_SHOW_ATTRIBUTE
@ 2018-12-15 7:22 Yangtao Li
2018-12-18 23:49 ` Marcel Holtmann
0 siblings, 1 reply; 2+ messages in thread
From: Yangtao Li @ 2018-12-15 7:22 UTC (permalink / raw)
To: alex.aring, jukka.rissanen, davem
Cc: linux-bluetooth, linux-wpan, netdev, linux-kernel, Yangtao Li
Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code.
Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
---
net/6lowpan/debugfs.c | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/net/6lowpan/debugfs.c b/net/6lowpan/debugfs.c
index 24915e0bb9ea..6c152f9ea26e 100644
--- a/net/6lowpan/debugfs.c
+++ b/net/6lowpan/debugfs.c
@@ -232,18 +232,7 @@ static int lowpan_context_show(struct seq_file *file, void *offset)
return 0;
}
-
-static int lowpan_context_open(struct inode *inode, struct file *file)
-{
- return single_open(file, lowpan_context_show, inode->i_private);
-}
-
-static const struct file_operations lowpan_context_fops = {
- .open = lowpan_context_open,
- .read = seq_read,
- .llseek = seq_lseek,
- .release = single_release,
-};
+DEFINE_SHOW_ATTRIBUTE(lowpan_context);
static int lowpan_short_addr_get(void *data, u64 *val)
{
--
2.17.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] 6lowpan: convert to DEFINE_SHOW_ATTRIBUTE
2018-12-15 7:22 [PATCH] 6lowpan: convert to DEFINE_SHOW_ATTRIBUTE Yangtao Li
@ 2018-12-18 23:49 ` Marcel Holtmann
0 siblings, 0 replies; 2+ messages in thread
From: Marcel Holtmann @ 2018-12-18 23:49 UTC (permalink / raw)
To: Yangtao Li
Cc: Alexander Aring, Jukka Rissanen, David S. Miller,
linux-bluetooth, linux-wpan, netdev, linux-kernel
Hi Yangtao,
> Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code.
>
> Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
> ---
> net/6lowpan/debugfs.c | 13 +------------
> 1 file changed, 1 insertion(+), 12 deletions(-)
patch has been applied to bluetooth-next tree.
Regards
Marcel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-12-18 23:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-15 7:22 [PATCH] 6lowpan: convert to DEFINE_SHOW_ATTRIBUTE Yangtao Li
2018-12-18 23:49 ` Marcel Holtmann
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).