All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: rts5208: rtsx_transport.c: Drop void pointer cast
@ 2016-02-25 19:42 Janani Ravichandran
  0 siblings, 0 replies; only message in thread
From: Janani Ravichandran @ 2016-02-25 19:42 UTC (permalink / raw)
  To: outreachy-kernel

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>
---
 drivers/staging/rts5208/rtsx_transport.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rts5208/rtsx_transport.c b/drivers/staging/rts5208/rtsx_transport.c
index f564a74..e055094 100644
--- a/drivers/staging/rts5208/rtsx_transport.c
+++ b/drivers/staging/rts5208/rtsx_transport.c
@@ -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,
-- 
2.5.0



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2016-02-25 14:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-25 19:42 [PATCH] staging: rts5208: rtsx_transport.c: Drop void pointer cast Janani Ravichandran

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.