Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: jsarha@ti.com
Cc: alsa-devel@alsa-project.org
Subject: Re: ASoC: davinci-mcasp: Choose PCM driver based on configured DMA controller
Date: Thu, 11 Jun 2015 18:06:06 +0300	[thread overview]
Message-ID: <20150611150605.GB12192@mwanda> (raw)

Hello Jyri Sarha,

The patch 9fbd58cf4ab0: "ASoC: davinci-mcasp: Choose PCM driver based
on configured DMA controller" from Jun 2, 2015, leads to the
following static checker warning:

	sound/soc/davinci/davinci-mcasp.c:1842 davinci_mcasp_probe()
	info: ignoring unreachable code.

sound/soc/davinci/davinci-mcasp.c
  1812          switch (ret) {
  1813          case PCM_EDMA:
  1814  #if IS_BUILTIN(CONFIG_SND_EDMA_SOC) || \
  1815          (IS_MODULE(CONFIG_SND_DAVINCI_SOC_MCASP) && \
  1816           IS_MODULE(CONFIG_SND_EDMA_SOC))
  1817                  ret = edma_pcm_platform_register(&pdev->dev);
  1818  #else
  1819                  dev_err(&pdev->dev, "Missing SND_EDMA_SOC\n");
  1820                  ret = -EINVAL;
  1821                  goto err;
  1822  #endif
  1823                  break;
  1824          case PCM_SDMA:
  1825  #if IS_BUILTIN(CONFIG_SND_OMAP_SOC) || \
  1826          (IS_MODULE(CONFIG_SND_DAVINCI_SOC_MCASP) && \
  1827           IS_MODULE(CONFIG_SND_OMAP_SOC))
  1828                  ret = omap_pcm_platform_register(&pdev->dev);
  1829  #else
  1830                  dev_err(&pdev->dev, "Missing SND_SDMA_SOC\n");
  1831                  ret = -EINVAL;
  1832                  goto err;
  1833  #endif
  1834                  break;
  1835          default:
  1836                  dev_err(&pdev->dev, "No DMA controller found (%d)\n", ret);
  1837          case -EPROBE_DEFER:
  1838                  goto err;
  1839                  break;
  1840          }
  1841  

Depending on the ifdefs then this is reachable, I guess...

  1842          if (ret) {
  1843                  dev_err(&pdev->dev, "register PCM failed: %d\n", ret);
  1844                  goto err;
  1845          }
  1846  
  1847          return 0;
  1848  
  1849  err:
  1850          pm_runtime_disable(&pdev->dev);
  1851          return ret;
  1852  }
  1853  

regards,
dan carpenter

             reply	other threads:[~2015-06-11 15:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-11 15:06 Dan Carpenter [this message]
2015-06-11 19:05 ` ASoC: davinci-mcasp: Choose PCM driver based on configured DMA controller Jyri Sarha

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=20150611150605.GB12192@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=jsarha@ti.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox