OSDN Git Service

staging: lustre: llite: Remove useless cast on void pointer
authorAmitoj Kaur Chawla <amitoj1606@gmail.com>
Mon, 12 Oct 2015 21:43:02 +0000 (03:13 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 12 Oct 2015 23:45:21 +0000 (16:45 -0700)
The semantic patch used to find this is:

@r@
expression x;
void* e;
type T;
identifier f;
@@

(
  *((T *)e)
|
  ((T *)x)[...]
|
  ((T *)x)->f
|
- (T *)
  e
)

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/llite/statahead.c

index c860281..18f5f2b 100644 (file)
@@ -947,7 +947,7 @@ static void ll_statahead_one(struct dentry *parent, const char *entry_name,
 
 static int ll_agl_thread(void *arg)
 {
-       struct dentry       *parent = (struct dentry *)arg;
+       struct dentry       *parent = arg;
        struct inode         *dir    = d_inode(parent);
        struct ll_inode_info     *plli   = ll_i2info(dir);
        struct ll_inode_info     *clli;
@@ -1038,7 +1038,7 @@ static void ll_start_agl(struct dentry *parent, struct ll_statahead_info *sai)
 
 static int ll_statahead_thread(void *arg)
 {
-       struct dentry       *parent = (struct dentry *)arg;
+       struct dentry       *parent = arg;
        struct inode         *dir    = d_inode(parent);
        struct ll_inode_info     *plli   = ll_i2info(dir);
        struct ll_inode_info     *clli;