89249ed65a8c9daf9bcf21a1879ff83cbb8387f4
[openwrt/staging/luka.git] /
1 From 866caf8f5ea6d9b5b47d8e4bfad9359a278dc5e7 Mon Sep 17 00:00:00 2001
2 From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 Date: Fri, 1 Jun 2018 13:10:03 +0200
4 Subject: [PATCH 385/454] staging: vc04_services: vchiq_debugfs_log_entry can
5 be a void *
6
7 commit 54f156968a1ca1655a53b4975e91b767552d8008 upstream
8
9 There's no need to set this to be int * when it is only used as a void *.
10 This lets us remove the unneeded cast, and unneeded temporary variable
11 the one place it is referenced in the code.
12
13 Suggested-by: Eric Anholt <eric@anholt.net>
14 Cc: Stefan Wahren <stefan.wahren@i2se.com>
15 Cc: Kees Cook <keescook@chromium.org>
16 Cc: Dan Carpenter <dan.carpenter@oracle.com>
17 Cc: Arnd Bergmann <arnd@arndb.de>
18 Cc: Keerthi Reddy <keerthigd4990@gmail.com>
19 Cc: linux-rpi-kernel@lists.infradead.org
20 Cc: linux-arm-kernel@lists.infradead.org
21 Reviewed-by: Eric Anholt <eric@anholt.net>
22 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
23 ---
24 .../vc04_services/interface/vchiq_arm/vchiq_debugfs.c | 8 ++++----
25 1 file changed, 4 insertions(+), 4 deletions(-)
26
27 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_debugfs.c
28 +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_debugfs.c
29 @@ -59,7 +59,7 @@ struct dentry *vchiq_dbg_clients;
30 /* Log category debugfs entries */
31 struct vchiq_debugfs_log_entry {
32 const char *name;
33 - int *plevel;
34 + void *plevel;
35 struct dentry *dir;
36 };
37
38 @@ -154,10 +154,10 @@ static void vchiq_debugfs_create_log_ent
39 dir = debugfs_create_dir("log", vchiq_dbg_dir);
40
41 for (i = 0; i < n_log_entries; i++) {
42 - void *levp = (void *)vchiq_debugfs_log_entries[i].plevel;
43 -
44 dir = debugfs_create_file(vchiq_debugfs_log_entries[i].name,
45 - 0644, dir, levp, &debugfs_log_fops);
46 + 0644, dir,
47 + vchiq_debugfs_log_entries[i].plevel,
48 + &debugfs_log_fops);
49 vchiq_debugfs_log_entries[i].dir = dir;
50 }
51 }