From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BB584C432BE for ; Wed, 25 Aug 2021 23:05:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9E23361073 for ; Wed, 25 Aug 2021 23:05:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233245AbhHYXF4 (ORCPT ); Wed, 25 Aug 2021 19:05:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47186 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231535AbhHYXFz (ORCPT ); Wed, 25 Aug 2021 19:05:55 -0400 Received: from mail-lf1-x12b.google.com (mail-lf1-x12b.google.com [IPv6:2a00:1450:4864:20::12b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 24AD5C061757 for ; Wed, 25 Aug 2021 16:05:09 -0700 (PDT) Received: by mail-lf1-x12b.google.com with SMTP id b4so2225977lfo.13 for ; Wed, 25 Aug 2021 16:05:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=5dYfTfFoEwQ2ICJl8SbDnguBvvNuF7k4gO0Z6GR4+UM=; b=g/m4ReYERQ60sWtKULs1pWrY8SBQexh9FfmV5YpThCdAz2L1kLRRduThW9cjrksS3+ IFEAIIYkruJsn5oosvTHtZTNmTwMy1mYwBIFTNkBMgR/yn1/bZ1Dp7L6JZK/rbH8ClI8 KK0o/FeRxPO6SsOnrukQ7rrD1LLt6J5iS5qEjZOUJUZUWbB5enosavl7TBLCSne840YR fTE5RDDvYp+sduuImvjS2HE0L5AATnJvIk2QjEYBi4dkSaTKH2y26KQCBoDFxiv1vG4N tTxpiUvwGaqkQWoshHsfmzWCHubpbqK89Xs65iWcWJV2Evz/gkpvuDE64vhUUn2/ll5o BqNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=5dYfTfFoEwQ2ICJl8SbDnguBvvNuF7k4gO0Z6GR4+UM=; b=iHbTYibubtGezsWFw+ahH2c0HHaDJpfrlRvNJdnIaE1u8q5bWESyKyv/kF4FeR177A uniMtdQ1Uhf3XSnhhG/xDhvqJ3f+GZ4gGUpff2l1DItXrWoskC79+Nsai9uuIFCTQx1R 4zFOhboT+jHZYN2TMxL2zUxpnkb7GEgbKTeBQjj7hRYm1V0Oo8r0CgGw2iQ98UrSbmCD BHU1L8i/dYVIiuOpVA8Y4yzyxbPi/dejI9X5M7ZEP+8Mj9iZe8VUwxlbiDjm+st+9NMR OZNnPHN86VEHzSClFyPLk3wIh2kGKVOUS29eZf63YxKrcKBjqdPYKH4PNmxxlR1ePAfU d9WQ== X-Gm-Message-State: AOAM530xlfz0vTsoyf3b5v2wUZlk7ldifudNIeGhjpaRFhQEtM/b4QOL yfVkgv4IlcdZIVG/6P5C9us9V6+fcKjxTxquSThMrg== X-Google-Smtp-Source: ABdhPJwSnZtx/HfebEdviL7/cv+ShoseoKsJ2jhLLJ8/O582m6ZCtLffQRwT1ToFRuBUMeoSuaYhu80DydU/OY0rgQ0= X-Received: by 2002:a19:7117:: with SMTP id m23mr374169lfc.73.1629932707242; Wed, 25 Aug 2021 16:05:07 -0700 (PDT) MIME-Version: 1.0 References: <202108241301.UdSncTEq-lkp@intel.com> <77ba5fc1-2bfa-0e9f-525c-dc260642c7ab@linux.intel.com> In-Reply-To: <77ba5fc1-2bfa-0e9f-525c-dc260642c7ab@linux.intel.com> From: Nick Desaulniers Date: Wed, 25 Aug 2021 16:04:56 -0700 Message-ID: Subject: Re: sound/soc/sof/intel/hda-dai.c:265:22: warning: Value stored to 'sdev' during its initialization is never read [clang-analyzer-deadcode.DeadStores] To: Pierre-Louis Bossart Cc: kernel test robot , clang-built-linux@googlegroups.com, kbuild-all@lists.01.org, linux-kernel@vger.kernel.org, Takashi Iwai , Kai Vehmanen , Guennadi Liakhovetski , Bard Liao Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 24, 2021 at 9:53 AM Pierre-Louis Bossart wrote: > > Thanks for the report, I am not sure it's a real issue? > >>> sound/soc/sof/intel/hda-dai.c:265:22: warning: Value stored to 'sdev' during its initialization is never read [clang-analyzer-deadcode.DeadStores] > > struct snd_sof_dev *sdev = > > ^~~~ > > sound/soc/sof/intel/hda-dai.c:265:22: note: Value stored to 'sdev' during its initialization is never read > > struct snd_sof_dev *sdev = > > ^~~~ > > fdd961e37e47f2 Keyon Jie 2019-04-12 259 > > fdd961e37e47f2 Keyon Jie 2019-04-12 260 static int hda_link_pcm_prepare(struct snd_pcm_substream *substream, > > fdd961e37e47f2 Keyon Jie 2019-04-12 261 struct snd_soc_dai *dai) > > fdd961e37e47f2 Keyon Jie 2019-04-12 262 { > > ed3baacd76baa0 Ranjani Sridharan 2019-04-30 263 struct hdac_ext_stream *link_dev = > > ed3baacd76baa0 Ranjani Sridharan 2019-04-30 264 snd_soc_dai_get_dma_data(dai, substream); > > fdd961e37e47f2 Keyon Jie 2019-04-12 @265 struct snd_sof_dev *sdev = > > fdd961e37e47f2 Keyon Jie 2019-04-12 266 snd_soc_component_get_drvdata(dai->component); > > 1205300af9dba3 Kuninori Morimoto 2020-07-20 267 struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); > > fdd961e37e47f2 Keyon Jie 2019-04-12 268 int stream = substream->stream; > > fdd961e37e47f2 Keyon Jie 2019-04-12 269 > > a3ebccb52efdfb Kai Vehmanen 2019-07-22 270 if (link_dev->link_prepared) > > fdd961e37e47f2 Keyon Jie 2019-04-12 271 return 0; > > fdd961e37e47f2 Keyon Jie 2019-04-12 272 > > ed3baacd76baa0 Ranjani Sridharan 2019-04-30 273 dev_dbg(sdev->dev, "hda: prepare stream dir %d\n", substream->stream); > > fdd961e37e47f2 Keyon Jie 2019-04-12 274 > > fdd961e37e47f2 Keyon Jie 2019-04-12 275 return hda_link_hw_params(substream, &rtd->dpcm[stream].hw_params, > > fdd961e37e47f2 Keyon Jie 2019-04-12 276 dai); > > fdd961e37e47f2 Keyon Jie 2019-04-12 277 } > > fdd961e37e47f2 Keyon Jie 2019-04-12 278 > > The sdev variable is used in the dev_dbg() log, this looks legit to me? Perhaps that depends on a config that was not set? The log does say this is a randconfig build. -- Thanks, ~Nick Desaulniers From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============8529486521525126103==" MIME-Version: 1.0 From: Nick Desaulniers To: kbuild-all@lists.01.org Subject: Re: sound/soc/sof/intel/hda-dai.c:265:22: warning: Value stored to 'sdev' during its initialization is never read [clang-analyzer-deadcode.DeadStores] Date: Wed, 25 Aug 2021 16:04:56 -0700 Message-ID: In-Reply-To: <77ba5fc1-2bfa-0e9f-525c-dc260642c7ab@linux.intel.com> List-Id: --===============8529486521525126103== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable On Tue, Aug 24, 2021 at 9:53 AM Pierre-Louis Bossart wrote: > > Thanks for the report, I am not sure it's a real issue? > >>> sound/soc/sof/intel/hda-dai.c:265:22: warning: Value stored to 'sdev'= during its initialization is never read [clang-analyzer-deadcode.DeadStore= s] > > struct snd_sof_dev *sdev =3D > > ^~~~ > > sound/soc/sof/intel/hda-dai.c:265:22: note: Value stored to 'sdev' d= uring its initialization is never read > > struct snd_sof_dev *sdev =3D > > ^~~~ > > fdd961e37e47f2 Keyon Jie 2019-04-12 259 > > fdd961e37e47f2 Keyon Jie 2019-04-12 260 static int hda_link_p= cm_prepare(struct snd_pcm_substream *substream, > > fdd961e37e47f2 Keyon Jie 2019-04-12 261 = struct snd_soc_dai *dai) > > fdd961e37e47f2 Keyon Jie 2019-04-12 262 { > > ed3baacd76baa0 Ranjani Sridharan 2019-04-30 263 struct hdac_ext_s= tream *link_dev =3D > > ed3baacd76baa0 Ranjani Sridharan 2019-04-30 264 = snd_soc_dai_get_dma_data(dai, substream); > > fdd961e37e47f2 Keyon Jie 2019-04-12 @265 struct snd_sof_de= v *sdev =3D > > fdd961e37e47f2 Keyon Jie 2019-04-12 266 = snd_soc_component_get_drvdata(dai->component); > > 1205300af9dba3 Kuninori Morimoto 2020-07-20 267 struct snd_soc_pc= m_runtime *rtd =3D asoc_substream_to_rtd(substream); > > fdd961e37e47f2 Keyon Jie 2019-04-12 268 int stream =3D su= bstream->stream; > > fdd961e37e47f2 Keyon Jie 2019-04-12 269 > > a3ebccb52efdfb Kai Vehmanen 2019-07-22 270 if (link_dev->lin= k_prepared) > > fdd961e37e47f2 Keyon Jie 2019-04-12 271 return 0; > > fdd961e37e47f2 Keyon Jie 2019-04-12 272 > > ed3baacd76baa0 Ranjani Sridharan 2019-04-30 273 dev_dbg(sdev->dev= , "hda: prepare stream dir %d\n", substream->stream); > > fdd961e37e47f2 Keyon Jie 2019-04-12 274 > > fdd961e37e47f2 Keyon Jie 2019-04-12 275 return hda_link_h= w_params(substream, &rtd->dpcm[stream].hw_params, > > fdd961e37e47f2 Keyon Jie 2019-04-12 276 = dai); > > fdd961e37e47f2 Keyon Jie 2019-04-12 277 } > > fdd961e37e47f2 Keyon Jie 2019-04-12 278 > > The sdev variable is used in the dev_dbg() log, this looks legit to me? Perhaps that depends on a config that was not set? The log does say this is a randconfig build. -- = Thanks, ~Nick Desaulniers --===============8529486521525126103==--