staging: lustre: llite: Remove useless cast on void pointer
authorAmitoj Kaur Chawla <amitoj1606@gmail.com>
Tue, 13 Oct 2015 13:21:10 +0000 (18:51 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 13 Oct 2015 17:09:15 +0000 (10:09 -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/xattr.c

index e051dcc82efee7459d3353b060080d6bd419b378..4b7eb33f7d0172d8f8c716c309e98b7fdce19b1a 100644 (file)
@@ -519,7 +519,7 @@ ssize_t ll_getxattr(struct dentry *dentry, const char *name,
                        goto out;
                }
 
-               lump = (struct lov_user_md *)buffer;
+               lump = buffer;
                memcpy(lump, lmm, lmmsize);
                /* do not return layout gen for getxattr otherwise it would
                 * confuse tar --xattr by recognizing layout gen as stripe