Received: by 10.213.65.68 with SMTP id h4csp2452510imn; Mon, 9 Apr 2018 03:53:31 -0700 (PDT) X-Google-Smtp-Source: AIpwx49WcY4BLAejDx8kV4Lnmvn8GaG1OmgfrhY9+GhNyhjzWDBHrIlyNc/LVi7BOiSNBxeKeLF3 X-Received: by 10.101.96.205 with SMTP id r13mr25353918pgv.427.1523271211509; Mon, 09 Apr 2018 03:53:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523271211; cv=none; d=google.com; s=arc-20160816; b=BlneWYLLnqgK/LIqgCQu0tCigirQfg8oKHOQnoDQeNF9ypJ6gp2ZhJ5najsk+62dcE 8qnCf2aDONKHhmEbWteKtYIeRUaZ9UQWLL+tUlHQWCisR10oyXHyf6XsqIeXStH59Us3 1T/wRcNuYtzAoZED2Xyzm0T5Ml8WpuquZaaKQbZKb3FZckKUiD/qQh8ZdmsW3eLQ0xvU i2mc+DvV0d8pilltUib/AcodC5eewok/KlpTnDAoh4Ed/l99aSOoslxggEr7FaQ+w0ej lJFmx43ut/HNvrHpHXD4WfWR79O53RDcGV07W7CW41FxVL+lHDC3PsMlET0PIcQiO1wC RCzw== 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=W3x7hDOvMke+E2jUofC3abxHFsK1WMvf/LRQ4UHnwRc=; b=gQB/IW+RIjB521xt1xIv2qWfXkUzOW4nYob5NtpjEv1cBPkQ1UTyAz+v4cUTntQ0ZX Y35Gd1axdrpUrErDk9OMFMcUFl5qvcOTRvEus/yU05Rn7s3TJCsknv490z/ElDGE+kzA alL3tKHYzrpSwHnWIVgLOZkRSonbT1PJr98bINKdM4vtkKPJX/jQj9YesCCJULuEF3X1 pyc1tGeTKkyap1wX+V1Gyl8Xb/vu/TvZRD3Mk6XgW/NFJXIsiXxS8RpmoHMU07mxXYkE DhOVQutB57uQ7FqafghkUAcs+6WMIRVQpbqmUZzNdFdqjrzKcg/AuhZ4tp/hdzCm6RXk EPXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=q+DUs8MC; 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 n6si27119pgf.310.2018.04.09.03.52.54; Mon, 09 Apr 2018 03:53:31 -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=q+DUs8MC; 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 S1752212AbeDIKtE (ORCPT + 99 others); Mon, 9 Apr 2018 06:49:04 -0400 Received: from mail-pl0-f67.google.com ([209.85.160.67]:40172 "EHLO mail-pl0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751539AbeDIKtD (ORCPT ); Mon, 9 Apr 2018 06:49:03 -0400 Received: by mail-pl0-f67.google.com with SMTP id x4-v6so4866245pln.7 for ; Mon, 09 Apr 2018 03:49:03 -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=W3x7hDOvMke+E2jUofC3abxHFsK1WMvf/LRQ4UHnwRc=; b=q+DUs8MCsokznLjsidPFYH5UrutRk9Cx/gJjB16aoclv8XzwOuLV26XwEOidn5FXvB ih5TPX5M/1oNx/DznkKSa9qtCwVonO3b6Pz7UF2SmgLoO1Oct4Aq+NxqhibiyjDyC/MR YRPUY1j1CH9XzSFWr0R/leCPz+izCksouFUsDXOTc3aNf98fCPhl5VtVCAkpmV56s3QH sJzojRDm8nfzkbRz0FVxoMTqutLprb1GOa92X5+PupuU6fd7PLj/7M14uBfQv1ItdcPP X3Y/C8fHZe95RY3GhZpdr57oioSxtDpRdGHzJhpzdWAjNoyTDVnzFvuD+bgk0k1e0mUB c4Ew== 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=W3x7hDOvMke+E2jUofC3abxHFsK1WMvf/LRQ4UHnwRc=; b=EQ/TU4NNVjnMUIrdEfNu0OBgJUqe3G7bVCDCSVjE9ssJALhDkU1ZsknsnpT8KbW4kG rMBwhPhvCmwkYQ3XBveduLav2H6pxCI1hD2YJ0HKtmhpcdPI56mfc2JCVMKD9r4DER+Z xq0Oxvo0juW+Sx7DqT5GS/fRKKoNHZNXj79QVQ6f/0ZaCU9c3wsUCd8OV4Je8XpYoVkk JkpX6yzjcqBF2IMskyTgW+gIZ6d5MV1T3WrbYIHQe9kisjdaYdVAMVL79iEtoJmool0w nZaT8Ih84BzBgT5a8D0MR1VRR8tDk0uucLU+J1MMaMnrLvhhrtXl6S04AjlP+c5yBKx3 WFFw== X-Gm-Message-State: AElRT7HaWgtISWI+9ap98e73h7njoDNE957pT4h6LJFKwkJ1IsVYSF6n 47NGUNKbwzItOWJgOw2DMz8= X-Received: by 2002:a17:902:9a82:: with SMTP id w2-v6mr37661886plp.6.1523270943051; Mon, 09 Apr 2018 03:49:03 -0700 (PDT) Received: from oslab.tsinghua.edu.cn ([2402:f000:1:4413:39e9:70fb:21a6:f4d2]) by smtp.gmail.com with ESMTPSA id y129sm133110pgb.64.2018.04.09.03.48.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 09 Apr 2018 03:49:02 -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_max98357a: Replace GFP_ATOMIC with GFP_KERNEL in skylake_audio_probe Date: Mon, 9 Apr 2018 18:48:56 +0800 Message-Id: <1523270936-22990-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_max98357a.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/intel/boards/skl_nau88l25_max98357a.c b/sound/soc/intel/boards/skl_nau88l25_max98357a.c index 5ed0aa2..8b80d1a 100644 --- a/sound/soc/intel/boards/skl_nau88l25_max98357a.c +++ b/sound/soc/intel/boards/skl_nau88l25_max98357a.c @@ -657,7 +657,7 @@ static int skylake_audio_probe(struct platform_device *pdev) struct skl_nau8825_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