]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
staging: lustre: ptlrpc: sec_bulk: Remove useless cast on void pointer
authorAmitoj Kaur Chawla <amitoj1606@gmail.com>
Wed, 14 Oct 2015 18:41:37 +0000 (00:11 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 17 Oct 2015 05:22:26 +0000 (22:22 -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/ptlrpc/sec_bulk.c

index 8fce717ea79eff8b36ac43f4974cfaf0b2303853..cd8a9987f7ac9706901664bc207b4270663bc0d9 100644 (file)
@@ -540,8 +540,7 @@ int sptlrpc_get_bulk_checksum(struct ptlrpc_bulk_desc *desc, __u8 alg,
                memcpy(buf, hashbuf, buflen);
        } else {
                bufsize = buflen;
-               err = cfs_crypto_hash_final(hdesc, (unsigned char *)buf,
-                                           &bufsize);
+               err = cfs_crypto_hash_final(hdesc, buf, &bufsize);
        }
 
        if (err)