From: Guenter Roeck <linux@roeck-us.net>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>,
wim@linux-watchdog.org
Cc: linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] watchdog: pcwd_usb: Avoid GFP_ATOMIC where it is not needed
Date: Sun, 9 Aug 2020 06:38:40 -0700 [thread overview]
Message-ID: <42ad4fb9-e16a-147f-1732-950e657c0a79@roeck-us.net> (raw)
In-Reply-To: <20200809071912.742836-1-christophe.jaillet@wanadoo.fr>
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;
>
prev parent reply other threads:[~2020-08-09 13:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=42ad4fb9-e16a-147f-1732-950e657c0a79@roeck-us.net \
--to=linux@roeck-us.net \
--cc=christophe.jaillet@wanadoo.fr \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=wim@linux-watchdog.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).