All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nick Desaulniers <ndesaulniers@google.com>
To: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Cc: kernel test robot <lkp@intel.com>,
	clang-built-linux@googlegroups.com, kbuild-all@lists.01.org,
	linux-kernel@vger.kernel.org, Takashi Iwai <tiwai@suse.de>,
	Kai Vehmanen <kai.vehmanen@linux.intel.com>,
	Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>,
	Bard Liao <bard.liao@intel.com>
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	[thread overview]
Message-ID: <CAKwvOdm9-O=qcaexQ1+quRCXg6HZsABhDm=XQTfD841FL2m4Zg@mail.gmail.com> (raw)
In-Reply-To: <77ba5fc1-2bfa-0e9f-525c-dc260642c7ab@linux.intel.com>

On Tue, Aug 24, 2021 at 9:53 AM Pierre-Louis Bossart
<pierre-louis.bossart@linux.intel.com> 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

WARNING: multiple messages have this Message-ID (diff)
From: Nick Desaulniers <ndesaulniers@google.com>
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	[thread overview]
Message-ID: <CAKwvOdm9-O=qcaexQ1+quRCXg6HZsABhDm=XQTfD841FL2m4Zg@mail.gmail.com> (raw)
In-Reply-To: <77ba5fc1-2bfa-0e9f-525c-dc260642c7ab@linux.intel.com>

[-- Attachment #1: Type: text/plain, Size: 2592 bytes --]

On Tue, Aug 24, 2021 at 9:53 AM Pierre-Louis Bossart
<pierre-louis.bossart@linux.intel.com> 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

  reply	other threads:[~2021-08-25 23:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-24  5:05 sound/soc/sof/intel/hda-dai.c:265:22: warning: Value stored to 'sdev' during its initialization is never read [clang-analyzer-deadcode.DeadStores] kernel test robot
2021-08-24  5:05 ` kernel test robot
2021-08-24 16:40 ` Pierre-Louis Bossart
2021-08-24 16:40   ` Pierre-Louis Bossart
2021-08-25 23:04   ` Nick Desaulniers [this message]
2021-08-25 23:04     ` Nick Desaulniers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAKwvOdm9-O=qcaexQ1+quRCXg6HZsABhDm=XQTfD841FL2m4Zg@mail.gmail.com' \
    --to=ndesaulniers@google.com \
    --cc=bard.liao@intel.com \
    --cc=clang-built-linux@googlegroups.com \
    --cc=guennadi.liakhovetski@linux.intel.com \
    --cc=kai.vehmanen@linux.intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.