]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
staging: wilc1000: remove another useless kmalloc wrapper
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 4 Sep 2015 01:59:07 +0000 (18:59 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 13 Sep 2015 01:24:40 +0000 (18:24 -0700)
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 <johnny.kim@atmel.com>
Cc: Rachel Kim <rachel.kim@atmel.com>
Cc: Dean Lee <dean.lee@atmel.com>
Cc: Chris Park <chris.park@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wilc1000/linux_wlan.c

index a9aefa50e59b77d4dbedba24ce68d4de63b14ac2..b576d02242bf588aaa4104c5f46e4efa458e8ecf 100644 (file)
@@ -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);