1 From 217f7a22c049f2ccc24d2080cf7369f39fe3b6c5 Mon Sep 17 00:00:00 2001
2 From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 Date: Fri, 1 Jun 2018 13:10:01 +0200
4 Subject: [PATCH 383/454] staging: vc04_services: move client dbg directory
7 commit 24e8d3fc42f25936ff270e404847a3a462c38468 upstream
9 This does not need to be part of a wrapper function, or in a structure,
10 just properly reference it directly as a single variable.
12 The whole variable will be going away soon anyway, this is just a step
13 toward that direction.
15 Suggested-by: Eric Anholt <eric@anholt.net>
16 Cc: Stefan Wahren <stefan.wahren@i2se.com>
17 Cc: Kees Cook <keescook@chromium.org>
18 Cc: Dan Carpenter <dan.carpenter@oracle.com>
19 Cc: Arnd Bergmann <arnd@arndb.de>
20 Cc: Keerthi Reddy <keerthigd4990@gmail.com>
21 Cc: linux-rpi-kernel@lists.infradead.org
22 Cc: linux-arm-kernel@lists.infradead.org
23 Reviewed-by: Eric Anholt <eric@anholt.net>
24 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
26 .../interface/vchiq_arm/vchiq_debugfs.c | 18 ++++--------------
27 1 file changed, 4 insertions(+), 14 deletions(-)
29 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_debugfs.c
30 +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_debugfs.c
33 /* Top-level debug info */
34 struct vchiq_debugfs_info {
35 - /* one entry per client process */
36 - struct dentry *clients;
39 struct dentry *log_categories;
42 static struct vchiq_debugfs_info debugfs_info;
44 -/* Global 'vchiq' debugfs entry used by all instances */
45 +/* Global 'vchiq' debugfs and clients entry used by all instances */
46 struct dentry *vchiq_dbg_dir;
47 +struct dentry *vchiq_dbg_clients;
49 /* Log category debugfs entries */
50 struct vchiq_debugfs_log_entry {
51 @@ -83,8 +81,6 @@ static struct vchiq_debugfs_log_entry vc
53 static int n_log_entries = ARRAY_SIZE(vchiq_debugfs_log_entries);
55 -static struct dentry *vchiq_clients_top(void);
57 static int debugfs_log_show(struct seq_file *f, void *offset)
59 int *levp = f->private;
60 @@ -264,12 +260,11 @@ void vchiq_debugfs_add_instance(VCHIQ_IN
64 - struct dentry *clients = vchiq_clients_top();
66 snprintf(pidstr, sizeof(pidstr), "%d",
67 vchiq_instance_get_pid(instance));
69 - top = debugfs_create_dir(pidstr, clients);
70 + top = debugfs_create_dir(pidstr, vchiq_dbg_clients);
72 debugfs_create_file("use_count", 0444, top, instance,
73 &debugfs_usecount_fops);
74 @@ -288,7 +283,7 @@ void vchiq_debugfs_remove_instance(VCHIQ
75 void vchiq_debugfs_init(void)
77 vchiq_dbg_dir = debugfs_create_dir("vchiq", NULL);
78 - debugfs_info.clients = debugfs_create_dir("clients", vchiq_dbg_dir);
79 + vchiq_dbg_clients = debugfs_create_dir("clients", vchiq_dbg_dir);
81 vchiq_debugfs_create_log_entries(vchiq_dbg_dir);
83 @@ -299,11 +294,6 @@ void vchiq_debugfs_deinit(void)
84 debugfs_remove_recursive(vchiq_dbg_dir);
87 -static struct dentry *vchiq_clients_top(void)
89 - return debugfs_info.clients;
92 #else /* CONFIG_DEBUG_FS */
94 void vchiq_debugfs_init(void)