Skip to contentSkip to conversation

isym53c8xx_2/sym_malloc: Drop cast

PATCH New Himangi Saraogi 1 participant 1 message Jun 28, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 isym53c8xx_2/sym_malloc: Drop cast

This patch does away with cast on void * and the if as it is unnecessary.

The following Coccinelle semantic patch was used for making the change:

@r@
expression x;
void* e;
type T;
identifier f;
@@

(
*((T *)e)
|
((T *)x)[...]
|
((T *)x)->f
|
- (T *)
e
)

---
To send to: Matthew Wilcox <[email protected]>,"James E.J. Bottomley" <[email protected]>,[email protected],[email protected]

 drivers/scsi/sym53c8xx_2/sym_malloc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/sym53c8xx_2/sym_malloc.c +1 -1
index 6f9af0d..1dde1e9 100644
@@ -95,7 +95,7 @@ static void *___sym_malloc(m_pool_p mp, int size)
 		}
 	}
 #ifdef DEBUG
-	printf("___sym_malloc(%d) = %p\n", size, (void *) a);
+	printf("___sym_malloc(%d) = %p\n", size, a);
 #endif
 	return a;
 }
Signature · 1 line
1.9.1