Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp43455ybz; Thu, 23 Apr 2020 17:59:12 -0700 (PDT) X-Google-Smtp-Source: APiQypJdgujRR1Mz9lCt9E74ivDHmfX5bCYvIEvVKbwSOrwFBgq0B4W74znQj2uxi/+SEsvij+1F X-Received: by 2002:a05:6402:6cb:: with SMTP id n11mr5218252edy.210.1587689952365; Thu, 23 Apr 2020 17:59:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587689952; cv=none; d=google.com; s=arc-20160816; b=qygRNCV47Ftr0eVePUbqa2XqMxyphXh3y3EC4oEyu/Ka5NlXAfG/C33GDXfXdOkvGm 7+WBUiZrcp1FT3WF1n7UEhnft70qFPZRwkHHs9Hl3K7oaw2bzj+1Bs7jxyzk/vGEif5U 9dar5BW7ipDUQL6RlOcdMrSS8QJ/8CWaAJpZK27tRu9CoUZHtLy3zgQGifmIf1Ehq9t/ TGj3d3u0uL63f73dcKkdX3ys1UzR9x5DsZRJVzDQhT+RHBXPmUTQGQ7DpsGu7w4pAjtH oV7+HkfKkWcNS3ybSmHs6Hu1HrSPPfZ8yOrPV1Q4WHohY2yTp0QvdYjtlRLE//dhteAn AYZw== 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:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :ironport-sdr:ironport-sdr; bh=raG9ON4849pxR0sUamjD7SlelLhCoI/3sRwgVcIma1c=; b=stlZmCl+bpqdluBlHP8pV6Q3/1ozzYXZ5Yyt2uS2/1HKc1KosU0p6isVAzY+5N2pOq y4npaNyPfAsYBEu31JnishuOdvzaaCjsngkEc3YTDrr15/fglUi1pdt4msd8lSopObrN lHfU6EKPrJmuhnUssZQFIZbIukoJQkVLafWNnGTqqHWM9V641IpeAriqVCs+eUMJTC/p c9DBFigPWGvwoX4qI+U8OIvC0sgWyAjSqP+4GBegunPsu2Mx3N2a4Zmyf0fEeIBT0ZdU ScaVCpg1ya1xEmn0YhuloMRI60lGH4avbHxgRPPckylpN0/yrTy2fNwHCCxFKDJuB36A m8Xw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m26si2118890edp.0.2020.04.23.17.58.41; Thu, 23 Apr 2020 17:59:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728446AbgDXAy5 (ORCPT + 99 others); Thu, 23 Apr 2020 20:54:57 -0400 Received: from mga04.intel.com ([192.55.52.120]:25188 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728156AbgDXAy5 (ORCPT ); Thu, 23 Apr 2020 20:54:57 -0400 IronPort-SDR: EzTOSaEPySnl5lQy4+erP7Fwg7R2LwJgx9lC+GU3UqFTlZ+az0DGa72Thaa3UsqvE9zTnJaTjB ogQkyx0oXz+A== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Apr 2020 17:54:57 -0700 IronPort-SDR: lB41GEDhV85GA7tfq07v2fLk/Bk/F3oxHXYNJBfZ9JuS3a6hGj+RLPWgZ+cPHICGpaVd7xG6hR BdqHtn1O30Nw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,309,1583222400"; d="scan'208";a="430560009" Received: from shao2-debian.sh.intel.com (HELO localhost) ([10.239.13.3]) by orsmga005.jf.intel.com with ESMTP; 23 Apr 2020 17:54:54 -0700 From: Rong Chen To: Vinod Koul , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Cc: Rong Chen , kbuild test robot , Kuninori Morimoto Subject: [PATCH v2] ASoC: soc-compress: avoid false-positive Wuninitialized warning Date: Fri, 24 Apr 2020 08:54:37 +0800 Message-Id: <20200424005437.3941-1-rong.a.chen@intel.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <202004201540.vYPhhYMs%lkp@intel.com> References: <202004201540.vYPhhYMs%lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org gcc-6.5 and earlier show a new warning: sound/soc/soc-compress.c: In function ‘soc_compr_open’: sound/soc/soc-compress.c:75:28: warning: ‘component’ is used uninitialized in this function [-Wuninitialized] struct snd_soc_component *component, *save = NULL; ^~~~~~~~~ Simplest fix is to initialize it to avoid the warning. Reported-by: kbuild test robot Cc: Kuninori Morimoto Link: https://lore.kernel.org/lkml/202004201540.vYPhhYMs%25lkp@intel.com Signed-off-by: Rong Chen --- sound/soc/soc-compress.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/soc-compress.c b/sound/soc/soc-compress.c index ceaf976db0bb..8431ff72be63 100644 --- a/sound/soc/soc-compress.c +++ b/sound/soc/soc-compress.c @@ -72,7 +72,7 @@ static int soc_compr_components_free(struct snd_compr_stream *cstream, static int soc_compr_open(struct snd_compr_stream *cstream) { struct snd_soc_pcm_runtime *rtd = cstream->private_data; - struct snd_soc_component *component, *save = NULL; + struct snd_soc_component *component = NULL, *save = NULL; struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); int ret, i; -- 2.20.1