Void pointers need not be cast to other pointer types.
Semantic patch used:
@r@
expression x;
void *e;
type T;
identifier f;
@@
(
*((T *)e)
|
((T *)x) [...]
|
((T *)x)->f
|
- (T *)
e
)
Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
return -EIO;
if (use_sg) {
- struct scatterlist *sg = (struct scatterlist *)buf;
+ struct scatterlist *sg = buf;
err = rtsx_transfer_sglist_adma_partial(chip, card, sg, use_sg,
index, offset, (int)len,