Skip to contentSkip to conversation

net: hso: Use GFP_KERNEL instead of GFP_ATOMIC when possible

PATCH Applied Christophe JAILLET 2 participants 2 messages Feb 14, 2022 – Feb 15, 2022

Subsystems (6)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: hso: Use GFP_KERNEL instead of GFP_ATOMIC when possible

hso_create_device() is only called from function that already use GFP_KERNEL. And all the callers are called from the probe function.

So there is no need here to explicitly require a GFP_ATOMIC when allocating memory.

Use GFP_KERNEL instead.

---
 drivers/net/usb/hso.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/usb/hso.c +1 -1
index f97813a4e8d1..f8221a7acf62 100644
@@ -2319,7 +2319,7 @@ static struct hso_device *hso_create_device(struct usb_interface *intf,
 {
 	struct hso_device *hso_dev;
 
-	hso_dev = kzalloc(sizeof(*hso_dev), GFP_ATOMIC);
+	hso_dev = kzalloc(sizeof(*hso_dev), GFP_KERNEL);
 	if (!hso_dev)
 		return NULL;
 
Signature · 1 line
2.32.0
#1 lore raw
This patch was applied to netdev/net-next.git (master) by David S. Miller <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (master) by David S. Miller <[email protected]>:

Quoted 9 lines · On Mon, 14 Feb 2022 20:09:06 +0100 you wrote:

hso_create_device() is only called from function that already use GFP_KERNEL. And all the callers are called from the probe function.

So there is no need here to explicitly require a GFP_ATOMIC when allocating memory.

Use GFP_KERNEL instead.

[...]

Here is the summary with links:
- net: hso: Use GFP_KERNEL instead of GFP_ATOMIC when possible

    https://git.kernel.org/netdev/net-next/c/25ce79db8042

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html