Skip to contentSkip to conversation

staging: rtl8712: Replace GFP_ATOMIC with GFP_KERNEL

PATCH Superseded Amitoj Kaur Chawla 2 participants 3 messages Oct 10, 2015 Staging

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 staging: rtl8712: Replace GFP_ATOMIC with GFP_KERNEL

Replace GFP_ATOMIC with GFP_KERNEL since GFP_ATOMIC is called in atomic context and only needed when functions are not allowed to sleep whereas the function is later calling msleep().

---
Changes in v2:
-Fixed commit message
Changes in v3:
-Fixed commit message

 drivers/staging/rtl8712/hal_init.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8712/hal_init.c +1 -1
index 2031291..39ba658 100644
@@ -177,7 +177,7 @@ static u8 rtl8712_dl_fw(struct _adapter *padapter)
 		maxlen = (fwhdr.img_IMEM_size > fwhdr.img_SRAM_size) ?
 			  fwhdr.img_IMEM_size : fwhdr.img_SRAM_size;
 		maxlen += txdscp_sz;
-		ptmpchar = kmalloc(maxlen + FWBUFF_ALIGN_SZ, GFP_ATOMIC);
+		ptmpchar = kmalloc(maxlen + FWBUFF_ALIGN_SZ, GFP_KERNEL);
 		if (!ptmpchar)
 			return ret;
 
Signature · 1 line
1.9.1
#1 lore raw
Quoted 3 lines · Amitoj Kaur Chawla

Replace GFP_ATOMIC with GFP_KERNEL since GFP_ATOMIC is called in atomic context and only needed when functions are not allowed to sleep whereas the function is later calling msleep().

Is the commit message changed? It still says that GFP_ATOMIC is called, which it is not.

julia

Quoted 34 lines

---
Changes in v2:
-Fixed commit message
Changes in v3:
-Fixed commit message

 drivers/staging/rtl8712/hal_init.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8712/hal_init.c +1 -1
index 2031291..39ba658 100644
@@ -177,7 +177,7 @@ static u8 rtl8712_dl_fw(struct _adapter *padapter)
 		maxlen = (fwhdr.img_IMEM_size > fwhdr.img_SRAM_size) ?
 			  fwhdr.img_IMEM_size : fwhdr.img_SRAM_size;
 		maxlen += txdscp_sz;
-		ptmpchar = kmalloc(maxlen + FWBUFF_ALIGN_SZ, GFP_ATOMIC);
+		ptmpchar = kmalloc(maxlen + FWBUFF_ALIGN_SZ, GFP_KERNEL);
 		if (!ptmpchar)
 			return ret;
 
Signature · 8 lines
1.9.1

-- 
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20151010075341.GA31673%40amitoj-Inspiron-3542.
For more options, visit https://groups.google.com/d/optout.
#2 lore raw
Quoted 8 lines · Julia Lawall
Quoted 3 lines · Amitoj Kaur Chawla

Replace GFP_ATOMIC with GFP_KERNEL since GFP_ATOMIC is called in atomic context and only needed when functions are not allowed to sleep whereas the function is later calling msleep().

Is the commit message changed? It still says that GFP_ATOMIC is called, which it is not.

I did change it but I left out that part. Sorry my bad.

Amitoj