]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging: rts5208: rtsx_transport.c: Drop void pointer cast
authorJanani Ravichandran <janani.rvchndrn@gmail.com>
Thu, 25 Feb 2016 19:42:24 +0000 (14:42 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 12 Mar 2016 06:09:09 +0000 (22:09 -0800)
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>
drivers/staging/rts5208/rtsx_transport.c

index 914bb393b53a832e67dc572510139d7e3a7421b4..4d8e7c5c26d55c4afcdd3cd45f357901f3093895 100644 (file)
@@ -734,7 +734,7 @@ int rtsx_transfer_data_partial(struct rtsx_chip *chip, u8 card,
                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,