Skip to content

Commit

Permalink
staging: vc04_services: vchiq_debugfs_log_entry can be a void *
Browse files Browse the repository at this point in the history
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 <[email protected]>
Cc: Stefan Wahren <[email protected]>
Cc: Kees Cook <[email protected]>
Cc: Dan Carpenter <[email protected]>
Cc: Arnd Bergmann <[email protected]>
Cc: Keerthi Reddy <[email protected]>
Cc: [email protected]
Cc: [email protected]
Reviewed-by: Eric Anholt <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
gregkh committed Jun 1, 2018
1 parent 127892f commit 54f1569
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};

Expand Down Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 54f1569

Please sign in to comment.