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/wlags49_h2/wl_priv.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/wlags49_h2/wl_priv.c')
-rw-r--r-- | drivers/staging/wlags49_h2/wl_priv.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/wlags49_h2/wl_priv.c b/drivers/staging/wlags49_h2/wl_priv.c index a67ff529d35..f2bfd3025e9 100644 --- a/drivers/staging/wlags49_h2/wl_priv.c +++ b/drivers/staging/wlags49_h2/wl_priv.c | |||
@@ -618,7 +618,7 @@ int wvlan_uil_put_info( struct uilreq *urq, struct wl_private *lp ) | |||
618 | LTV record, try to allocate it from the kernel stack. | 618 | LTV record, try to allocate it from the kernel stack. |
619 | Otherwise, we just use our local LTV record. */ | 619 | Otherwise, we just use our local LTV record. */ |
620 | if( urq->len > sizeof( lp->ltvRecord )) { | 620 | if( urq->len > sizeof( lp->ltvRecord )) { |
621 | pLtv = (ltv_t *)kmalloc( urq->len, GFP_KERNEL ); | 621 | pLtv = kmalloc(urq->len, GFP_KERNEL); |
622 | if (pLtv != NULL) { | 622 | if (pLtv != NULL) { |
623 | ltvAllocated = TRUE; | 623 | ltvAllocated = TRUE; |
624 | } else { | 624 | } else { |
@@ -1298,7 +1298,7 @@ int wvlan_uil_get_info( struct uilreq *urq, struct wl_private *lp ) | |||
1298 | LTV record, try to allocate it from the kernel stack. | 1298 | LTV record, try to allocate it from the kernel stack. |
1299 | Otherwise, we just use our local LTV record. */ | 1299 | Otherwise, we just use our local LTV record. */ |
1300 | if( urq->len > sizeof( lp->ltvRecord )) { | 1300 | if( urq->len > sizeof( lp->ltvRecord )) { |
1301 | pLtv = (ltv_t *)kmalloc( urq->len, GFP_KERNEL ); | 1301 | pLtv = kmalloc(urq->len, GFP_KERNEL); |
1302 | if (pLtv != NULL) { | 1302 | if (pLtv != NULL) { |
1303 | ltvAllocated = TRUE; | 1303 | ltvAllocated = TRUE; |
1304 | 1304 | ||