projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5f7dc7d
)
net: moxa: use GFP_KERNEL
author
Julia Lawall
<Julia.Lawall@inria.fr>
Thu, 10 Feb 2022 20:42:15 +0000
(21:42 +0100)
committer
Jakub Kicinski
<kuba@kernel.org>
Fri, 11 Feb 2022 22:39:08 +0000
(14:39 -0800)
Platform_driver probe functions aren't called with locks
held and thus don't need GFP_ATOMIC. Use GFP_KERNEL instead.
Problem found with Coccinelle.
Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>
Link:
https://lore.kernel.org/r/20220210204223.104181-1-Julia.Lawall@inria.fr
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/moxa/moxart_ether.c
patch
|
blob
|
history
diff --git
a/drivers/net/ethernet/moxa/moxart_ether.c
b/drivers/net/ethernet/moxa/moxart_ether.c
index
15179b9
..
afb7dca
100644
(file)
--- a/
drivers/net/ethernet/moxa/moxart_ether.c
+++ b/
drivers/net/ethernet/moxa/moxart_ether.c
@@
-510,14
+510,14
@@
static int moxart_mac_probe(struct platform_device *pdev)
}
priv->tx_buf_base = kmalloc_array(priv->tx_buf_size, TX_DESC_NUM,
- GFP_
ATOMIC
);
+ GFP_
KERNEL
);
if (!priv->tx_buf_base) {
ret = -ENOMEM;
goto init_fail;
}
priv->rx_buf_base = kmalloc_array(priv->rx_buf_size, RX_DESC_NUM,
- GFP_
ATOMIC
);
+ GFP_
KERNEL
);
if (!priv->rx_buf_base) {
ret = -ENOMEM;
goto init_fail;