* [PATCH] Bluetooth: ath3k: Use GFP_KERNEL instead of GFP_ATOMIC
@ 2011-10-25 9:49 David Herrmann
2011-10-25 10:09 ` [PATCH v2] " David Herrmann
0 siblings, 1 reply; 3+ messages in thread
From: David Herrmann @ 2011-10-25 9:49 UTC (permalink / raw)
To: linux-bluetooth; +Cc: vkandukuri, sbalashanmugam, padovan, David Herrmann
We are allowed to sleep here so no need to use GFP_ATOMIC. The caller
(ath3k_probe) calls request_firmware() which definitely sleeps. Hence, we should
avoid using GFP_ATOMIC.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
---
drivers/bluetooth/ath3k.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/bluetooth/ath3k.c b/drivers/bluetooth/ath3k.c
index db7cb81..bcf9727 100644
--- a/drivers/bluetooth/ath3k.c
+++ b/drivers/bluetooth/ath3k.c
@@ -105,7 +105,7 @@ static int ath3k_load_firmware(struct usb_device *udev,
pipe = usb_sndctrlpipe(udev, 0);
- send_buf = kmalloc(BULK_SIZE, GFP_ATOMIC);
+ send_buf = kmalloc(BULK_SIZE, GFP_KERNEL);
if (!send_buf) {
BT_ERR("Can't allocate memory chunk for firmware");
return -ENOMEM;
--
1.7.7.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH v2] Bluetooth: ath3k: Use GFP_KERNEL instead of GFP_ATOMIC
2011-10-25 9:49 [PATCH] Bluetooth: ath3k: Use GFP_KERNEL instead of GFP_ATOMIC David Herrmann
@ 2011-10-25 10:09 ` David Herrmann
2011-10-31 19:38 ` Gustavo Padovan
0 siblings, 1 reply; 3+ messages in thread
From: David Herrmann @ 2011-10-25 10:09 UTC (permalink / raw)
To: linux-bluetooth; +Cc: David Herrmann
We are allowed to sleep here so no need to use GFP_ATOMIC. The caller
(ath3k_probe) calls request_firmware() which definitely sleeps. Hence, we should
avoid using GFP_ATOMIC.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
---
V2: This fixes both occurences of GFP_ATOMIC in one patch.
drivers/bluetooth/ath3k.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/bluetooth/ath3k.c b/drivers/bluetooth/ath3k.c
index db7cb81..106beb1 100644
--- a/drivers/bluetooth/ath3k.c
+++ b/drivers/bluetooth/ath3k.c
@@ -105,7 +105,7 @@ static int ath3k_load_firmware(struct usb_device *udev,
pipe = usb_sndctrlpipe(udev, 0);
- send_buf = kmalloc(BULK_SIZE, GFP_ATOMIC);
+ send_buf = kmalloc(BULK_SIZE, GFP_KERNEL);
if (!send_buf) {
BT_ERR("Can't allocate memory chunk for firmware");
return -ENOMEM;
@@ -176,7 +176,7 @@ static int ath3k_load_fwfile(struct usb_device *udev,
count = firmware->size;
- send_buf = kmalloc(BULK_SIZE, GFP_ATOMIC);
+ send_buf = kmalloc(BULK_SIZE, GFP_KERNEL);
if (!send_buf) {
BT_ERR("Can't allocate memory chunk for firmware");
return -ENOMEM;
--
1.7.7.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] Bluetooth: ath3k: Use GFP_KERNEL instead of GFP_ATOMIC
2011-10-25 10:09 ` [PATCH v2] " David Herrmann
@ 2011-10-31 19:38 ` Gustavo Padovan
0 siblings, 0 replies; 3+ messages in thread
From: Gustavo Padovan @ 2011-10-31 19:38 UTC (permalink / raw)
To: David Herrmann; +Cc: linux-bluetooth
Hi David,
* David Herrmann <dh.herrmann@googlemail.com> [2011-10-25 12:09:52 +0200]:
> We are allowed to sleep here so no need to use GFP_ATOMIC. The caller
> (ath3k_probe) calls request_firmware() which definitely sleeps. Hence, we should
> avoid using GFP_ATOMIC.
>
> Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
> ---
> V2: This fixes both occurences of GFP_ATOMIC in one patch.
>
> drivers/bluetooth/ath3k.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
Applied, thanks.
Gustavo
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-10-31 19:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-25 9:49 [PATCH] Bluetooth: ath3k: Use GFP_KERNEL instead of GFP_ATOMIC David Herrmann
2011-10-25 10:09 ` [PATCH v2] " David Herrmann
2011-10-31 19:38 ` Gustavo Padovan
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).