mirror of
https://github.com/torvalds/linux
synced 2024-10-28 06:09:03 +00:00
staging: wilc1000: remove unnecessary cast
kmalloc() returns void pointer. Signed-off-by: ChengYi He <chengyihetaipei@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
3f5309725e
commit
30ef5c8b97
|
@ -258,7 +258,7 @@ static int mon_mgmt_tx(struct net_device *dev, const u8 *buf, size_t len)
|
||||||
len += sizeof(struct tx_complete_mon_data *);
|
len += sizeof(struct tx_complete_mon_data *);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
mgmt_tx->buff = (char *)kmalloc(len, GFP_ATOMIC);
|
mgmt_tx->buff = kmalloc(len, GFP_ATOMIC);
|
||||||
if (mgmt_tx->buff == NULL) {
|
if (mgmt_tx->buff == NULL) {
|
||||||
PRINT_ER("Failed to allocate memory for mgmt_tx buff\n");
|
PRINT_ER("Failed to allocate memory for mgmt_tx buff\n");
|
||||||
return WILC_FAIL;
|
return WILC_FAIL;
|
||||||
|
|
|
@ -580,7 +580,7 @@ static void linux_wlan_dbg(uint8_t *buff)
|
||||||
static void *linux_wlan_malloc_atomic(uint32_t sz)
|
static void *linux_wlan_malloc_atomic(uint32_t sz)
|
||||||
{
|
{
|
||||||
char *pntr = NULL;
|
char *pntr = NULL;
|
||||||
pntr = (char *)kmalloc(sz, GFP_ATOMIC);
|
pntr = kmalloc(sz, GFP_ATOMIC);
|
||||||
PRINT_D(MEM_DBG, "Allocating %d bytes at address %p\n", sz, pntr);
|
PRINT_D(MEM_DBG, "Allocating %d bytes at address %p\n", sz, pntr);
|
||||||
return (void *)pntr;
|
return (void *)pntr;
|
||||||
|
|
||||||
|
@ -588,7 +588,7 @@ static void *linux_wlan_malloc_atomic(uint32_t sz)
|
||||||
static void *linux_wlan_malloc(uint32_t sz)
|
static void *linux_wlan_malloc(uint32_t sz)
|
||||||
{
|
{
|
||||||
char *pntr = NULL;
|
char *pntr = NULL;
|
||||||
pntr = (char *)kmalloc(sz, GFP_KERNEL);
|
pntr = kmalloc(sz, GFP_KERNEL);
|
||||||
PRINT_D(MEM_DBG, "Allocating %d bytes at address %p\n", sz, pntr);
|
PRINT_D(MEM_DBG, "Allocating %d bytes at address %p\n", sz, pntr);
|
||||||
return (void *)pntr;
|
return (void *)pntr;
|
||||||
}
|
}
|
||||||
|
@ -605,7 +605,7 @@ void linux_wlan_free(void *vp)
|
||||||
static void *internal_alloc(uint32_t size, uint32_t flag)
|
static void *internal_alloc(uint32_t size, uint32_t flag)
|
||||||
{
|
{
|
||||||
char *pntr = NULL;
|
char *pntr = NULL;
|
||||||
pntr = (char *)kmalloc(size, flag);
|
pntr = kmalloc(size, flag);
|
||||||
PRINT_D(MEM_DBG, "Allocating %d bytes at address %p\n", size, pntr);
|
PRINT_D(MEM_DBG, "Allocating %d bytes at address %p\n", size, pntr);
|
||||||
return (void *)pntr;
|
return (void *)pntr;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue