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/vt6656 | |
parent | a05d08c40c0775e4691cffcfbfceeb4270987208 (diff) | |
download | kernel_samsung_smdk4412-324148788bf3744d90fb6894ec5744eb0ca91b74.zip kernel_samsung_smdk4412-324148788bf3744d90fb6894ec5744eb0ca91b74.tar.gz kernel_samsung_smdk4412-324148788bf3744d90fb6894ec5744eb0ca91b74.tar.bz2 |
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/vt6656')
-rw-r--r-- | drivers/staging/vt6656/hostap.c | 4 | ||||
-rw-r--r-- | drivers/staging/vt6656/main_usb.c | 2 | ||||
-rw-r--r-- | drivers/staging/vt6656/wpactl.c | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/drivers/staging/vt6656/hostap.c b/drivers/staging/vt6656/hostap.c index ca007c3..4438631 100644 --- a/drivers/staging/vt6656/hostap.c +++ b/drivers/staging/vt6656/hostap.c @@ -91,7 +91,7 @@ static int hostap_enable_hostapd(PSDevice pDevice, int rtnl_locked) DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "%s: Enabling hostapd mode\n", dev->name); - pDevice->apdev = (struct net_device *)kmalloc(sizeof(struct net_device), GFP_KERNEL); + pDevice->apdev = kmalloc(sizeof(struct net_device), GFP_KERNEL); if (pDevice->apdev == NULL) return -ENOMEM; memset(pDevice->apdev, 0, sizeof(struct net_device)); @@ -766,7 +766,7 @@ int vt6656_hostap_ioctl(PSDevice pDevice, struct iw_point *p) p->length > VIAWGET_HOSTAPD_MAX_BUF_SIZE || !p->pointer) return -EINVAL; - param = (struct viawget_hostapd_param *) kmalloc((int)p->length, (int)GFP_KERNEL); + param = kmalloc((int)p->length, (int)GFP_KERNEL); if (param == NULL) return -ENOMEM; diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c index f1d81b1..e4dc27d 100644 --- a/drivers/staging/vt6656/main_usb.c +++ b/drivers/staging/vt6656/main_usb.c @@ -1511,7 +1511,7 @@ static UCHAR *Config_FileOperation(PSDevice pDevice) { goto error1; } - buffer = (UCHAR *)kmalloc(1024, GFP_KERNEL); + buffer = kmalloc(1024, GFP_KERNEL); if(buffer==NULL) { printk("alllocate mem for file fail?\n"); result = -1; diff --git a/drivers/staging/vt6656/wpactl.c b/drivers/staging/vt6656/wpactl.c index 04a4875..8f7ad2c 100644 --- a/drivers/staging/vt6656/wpactl.c +++ b/drivers/staging/vt6656/wpactl.c @@ -926,7 +926,7 @@ int wpa_ioctl(PSDevice pDevice, struct iw_point *p) p->length > VIAWGET_WPA_MAX_BUF_SIZE || !p->pointer) return -EINVAL; - param = (struct viawget_wpa_param *) kmalloc((int)p->length, (int)GFP_KERNEL); + param = kmalloc((int)p->length, (int)GFP_KERNEL); if (param == NULL) return -ENOMEM; |