* [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 [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, back to index
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
Linux-WPAN Archive on lore.kernel.org
Archives are clonable:
git clone --mirror https://lore.kernel.org/linux-wpan/0 linux-wpan/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 linux-wpan linux-wpan/ https://lore.kernel.org/linux-wpan \
linux-wpan@vger.kernel.org
public-inbox-index linux-wpan
Example config snippet for mirrors
Newsgroup available over NNTP:
nntp://nntp.lore.kernel.org/org.kernel.vger.linux-wpan
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git