aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm2708/patches-4.14/950-0385-staging-vc04_services-vchiq_debugfs_log_entry-can-be.patch
blob: 89249ed65a8c9daf9bcf21a1879ff83cbb8387f4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
From 866caf8f5ea6d9b5b47d8e4bfad9359a278dc5e7 Mon Sep 17 00:00:00 2001
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date: Fri, 1 Jun 2018 13:10:03 +0200
Subject: [PATCH 385/454] staging: vc04_services: vchiq_debugfs_log_entry can
 be a void *

commit 54f156968a1ca1655a53b4975e91b767552d8008 upstream

There's no need to set this to be int * when it is only used as a void *.
This lets us remove the unneeded cast, and unneeded temporary variable
the one place it is referenced in the code.

Suggested-by: Eric Anholt <eric@anholt.net>
Cc: Stefan Wahren <stefan.wahren@i2se.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Keerthi Reddy <keerthigd4990@gmail.com>
Cc: linux-rpi-kernel@lists.infradead.org
Cc: linux-arm-kernel@lists.infradead.org
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 .../vc04_services/interface/vchiq_arm/vchiq_debugfs.c     | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_debugfs.c
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_debugfs.c
@@ -59,7 +59,7 @@ struct dentry *vchiq_dbg_clients;
 /* Log category debugfs entries */
 struct vchiq_debugfs_log_entry {
 	const char *name;
-	int *plevel;
+	void *plevel;
 	struct dentry *dir;
 };
 
@@ -154,10 +154,10 @@ static void vchiq_debugfs_create_log_ent
 	dir = debugfs_create_dir("log", vchiq_dbg_dir);
 
 	for (i = 0; i < n_log_entries; i++) {
-		void *levp = (void *)vchiq_debugfs_log_entries[i].plevel;
-
 		dir = debugfs_create_file(vchiq_debugfs_log_entries[i].name,
-					  0644, dir, levp, &debugfs_log_fops);
+					  0644, dir,
+					  vchiq_debugfs_log_entries[i].plevel,
+					  &debugfs_log_fops);
 		vchiq_debugfs_log_entries[i].dir = dir;
 	}
 }