diff options
author | Julia Lawall <julia@diku.dk> | 2010-05-11 14:26:57 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-05-11 19:06:48 -0400 |
commit | 324148788bf3744d90fb6894ec5744eb0ca91b74 (patch) | |
tree | bb6a978e2c0ee43fd1588a898e9277f619b31c91 /drivers/staging/et131x/et1310_tx.c | |
parent | a05d08c40c0775e4691cffcfbfceeb4270987208 (diff) |
Staging: Drop memory allocation cast
Drop cast on the result of kmalloc and similar functions.
The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@@
type T;
@@
- (T *)
(\(kmalloc\|kzalloc\|kcalloc\|kmem_cache_alloc\|kmem_cache_zalloc\|
kmem_cache_alloc_node\|kmalloc_node\|kzalloc_node\)(...))
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/et131x/et1310_tx.c')
-rw-r--r-- | drivers/staging/et131x/et1310_tx.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/et131x/et1310_tx.c b/drivers/staging/et131x/et1310_tx.c index b6ff20f47de..0f3473d758e 100644 --- a/drivers/staging/et131x/et1310_tx.c +++ b/drivers/staging/et131x/et1310_tx.c | |||
@@ -112,7 +112,7 @@ int et131x_tx_dma_memory_alloc(struct et131x_adapter *adapter) | |||
112 | struct tx_ring *tx_ring = &adapter->tx_ring; | 112 | struct tx_ring *tx_ring = &adapter->tx_ring; |
113 | 113 | ||
114 | /* Allocate memory for the TCB's (Transmit Control Block) */ | 114 | /* Allocate memory for the TCB's (Transmit Control Block) */ |
115 | adapter->tx_ring.tcb_ring = (struct tcb *) | 115 | adapter->tx_ring.tcb_ring = |
116 | kcalloc(NUM_TCB, sizeof(struct tcb), GFP_ATOMIC | GFP_DMA); | 116 | kcalloc(NUM_TCB, sizeof(struct tcb), GFP_ATOMIC | GFP_DMA); |
117 | if (!adapter->tx_ring.tcb_ring) { | 117 | if (!adapter->tx_ring.tcb_ring) { |
118 | dev_err(&adapter->pdev->dev, "Cannot alloc memory for TCBs\n"); | 118 | dev_err(&adapter->pdev->dev, "Cannot alloc memory for TCBs\n"); |