* [PATCH] staging:iio:adc:ad7280a: Use GFP_ATOMIC in interrupt handler
@ 2018-06-28 23:55 Karim Eshapa
2018-06-29 5:05 ` Lars-Peter Clausen
0 siblings, 1 reply; 3+ messages in thread
From: Karim Eshapa @ 2018-06-28 23:55 UTC (permalink / raw)
To: lars
Cc: Michael.Hennerich, jic23, knaack.h, pmeerw, gregkh, linux-iio,
devel, linux-kernel, Karim Eshapa
Use GFP_ATOMIC rather GFP_KERNEL in interrupt handler,
as GFP_KERNEL may sleep according to slab allocator.
Signed-off-by: Karim Eshapa <karim.eshapa@gmail.com>
---
drivers/staging/iio/adc/ad7280a.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/iio/adc/ad7280a.c b/drivers/staging/iio/adc/ad7280a.c
index b736275c10f5..25c4fbc303f7 100644
--- a/drivers/staging/iio/adc/ad7280a.c
+++ b/drivers/staging/iio/adc/ad7280a.c
@@ -692,7 +692,7 @@ static irqreturn_t ad7280_event_handler(int irq, void *private)
unsigned int *channels;
int i, ret;
- channels = kcalloc(st->scan_cnt, sizeof(*channels), GFP_KERNEL);
+ channels = kcalloc(st->scan_cnt, sizeof(*channels), GFP_ATOMIC);
if (!channels)
return IRQ_HANDLED;
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] staging:iio:adc:ad7280a: Use GFP_ATOMIC in interrupt handler
2018-06-28 23:55 [PATCH] staging:iio:adc:ad7280a: Use GFP_ATOMIC in interrupt handler Karim Eshapa
@ 2018-06-29 5:05 ` Lars-Peter Clausen
0 siblings, 0 replies; 3+ messages in thread
From: Lars-Peter Clausen @ 2018-06-29 5:05 UTC (permalink / raw)
To: Karim Eshapa
Cc: Michael.Hennerich, jic23, knaack.h, pmeerw, gregkh, linux-iio,
devel, linux-kernel
On 06/29/2018 01:55 AM, Karim Eshapa wrote:
> Use GFP_ATOMIC rather GFP_KERNEL in interrupt handler,
> as GFP_KERNEL may sleep according to slab allocator.
This is a threaded interrupt. Sleeping is OK.
>
> Signed-off-by: Karim Eshapa <karim.eshapa@gmail.com>
> ---
> drivers/staging/iio/adc/ad7280a.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/iio/adc/ad7280a.c b/drivers/staging/iio/adc/ad7280a.c
> index b736275c10f5..25c4fbc303f7 100644
> --- a/drivers/staging/iio/adc/ad7280a.c
> +++ b/drivers/staging/iio/adc/ad7280a.c
> @@ -692,7 +692,7 @@ static irqreturn_t ad7280_event_handler(int irq, void *private)
> unsigned int *channels;
> int i, ret;
>
> - channels = kcalloc(st->scan_cnt, sizeof(*channels), GFP_KERNEL);
> + channels = kcalloc(st->scan_cnt, sizeof(*channels), GFP_ATOMIC);
> if (!channels)
> return IRQ_HANDLED;
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] staging:iio:adc:ad7280a: Use GFP_ATOMIC in interrupt handler
@ 2018-06-28 23:51 Karim Eshapa
0 siblings, 0 replies; 3+ messages in thread
From: Karim Eshapa @ 2018-06-28 23:51 UTC (permalink / raw)
To: lars
Cc: Michael.Hennerich, jic23, knaack.h, pmeerw, gregkh, linux-iio,
devel, linux-kernel, Karim Eshapa
Use GFP_ATOMIC rather GFP_KERNEL in interrupt handler,
as GFP_KERNEL may sleep according to slab allocator.
Signed-off-by: Karim Eshapa <karim.eshapa@gmail.com>
---
drivers/staging/iio/adc/ad7280a.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/iio/adc/ad7280a.c b/drivers/staging/iio/adc/ad7280a.c
index b736275c10f5..25c4fbc303f7 100644
--- a/drivers/staging/iio/adc/ad7280a.c
+++ b/drivers/staging/iio/adc/ad7280a.c
@@ -692,7 +692,7 @@ static irqreturn_t ad7280_event_handler(int irq, void *private)
unsigned int *channels;
int i, ret;
- channels = kcalloc(st->scan_cnt, sizeof(*channels), GFP_KERNEL);
+ channels = kcalloc(st->scan_cnt, sizeof(*channels), GFP_ATOMIC);
if (!channels)
return IRQ_HANDLED;
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-06-29 5:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-28 23:55 [PATCH] staging:iio:adc:ad7280a: Use GFP_ATOMIC in interrupt handler Karim Eshapa
2018-06-29 5:05 ` Lars-Peter Clausen
-- strict thread matches above, loose matches on Subject: below --
2018-06-28 23:51 Karim Eshapa
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).