OSDN Git Service

staging: ks7010: remove KS_WLAN_MEM_FLAG definition
authorSergio Paracuellos <sergio.paracuellos@gmail.com>
Fri, 6 Apr 2018 12:37:44 +0000 (14:37 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 23 Apr 2018 12:27:35 +0000 (14:27 +0200)
This commit removes KS_WLAN_MEM_FLAG definition which is
hiding GFP_ATOMIC along the code. It is better to use directly
GFP_ATOMIC in kmalloc's because this it is easier to read.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/ks7010/ks_hostif.c

index ff624f8..f720d28 100644 (file)
@@ -38,8 +38,6 @@ static inline unsigned int cnt_smeqbody(struct ks_wlan_private *priv)
        return (sme_cnt + SME_EVENT_BUFF_SIZE) % SME_EVENT_BUFF_SIZE;
 }
 
-#define KS_WLAN_MEM_FLAG (GFP_ATOMIC)
-
 static inline u8 get_byte(struct ks_wlan_private *priv)
 {
        u8 data;
@@ -1044,7 +1042,7 @@ static void *hostif_generic_request(size_t size, int event)
 {
        struct hostif_hdr *p;
 
-       p = kzalloc(hif_align_size(size), KS_WLAN_MEM_FLAG);
+       p = kzalloc(hif_align_size(size), GFP_ATOMIC);
        if (!p)
                return NULL;
 
@@ -1098,7 +1096,7 @@ int hostif_data_request(struct ks_wlan_private *priv, struct sk_buff *skb)
        }
 
        size = sizeof(*pp) + 6 + skb_len + 8;
-       pp = kmalloc(hif_align_size(size), KS_WLAN_MEM_FLAG);
+       pp = kmalloc(hif_align_size(size), GFP_ATOMIC);
        if (!pp) {
                ret = -ENOMEM;
                goto err_kfree_skb;