[PATCH 5/6] staging: vc04_services: vchiq_debugfs_log_entry can be a void *

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
Cc: Stefan Wahren <stefan.wahren@xxxxxxxx>
Cc: Kees Cook <keescook@xxxxxxxxxxxx>
Cc: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
Cc: Arnd Bergmann <arnd@xxxxxxxx>
Cc: Keerthi Reddy <keerthigd4990@xxxxxxxxx>
Cc: linux-rpi-kernel@xxxxxxxxxxxxxxxxxxx
Cc: linux-arm-kernel@xxxxxxxxxxxxxxxxxxx
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 .../vc04_services/interface/vchiq_arm/vchiq_debugfs.c     | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_debugfs.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_debugfs.c
index f18cd56c3634..2b353d2d25ce 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_debugfs.c
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_debugfs.c
@@ -58,7 +58,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;
 };
 
@@ -153,10 +153,10 @@ static void vchiq_debugfs_create_log_entries(struct dentry *top)
 	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;
 	}
 }
-- 
2.17.1

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux