Skip to contentSkip to conversation

staging: rts5208: rtsx_transport.c: Drop void pointer cast

PATCH New Janani Ravichandran 1 participant 1 message Feb 25, 2016 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: rts5208: rtsx_transport.c: Drop void pointer cast

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
)

---
 drivers/staging/rts5208/rtsx_transport.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rts5208/rtsx_transport.c +1 -1
index f564a74..e055094 100644
@@ -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,
Signature · 1 line
2.5.0