diff mbox series

brcmfmac: Avoid GFP_ATOMIC when GFP_KERNEL is enough

Message ID b6e619415db4ee5de95389280d7195bb56e45f77.1618860716.git.christophe.jaillet@wanadoo.fr (mailing list archive)
State Accepted
Commit 7a4fc7154e3275c5ce166d0ebd385b3def7a7ab3
Delegated to: Kalle Valo
Headers show
Series brcmfmac: Avoid GFP_ATOMIC when GFP_KERNEL is enough | expand

Commit Message

Christophe JAILLET April 19, 2021, 7:35 p.m. UTC
A workqueue is not atomic, so constraints can be relaxed here.
GFP_KERNEL can be used instead of GFP_ATOMIC.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
 drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Arend van Spriel April 22, 2021, 11:55 a.m. UTC | #1
On 19-04-2021 21:35, Christophe JAILLET wrote:
> A workqueue is not atomic, so constraints can be relaxed here.
> GFP_KERNEL can be used instead of GFP_ATOMIC.

Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
>   drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
Kalle Valo April 22, 2021, 2:41 p.m. UTC | #2
Christophe JAILLET <christophe.jaillet@wanadoo.fr> wrote:

> A workqueue is not atomic, so constraints can be relaxed here.
> GFP_KERNEL can be used instead of GFP_ATOMIC.
> 
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com>

Patch applied to wireless-drivers-next.git, thanks.

7a4fc7154e32 brcmfmac: Avoid GFP_ATOMIC when GFP_KERNEL is enough
diff mbox series

Patch

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
index ea78fe527c5d..838b09b23abf 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
@@ -151,7 +151,7 @@  static void _brcmf_set_multicast_list(struct work_struct *work)
 	/* Send down the multicast list first. */
 	cnt = netdev_mc_count(ndev);
 	buflen = sizeof(cnt) + (cnt * ETH_ALEN);
-	buf = kmalloc(buflen, GFP_ATOMIC);
+	buf = kmalloc(buflen, GFP_KERNEL);
 	if (!buf)
 		return;
 	bufp = buf;