Received: by 10.213.65.68 with SMTP id h4csp2453625imn; Mon, 9 Apr 2018 03:54:39 -0700 (PDT) X-Google-Smtp-Source: AIpwx48C4JHgGhpm3jb9UrmFGKePQE1fmyLO7YNqebY8c7LqrD9y94N9Ti0eDhqoy1vj8JJltU7J X-Received: by 10.99.123.19 with SMTP id w19mr23922289pgc.405.1523271278995; Mon, 09 Apr 2018 03:54:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523271278; cv=none; d=google.com; s=arc-20160816; b=JzVi7GpO/d1/qTmeR4TTb5zBcIHfA7RTqdAs23+eqBUjx/v1Ngc1V1nNkXAa6i+JsQ uUfq1MAxKPg9Zq/mRO0ReUmYBYatsu+w+v4CFUhUkTVaMJUhIEoebaYmrNOd6bs3ao9S +s4Nx4bzzIB1OFEvgIDpAszqwlxIzLTCAf5COPaRbzGQT9/fUnOuSMAfBUjgDJ2bG3GF kPGcy5Zv8fysbJ+nzkA/nW3SNk0fe+LILBavxTaeWRkAkThid3k3OtKVbPZszPHVXBuX orwJeouYY58GZXlK3ermKq8ZZL8r849z+6d8a694JEg5CFWz9A0xqz/CKUVV7gcgdLrP sLaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=xftcc3S5dcyjBFFMRbLT1BHLe1hViKFJ3PS2HG3emGE=; b=CnC89SDKmMW2k4hi77YuzETfk7UuLYHlwX4E1Wd8637kannwhE87xrvWqwGouTEPye cuL4IdU2uCzIV7K2643RYCm5t8rgDbRqiOXyBjjrTIV0own3WVMwj0CrZ5aDDqQ5C7GE nDK7fXDzZEz4nmJTTJhv6CaOaHw5DTbW9d0PL/gAoB2PfRU3Rr2Wdk861kJ/1vZinmYv t03G8nyap8Bn5eevtFJ7yU9wK4lZv/yxByasQJqlqA39DNAGYuCFgXbzdTlXMLi41xXf 3mS1LN8NY2RK6v3SNHZQQN7kvcc+lxBQmOdsSbachgM1dRnH0ADadKsO3V91NVFcEIHh 0DCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=P5L077I/; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e39-v6si60552plg.335.2018.04.09.03.54.02; Mon, 09 Apr 2018 03:54:38 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=P5L077I/; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752336AbeDIKuG (ORCPT + 99 others); Mon, 9 Apr 2018 06:50:06 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:45637 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750952AbeDIKuE (ORCPT ); Mon, 9 Apr 2018 06:50:04 -0400 Received: by mail-pf0-f196.google.com with SMTP id l27so5590993pfk.12 for ; Mon, 09 Apr 2018 03:50:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=xftcc3S5dcyjBFFMRbLT1BHLe1hViKFJ3PS2HG3emGE=; b=P5L077I/SRLXa3gMplkQJtJBI1qPKRpi1yvzercR/076yDzYcz+ItSsflO/YqdLp26 gIiM8t7/eU1Docye4ctBgJrYzfFz/pRNA7c2Mc41sDDDg4AjoEq04b9HaVa2WZM3intm yQgFuKKcvQ/tyMrxkOQ3ziXYWh1anoNWYjMIpYK2Q2LojMxHoV6OmtIVYCD9SaTueFGl 6heFoXCIX5+4D0rzhbISeWY59JB9qwBev5Ac36+FCzE0z1y1r0U7U/A6YIQGxqiep/8W rVzAQ8PUvZLpMDjJtwovaGshh17nbfNI3nqlUiyHf39n67nTZvQRhHYyY6U55oLIcS5i S+Rw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=xftcc3S5dcyjBFFMRbLT1BHLe1hViKFJ3PS2HG3emGE=; b=UAoCxYWshHEDyI5isocsAkxyTmAwkL9ekvkz++VzjOTEk3K9nazKKPQgl0Z6eUOokT l9l8QkwM1BXHvS+0Is123NO410suBMBG0v4bsfxDZnCxiHI3XI3Vwy3b64XVxSLpfLdx qPIr71ud7IS8bSFdiL73PuL7zcMdPd7q+33It8PxS06bVHRsEZicwTJwjmxdN1tEe6X3 +YwSUxQOFN+CmH7O6+nL/Um4zqEhljShOZ0Bq9WmPZj06FgT4zzRnqR0O6BnysnY4hgT puTp7JStXFAji/FJHTbOVnqNgrIGg9WtUnJwma6MT69Z1SnfCIrJyWquIhNnl/TRaOT/ SywQ== X-Gm-Message-State: AElRT7HYRbMw1E0U32/xEi+vhunyE1fjkeeRIz6O928fpErPYdtVNmOy q3kQUWn7OT28X18MBIkgnKE= X-Received: by 10.101.98.145 with SMTP id f17mr23951150pgv.398.1523271004596; Mon, 09 Apr 2018 03:50:04 -0700 (PDT) Received: from oslab.tsinghua.edu.cn ([2402:f000:1:4413:39e9:70fb:21a6:f4d2]) by smtp.gmail.com with ESMTPSA id n74sm405280pfi.21.2018.04.09.03.50.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 09 Apr 2018 03:50:04 -0700 (PDT) From: Jia-Ju Bai To: lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com, subhransu.s.prusty@intel.com Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Jia-Ju Bai Subject: [PATCH] sound: soc: intel: skl_rt286: Replace GFP_ATOMIC with GFP_KERNEL in skylake_audio_probe Date: Mon, 9 Apr 2018 18:49:58 +0800 Message-Id: <1523270998-23130-1-git-send-email-baijiaju1990@gmail.com> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org skylake_audio_probe() is never called in atomic context. This function is only set as ".probe" in "struct platform_driver". Despite never getting called from atomic context, skylake_audio_probe() calls devm_kzalloc() with GFP_ATOMIC, which waits busily for allocation. GFP_ATOMIC is not necessary and can be replaced with GFP_KERNEL, to avoid busy waiting and improve the possibility of sucessful allocation. This is found by a static analysis tool named DCNS written by myself. Signed-off-by: Jia-Ju Bai --- sound/soc/intel/boards/skl_rt286.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/intel/boards/skl_rt286.c b/sound/soc/intel/boards/skl_rt286.c index 2bc4cfc..bb7187b 100644 --- a/sound/soc/intel/boards/skl_rt286.c +++ b/sound/soc/intel/boards/skl_rt286.c @@ -527,7 +527,7 @@ static int skylake_audio_probe(struct platform_device *pdev) { struct skl_rt286_private *ctx; - ctx = devm_kzalloc(&pdev->dev, sizeof(*ctx), GFP_ATOMIC); + ctx = devm_kzalloc(&pdev->dev, sizeof(*ctx), GFP_KERNEL); if (!ctx) return -ENOMEM; -- 1.9.1