lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202311160326.ADEJ1JLw-lkp@intel.com>
Date:   Thu, 16 Nov 2023 03:23:13 +0800
From:   kernel test robot <lkp@...el.com>
To:     Srinivas Kandagatla <srinivas.kandagatla@...aro.org>
Cc:     llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
        linux-kernel@...r.kernel.org, Mark Brown <broonie@...nel.org>,
        Pierre-Louis Bossart <pierre-louis.bossart@...ux.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 *)') ...

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@...el.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ