public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] isym53c8xx_2/sym_malloc: Drop cast
@ 2014-06-28 13:29 Himangi Saraogi
  0 siblings, 0 replies; only message in thread
From: Himangi Saraogi @ 2014-06-28 13:29 UTC (permalink / raw)
  To: Matthew Wilcox, James E.J. Bottomley, linux-scsi, linux-kernel
  Cc: julia.lawall

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
)

Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
---
To send to: Matthew Wilcox <matthew@wil.cx>,"James E.J. Bottomley" <JBottomley@parallels.com>,linux-scsi@vger.kernel.org,linux-kernel@vger.kernel.org
 drivers/scsi/sym53c8xx_2/sym_malloc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/sym53c8xx_2/sym_malloc.c b/drivers/scsi/sym53c8xx_2/sym_malloc.c
index 6f9af0d..1dde1e9 100644
--- a/drivers/scsi/sym53c8xx_2/sym_malloc.c
+++ b/drivers/scsi/sym53c8xx_2/sym_malloc.c
@@ -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;
 }
-- 
1.9.1

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

only message in thread, other threads:[~2014-06-28 13:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-28 13:29 [PATCH] isym53c8xx_2/sym_malloc: Drop cast Himangi Saraogi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox