Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp441258imm; Fri, 29 Jun 2018 00:01:22 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKZohU20XcUIOZn3frsmK/fVJMRgCSYZvbh7qM1ByZqQeH69OmSzxRovc0gQmnOIpMkiesJ X-Received: by 2002:a17:902:22cc:: with SMTP id o12-v6mr13386839plg.68.1530255682805; Fri, 29 Jun 2018 00:01:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530255682; cv=none; d=google.com; s=arc-20160816; b=z/vWtzVhJTL3yjLi+ayoem5N7GdWBF5iq67/k6xjJvhVcK6/XioEo7gUAgHS/cfB2r DMnJsOVG9IU9pKEpkVOuq/q8Ta8nofL9TOc6o8B4x6+S0TuBBpHQEIfBmmy91VhSs3xi NjrHTc+myj3yrwyqy58Vb0lJaxUi3CNcd8F2wNhEhhZIHoFa0/x1oNspRrpAayCC7+qf 9GkT3lI6USOZrbYeqy2VIkD0aaH1YZJY4rSUW4CYEIyHmZG+uInVZDZfbQxDecN731VC CzMlVjY/9RepAnADXuyQ+mysAMTl70ujO5rqZpWQtnoQAK7NzN5iyR6tJXoOOS+I2rhO 6gdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=W1NKqzfBcb331MpJmKuDMeQcK/NBVKpF2sEI9C6bAf0=; b=DQUkKHtlk1hySlhs5YqpxhwUSiYtRPHpWSKxYCw+oEXLIz79t460Nc+u2tTSALC7aD QQU8k94iUfibYoYaXxGetax0/UakEFqVJMGTxH8yLGq8RdCHeJqCyG24WZTITRixCUmm CWk0qVUpAFFlmdK+n3S9xIKbyQVWP1xRXzIIJgs9TvxQvEnsEbbACXUVu3UOO+ukWoVF ep//IcAo2BDYN5a9q77HJp23QJVkDYV8Dqg0rsK5xGKgJT/y5HUxKdil74R6mhTImvVW JlUI8aQI/GC/jnh489Y5yfI8ZTyDbUgTJpn23y9fJBzKOIX6aM2p1t4BnlK11wDEJdTG VlWA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a24-v6si1329505pgv.527.2018.06.29.00.01.08; Fri, 29 Jun 2018 00:01:22 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932693AbeF2FFZ (ORCPT + 99 others); Fri, 29 Jun 2018 01:05:25 -0400 Received: from www381.your-server.de ([78.46.137.84]:51033 "EHLO www381.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752359AbeF2FFY (ORCPT ); Fri, 29 Jun 2018 01:05:24 -0400 Received: from [78.46.172.2] (helo=sslproxy05.your-server.de) by www381.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.85_2) (envelope-from ) id 1fYlaw-0002Hz-Kd; Fri, 29 Jun 2018 07:05:18 +0200 Received: from [188.174.115.198] (helo=[192.168.178.33]) by sslproxy05.your-server.de with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89) (envelope-from ) id 1fYlaw-000Bh0-EN; Fri, 29 Jun 2018 07:05:18 +0200 Subject: Re: [PATCH] staging:iio:adc:ad7280a: Use GFP_ATOMIC in interrupt handler To: Karim Eshapa Cc: Michael.Hennerich@analog.com, jic23@kernel.org, knaack.h@gmx.de, pmeerw@pmeerw.net, gregkh@linuxfoundation.org, linux-iio@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org References: <20180628235503.4464-1-karim.eshapa@gmail.com> From: Lars-Peter Clausen Message-ID: <3ac43cff-5f4e-579a-574e-14ac865c37e1@metafoo.de> Date: Fri, 29 Jun 2018 07:05:17 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <20180628235503.4464-1-karim.eshapa@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Authenticated-Sender: lars@metafoo.de X-Virus-Scanned: Clear (ClamAV 0.100.0/24705/Thu Jun 28 22:42:44 2018) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > --- > 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; > >