staging: vc04_services: vchiq_debugfs_log_entry can be a void *
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 1 Jun 2018 11:10:03 +0000 (13:10 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 1 Jun 2018 18:15:56 +0000 (20:15 +0200)
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>
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_debugfs.c

index f18cd56c3634f076dacf43cdd349c3beccb5c304..2b353d2d25ce5bbc78e258e5cf6248f4848efc86 100644 (file)
@@ -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;
        }
 }