Skip to contentSkip to conversation

staging: rtl8712: Replace GFP_ATOMIC with GFP_KERNEL

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

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

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

Replace GFP_ATOMIC with GFP_KERNEL since the function is calling sleeping functions.

---
 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 4 lines · On Saturday 10 October 2015 02:44:27 Amitoj Kaur Chawla wrote:

Replace GFP_ATOMIC with GFP_KERNEL since the function is calling sleeping functions.

The sentence is missing a few words I think. The fact that the function calls other sleeping functions is not the reason for the change, it's just an indication that the change is safe. You should still explain what the change is good for.

Arnd

#2 lore raw
Quoted 10 lines · Arnd Bergmann
Quoted 4 lines · On Saturday 10 October 2015 02:44:27 Amitoj Kaur Chawla wrote:

Replace GFP_ATOMIC with GFP_KERNEL since the function is calling sleeping functions.

The sentence is missing a few words I think. The fact that the function calls other sleeping functions is not the reason for the change, it's just an indication that the change is safe. You should still explain what the change is good for.

Okay will do. Sending v2.

Signature · 1 line
Amitoj