Received: by 10.213.65.68 with SMTP id h4csp2452903imn; Mon, 9 Apr 2018 03:53:56 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/ctq46oCOOkggbGLDTvb8lGa++AM4dG8tUNSmTExwxyYJPJXd1QrPzqfX2a5+tvHe2LvzS X-Received: by 2002:a17:902:6bc9:: with SMTP id m9-v6mr37021534plt.146.1523271236723; Mon, 09 Apr 2018 03:53:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523271236; cv=none; d=google.com; s=arc-20160816; b=xdr1zfnhJyTTu7t9CO23o1619c9282JABIq+T3d/5bObwbvYQ+AwOQW+2VGCZQe1Uw 6ex3hKu0RiOjIXMFoEZLAMqJ1Fbcdnv8VNiqqeHw3JstkwMcng7WIZ1JAD/EWBUWb0mk EPJFBC3wIL5y2xgNuIEXCqmPVr62KdIGIKwRXYhlBpAU2qyDC00AWG4u/HjWgeh/CPgm 38l9f+Mhw6y2o3pqwQZyHkDGO1YFUBctHBHrW0fcFuF/C0rnw+vDwFgtss6cf4253sGa I95V0HaEnH8hkTRE0zFFFzY16yY2oJ/x2tDCFF4SF283GuFCF9pekRzYSxgQAhWvJSAV eIXA== 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=wq44D0pjvH5NzIFvXgP499//RwL6E3Ly+mDXIsbkehI=; b=IPbQveu0ia/pCNz5OvHRtlbc32zKrnNx41Anarb1JSuXXu1AN7ekjO4jXxEhHSsV62 82kkWxEnY2+nEOJmyC83iD4j4jjScMFLzGort769N7ihPD/yqagxFhpUe+/4VoD0YMtm wJfrVruJu/CHmw59tSArlLXfNDjLhuXw0ne7sgM7IMMbCl1JQcs9saG+mnlzptiuc1DZ ohGxDPuEcEX2a8vcoX53kTuq7lOUSJ2FSj164C0kFOp//aR67i7J1rCC2TbNy+qyp07W 5K2EFSRGvQORh6iOYwiGcx2gwU5GMHPrZOcX5/Voe0WnrJJ2mSL2k3ldVYslRbMb80+i A4+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=V3z1cMpT; 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 z11-v6si68579plo.243.2018.04.09.03.53.20; Mon, 09 Apr 2018 03:53:56 -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=V3z1cMpT; 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 S1752275AbeDIKto (ORCPT + 99 others); Mon, 9 Apr 2018 06:49:44 -0400 Received: from mail-pf0-f193.google.com ([209.85.192.193]:39845 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752240AbeDIKtn (ORCPT ); Mon, 9 Apr 2018 06:49:43 -0400 Received: by mail-pf0-f193.google.com with SMTP id c78so5594800pfj.6 for ; Mon, 09 Apr 2018 03:49:42 -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=wq44D0pjvH5NzIFvXgP499//RwL6E3Ly+mDXIsbkehI=; b=V3z1cMpTXg5MwZd5gcKUKwo8aFH562Z5OJjyHRcjd0akb8X1cqqskwk4qMDKzGPT7Z 61Ec9unx/KbALiJd+TvfDgN/F9cVAogt/5Y0+DAiND8pcl8fd+X25yOLYA1Gq/IwyMwH tWZRf81TCNFhqpM1jdUZ0SIjx4kYzMI/MPQxP8Ajvuj/CvHYtATUgyfC1gXxKb2TPy7j qimHKte7Qde9/R8KsLuEeAVey6RQtReRJ5i3Qm2WwCkeg4pbC2UYG7tGS+5x/BMEbf2/ I9oRNlJlClfcLZsCDyKSRuqVWSNsCVOK8aJ0ZRWGKkAaJ3ueZOmhehZI3ke5/41VSVYW +7EA== 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=wq44D0pjvH5NzIFvXgP499//RwL6E3Ly+mDXIsbkehI=; b=KPX/yTZfTAg68Vl/+NdvW1m8NtpDv6u9bH5t/tvhKhXPRRyu38wFD9111Fscw2Mmbo nYnKFPbfo6Fj1exZDoecu056MsCj0uTPZ9yJy78oMxZFYSKsAKXgsmj6Rs99d/eW4jYZ CBFIzvSJUnOR6gNGHhUykTfAIGcg5yqxG9qtI0De3ifWeqK1lhoiIGrM+6AQvHOizPUQ zWNiXEpNvxJ7eSNDytUYvSwfoTRsBLuOf5GalJ6H7oxqn8LaM8dTE/r9KUhRH4asgUTY 5zYBfya0EB4ZnLFLx3zLEb1BXGzyWBNOEdZGuNCSWFHuo4/Sxrk20FKjEFfOsyNFu4/w 4aKw== X-Gm-Message-State: AElRT7GEsbm2pJeKwg63OoDZePMd443aKm9X4GOR6WUzEXxu7FBKM8SX dFMdsDl0uF1R74VV4j0Mkjo= X-Received: by 10.99.124.1 with SMTP id x1mr24431614pgc.318.1523270982604; Mon, 09 Apr 2018 03:49:42 -0700 (PDT) Received: from oslab.tsinghua.edu.cn ([2402:f000:1:4413:39e9:70fb:21a6:f4d2]) by smtp.gmail.com with ESMTPSA id t75sm287524pfe.124.2018.04.09.03.49.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 09 Apr 2018 03:49:42 -0700 (PDT) From: Jia-Ju Bai To: lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Jia-Ju Bai Subject: [PATCH] sound: soc: intel: skl_nau88l25_ssm4567: Replace GFP_ATOMIC with GFP_KERNEL in skylake_audio_probe Date: Mon, 9 Apr 2018 18:49:34 +0800 Message-Id: <1523270974-23082-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_nau88l25_ssm4567.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/intel/boards/skl_nau88l25_ssm4567.c b/sound/soc/intel/boards/skl_nau88l25_ssm4567.c index 01b8b14..033f9d3 100644 --- a/sound/soc/intel/boards/skl_nau88l25_ssm4567.c +++ b/sound/soc/intel/boards/skl_nau88l25_ssm4567.c @@ -710,7 +710,7 @@ static int skylake_audio_probe(struct platform_device *pdev) struct skl_nau88125_private *ctx; struct skl_machine_pdata *pdata; - 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