linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: hso: Use GFP_KERNEL instead of GFP_ATOMIC when possible
@ 2022-02-14 19:09 Christophe JAILLET
  2022-02-15 14:40 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Christophe JAILLET @ 2022-02-14 19:09 UTC (permalink / raw)
  To: David S. Miller, Jakub Kicinski
  Cc: linux-kernel, kernel-janitors, Christophe JAILLET, linux-usb, netdev

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.

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

diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c
index f97813a4e8d1..f8221a7acf62 100644
--- a/drivers/net/usb/hso.c
+++ b/drivers/net/usb/hso.c
@@ -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;
 
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] net: hso: Use GFP_KERNEL instead of GFP_ATOMIC when possible
  2022-02-14 19:09 [PATCH] net: hso: Use GFP_KERNEL instead of GFP_ATOMIC when possible Christophe JAILLET
@ 2022-02-15 14:40 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-02-15 14:40 UTC (permalink / raw)
  To: Christophe JAILLET
  Cc: davem, kuba, linux-kernel, kernel-janitors, linux-usb, netdev

Hello:

This patch was applied to netdev/net-next.git (master)
by David S. Miller <davem@davemloft.net>:

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!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-02-15 14:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-14 19:09 [PATCH] net: hso: Use GFP_KERNEL instead of GFP_ATOMIC when possible Christophe JAILLET
2022-02-15 14:40 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).