diff options
author | Julia Lawall <julia@diku.dk> | 2010-05-11 20:26:57 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-05-11 16:06:48 -0700 |
commit | 324148788bf3744d90fb6894ec5744eb0ca91b74 (patch) | |
tree | bb6a978e2c0ee43fd1588a898e9277f619b31c91 /drivers/staging/et131x/et1310_tx.c | |
parent | Staging: wlan-ng: Fixed non static functions in prism2fw.c (diff) | |
download | linux-dev-324148788bf3744d90fb6894ec5744eb0ca91b74.tar.xz linux-dev-324148788bf3744d90fb6894ec5744eb0ca91b74.zip |
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 b6ff20f47de4..0f3473d758e4 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) struct tx_ring *tx_ring = &adapter->tx_ring; /* Allocate memory for the TCB's (Transmit Control Block) */ - adapter->tx_ring.tcb_ring = (struct tcb *) + adapter->tx_ring.tcb_ring = kcalloc(NUM_TCB, sizeof(struct tcb), GFP_ATOMIC | GFP_DMA); if (!adapter->tx_ring.tcb_ring) { dev_err(&adapter->pdev->dev, "Cannot alloc memory for TCBs\n"); |