All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	linux-kernel@vger.kernel.org, Mark Brown <broonie@kernel.org>,
	Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Subject: sound/soc/qcom/qdsp6/q6apm-dai.c:251:38: warning: cast from 'void (*)(uint32_t, uint32_t, uint32_t *, void *)' (aka 'void (*)(unsigned int, unsigned int, unsigned int *, void *)') to 'q6apm_cb' (aka 'void (*)(unsigned int, unsigned int, void *, void *)') ...
Date: Thu, 16 Nov 2023 03:23:13 +0800	[thread overview]
Message-ID: <202311160326.ADEJ1JLw-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   c42d9eeef8e5ba9292eda36fd8e3c11f35ee065c
commit: 9b4fe0f1cd791d540100d98a3baf94c1f9994647 ASoC: qdsp6: audioreach: add q6apm-dai support
date:   2 years, 1 month ago
config: hexagon-allmodconfig (https://download.01.org/0day-ci/archive/20231116/202311160326.ADEJ1JLw-lkp@intel.com/config)
compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project.git 4a5ac14ee968ff0ad5d2cc1ffa0299048db4c88a)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231116/202311160326.ADEJ1JLw-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202311160326.ADEJ1JLw-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> sound/soc/qcom/qdsp6/q6apm-dai.c:251:38: warning: cast from 'void (*)(uint32_t, uint32_t, uint32_t *, void *)' (aka 'void (*)(unsigned int, unsigned int, unsigned int *, void *)') to 'q6apm_cb' (aka 'void (*)(unsigned int, unsigned int, void *, void *)') converts to incompatible function type [-Wcast-function-type-strict]
     251 |         prtd->graph = q6apm_graph_open(dev, (q6apm_cb)event_handler, prtd, graph_id);
         |                                             ^~~~~~~~~~~~~~~~~~~~~~~
   1 warning generated.


vim +251 sound/soc/qcom/qdsp6/q6apm-dai.c

   226	
   227	static int q6apm_dai_open(struct snd_soc_component *component,
   228				  struct snd_pcm_substream *substream)
   229	{
   230		struct snd_pcm_runtime *runtime = substream->runtime;
   231		struct snd_soc_pcm_runtime *soc_prtd = substream->private_data;
   232		struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(soc_prtd, 0);
   233		struct device *dev = component->dev;
   234		struct q6apm_dai_data *pdata;
   235		struct q6apm_dai_rtd *prtd;
   236		int graph_id, ret;
   237	
   238		graph_id = cpu_dai->driver->id;
   239	
   240		pdata = snd_soc_component_get_drvdata(component);
   241		if (!pdata) {
   242			dev_err(dev, "Drv data not found ..\n");
   243			return -EINVAL;
   244		}
   245	
   246		prtd = kzalloc(sizeof(*prtd), GFP_KERNEL);
   247		if (prtd == NULL)
   248			return -ENOMEM;
   249	
   250		prtd->substream = substream;
 > 251		prtd->graph = q6apm_graph_open(dev, (q6apm_cb)event_handler, prtd, graph_id);
   252		if (IS_ERR(prtd->graph)) {
   253			dev_err(dev, "%s: Could not allocate memory\n", __func__);
   254			ret = PTR_ERR(prtd->graph);
   255			goto err;
   256		}
   257	
   258		if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
   259			runtime->hw = q6apm_dai_hardware_playback;
   260		else if (substream->stream == SNDRV_PCM_STREAM_CAPTURE)
   261			runtime->hw = q6apm_dai_hardware_capture;
   262	
   263		/* Ensure that buffer size is a multiple of period size */
   264		ret = snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS);
   265		if (ret < 0) {
   266			dev_err(dev, "snd_pcm_hw_constraint_integer failed\n");
   267			goto err;
   268		}
   269	
   270		if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
   271			ret = snd_pcm_hw_constraint_minmax(runtime, SNDRV_PCM_HW_PARAM_BUFFER_BYTES,
   272							   BUFFER_BYTES_MIN, BUFFER_BYTES_MAX);
   273			if (ret < 0) {
   274				dev_err(dev, "constraint for buffer bytes min max ret = %d\n", ret);
   275				goto err;
   276			}
   277		}
   278	
   279		ret = snd_pcm_hw_constraint_step(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_BYTES, 32);
   280		if (ret < 0) {
   281			dev_err(dev, "constraint for period bytes step ret = %d\n", ret);
   282			goto err;
   283		}
   284	
   285		ret = snd_pcm_hw_constraint_step(runtime, 0, SNDRV_PCM_HW_PARAM_BUFFER_BYTES, 32);
   286		if (ret < 0) {
   287			dev_err(dev, "constraint for buffer bytes step ret = %d\n", ret);
   288			goto err;
   289		}
   290	
   291		runtime->private_data = prtd;
   292		runtime->dma_bytes = BUFFER_BYTES_MAX;
   293		if (pdata->sid < 0)
   294			prtd->phys = substream->dma_buffer.addr;
   295		else
   296			prtd->phys = substream->dma_buffer.addr | (pdata->sid << 32);
   297	
   298		return 0;
   299	err:
   300		kfree(prtd);
   301	
   302		return ret;
   303	}
   304	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

                 reply	other threads:[~2023-11-15 19:25 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202311160326.ADEJ1JLw-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=broonie@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=srinivas.kandagatla@linaro.org \
    /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.