* [PATCH] watchdog: pcwd_usb: Avoid GFP_ATOMIC where it is not needed
@ 2020-08-09 7:19 Christophe JAILLET
2020-08-09 13:38 ` Guenter Roeck
0 siblings, 1 reply; 2+ messages in thread
From: Christophe JAILLET @ 2020-08-09 7:19 UTC (permalink / raw)
To: wim, linux
Cc: linux-watchdog, linux-kernel, kernel-janitors, Christophe JAILLET
There is no need to use GFP_ATOMIC here. It is a probe function, no
spinlock is taken and GFP_KERNEL is used just before and just after this
'usb_alloc_coherent()' call.
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
drivers/watchdog/pcwd_usb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/watchdog/pcwd_usb.c b/drivers/watchdog/pcwd_usb.c
index 2f44af1831d0..ea67b98ed35d 100644
--- a/drivers/watchdog/pcwd_usb.c
+++ b/drivers/watchdog/pcwd_usb.c
@@ -657,7 +657,7 @@ static int usb_pcwd_probe(struct usb_interface *interface,
/* set up the memory buffer's */
usb_pcwd->intr_buffer = usb_alloc_coherent(udev, usb_pcwd->intr_size,
- GFP_ATOMIC, &usb_pcwd->intr_dma);
+ GFP_KERNEL, &usb_pcwd->intr_dma);
if (!usb_pcwd->intr_buffer) {
pr_err("Out of memory\n");
goto error;
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] watchdog: pcwd_usb: Avoid GFP_ATOMIC where it is not needed
2020-08-09 7:19 [PATCH] watchdog: pcwd_usb: Avoid GFP_ATOMIC where it is not needed Christophe JAILLET
@ 2020-08-09 13:38 ` Guenter Roeck
0 siblings, 0 replies; 2+ messages in thread
From: Guenter Roeck @ 2020-08-09 13:38 UTC (permalink / raw)
To: Christophe JAILLET, wim; +Cc: linux-watchdog, linux-kernel, kernel-janitors
On 8/9/20 12:19 AM, Christophe JAILLET wrote:
> There is no need to use GFP_ATOMIC here. It is a probe function, no
> spinlock is taken and GFP_KERNEL is used just before and just after this
> 'usb_alloc_coherent()' call.
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
> ---
> drivers/watchdog/pcwd_usb.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/watchdog/pcwd_usb.c b/drivers/watchdog/pcwd_usb.c
> index 2f44af1831d0..ea67b98ed35d 100644
> --- a/drivers/watchdog/pcwd_usb.c
> +++ b/drivers/watchdog/pcwd_usb.c
> @@ -657,7 +657,7 @@ static int usb_pcwd_probe(struct usb_interface *interface,
>
> /* set up the memory buffer's */
> usb_pcwd->intr_buffer = usb_alloc_coherent(udev, usb_pcwd->intr_size,
> - GFP_ATOMIC, &usb_pcwd->intr_dma);
> + GFP_KERNEL, &usb_pcwd->intr_dma);
> if (!usb_pcwd->intr_buffer) {
> pr_err("Out of memory\n");
> goto error;
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-08-09 13:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-09 7:19 [PATCH] watchdog: pcwd_usb: Avoid GFP_ATOMIC where it is not needed Christophe JAILLET
2020-08-09 13:38 ` Guenter Roeck
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).