From d5df379784bdb3e88c2644972a576e2a74b90ce3 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Thu, 3 Sep 2015 18:59:07 -0700 Subject: [PATCH] staging: wilc1000: remove another useless kmalloc wrapper A static function that just calls kmalloc(), and only used in one place. It's obvious that the wrappers on wrappers in this driver have never actually been reviewed... Cc: Johnny Kim Cc: Rachel Kim Cc: Dean Lee Cc: Chris Park Signed-off-by: Greg Kroah-Hartman --- drivers/staging/wilc1000/linux_wlan.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c index a9aefa50e59b..b576d02242bf 100644 --- a/drivers/staging/wilc1000/linux_wlan.c +++ b/drivers/staging/wilc1000/linux_wlan.c @@ -152,7 +152,6 @@ void linux_wlan_unlock(void *vp); extern void WILC_WFI_monitor_rx(uint8_t *buff, uint32_t size); extern void WILC_WFI_p2p_rx(struct net_device *dev, uint8_t *buff, uint32_t size); -static void *internal_alloc(uint32_t size, uint32_t flag); static void linux_wlan_tx_complete(void *priv, int status); void frmw_to_linux(uint8_t *buff, uint32_t size, uint32_t pkt_offset); static int mac_init_fn(struct net_device *ndev); @@ -558,15 +557,6 @@ void linux_wlan_free(void *vp) } } -static void *internal_alloc(uint32_t size, uint32_t flag) -{ - char *pntr = NULL; - - pntr = kmalloc(size, flag); - PRINT_D(MEM_DBG, "Allocating %d bytes at address %p\n", size, pntr); - return (void *)pntr; -} - static void linux_wlan_init_lock(char *lockName, void *plock, int count) { sema_init((struct semaphore *)plock, count); @@ -2145,7 +2135,7 @@ int mac_xmit(struct sk_buff *skb, struct net_device *ndev) return 0; } - tx_data = (struct tx_complete_data *)internal_alloc(sizeof(struct tx_complete_data), GFP_ATOMIC); + tx_data = kmalloc(sizeof(struct tx_complete_data), GFP_ATOMIC); if (tx_data == NULL) { PRINT_ER("Failed to allocate memory for tx_data structure\n"); dev_kfree_skb(skb); -- 2.30.2