* [freescale-fslc:6.6-2.0.x-imx 156/16788] sound/soc/fsl/fsl_asrc_m2m.c:353:5: warning: no previous prototype for 'fsl_asrc_process_buffer_pre'
@ 2024-09-28 14:11 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-09-28 14:11 UTC (permalink / raw)
To: Otavio Salvador; +Cc: oe-kbuild-all
tree: https://github.com/Freescale/linux-fslc 6.6-2.0.x-imx
head: ac32ba5fe66266329914d2020570364afe217bec
commit: b88e99c737817b3a29441a12515a0b568094044f [156/16788] MLK-11398: ASoC: fsl_asrc: Add Memory to Memory support
config: xtensa-allyesconfig (https://download.01.org/0day-ci/archive/20240928/202409282200.4bbhjkac-lkp@intel.com/config)
compiler: xtensa-linux-gcc (GCC) 14.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240928/202409282200.4bbhjkac-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/202409282200.4bbhjkac-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from sound/soc/fsl/fsl_asrc.c:973:
>> sound/soc/fsl/fsl_asrc_m2m.c:353:5: warning: no previous prototype for 'fsl_asrc_process_buffer_pre' [-Wmissing-prototypes]
353 | int fsl_asrc_process_buffer_pre(struct completion *complete,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
>> sound/soc/fsl/fsl_asrc_m2m.c:375:5: warning: no previous prototype for 'fsl_asrc_process_buffer' [-Wmissing-prototypes]
375 | int fsl_asrc_process_buffer(struct fsl_asrc_pair *pair,
| ^~~~~~~~~~~~~~~~~~~~~~~
sound/soc/fsl/fsl_asrc_m2m.c: In function 'fsl_asrc_calc_last_period_size':
sound/soc/fsl/fsl_asrc_m2m.c:673:22: warning: variable 'out_length' set but not used [-Wunused-but-set-variable]
673 | unsigned int out_length;
| ^~~~~~~~~~
sound/soc/fsl/fsl_asrc_m2m.c: In function 'fsl_asrc_m2m_resume':
sound/soc/fsl/fsl_asrc_m2m.c:1040:30: warning: variable 'm2m' set but not used [-Wunused-but-set-variable]
1040 | struct fsl_asrc_m2m *m2m;
| ^~~
vim +/fsl_asrc_process_buffer_pre +353 sound/soc/fsl/fsl_asrc_m2m.c
352
> 353 int fsl_asrc_process_buffer_pre(struct completion *complete,
354 enum asrc_pair_index index, bool dir)
355 {
356 if (!wait_for_completion_interruptible_timeout(complete, 10 * HZ)) {
357 pr_err("%sput DMA task timeout\n", DIR_STR(dir));
358 return -ETIME;
359 } else if (signal_pending(current)) {
360 pr_err("%sput task forcibly aborted\n", DIR_STR(dir));
361 return -ERESTARTSYS;
362 }
363
364 return 0;
365 }
366
367 #define mxc_asrc_dma_umap(dev, m2m) \
368 do { \
369 dma_unmap_sg(dev, m2m->sg[IN], m2m->sg_nodes[IN], \
370 DMA_TO_DEVICE); \
371 dma_unmap_sg(dev, m2m->sg[OUT], m2m->sg_nodes[OUT], \
372 DMA_FROM_DEVICE); \
373 } while (0)
374
> 375 int fsl_asrc_process_buffer(struct fsl_asrc_pair *pair,
376 struct asrc_convert_buffer *pbuf)
377 {
378 struct fsl_asrc *asrc = pair->asrc;
379 struct fsl_asrc_m2m *m2m = pair->private_m2m;
380 enum asrc_pair_index index = pair->index;
381 unsigned long lock_flags;
382 int ret;
383
384 /* Check input task first */
385 ret = fsl_asrc_process_buffer_pre(&m2m->complete[IN], index, IN);
386 if (ret) {
387 mxc_asrc_dma_umap(&asrc->pdev->dev, m2m);
388 return ret;
389 }
390
391 /* ...then output task*/
392 ret = fsl_asrc_process_buffer_pre(&m2m->complete[OUT], index, OUT);
393 if (ret) {
394 mxc_asrc_dma_umap(&asrc->pdev->dev, m2m);
395 return ret;
396 }
397
398 mxc_asrc_dma_umap(&asrc->pdev->dev, m2m);
399
400 /* Fetch the remaining data */
401 spin_lock_irqsave(&m2m->lock, lock_flags);
402 if (!m2m->pair_hold) {
403 spin_unlock_irqrestore(&m2m->lock, lock_flags);
404 return -EFAULT;
405 }
406 spin_unlock_irqrestore(&m2m->lock, lock_flags);
407
408 fsl_asrc_read_last_FIFO(pair);
409
410 /* Update final lengths after getting last FIFO */
411 pbuf->input_buffer_length = m2m->dma_block[IN].length;
412 pbuf->output_buffer_length = m2m->dma_block[OUT].length;
413
414 if (copy_to_user((void __user *)pbuf->output_buffer_vaddr,
415 m2m->dma_block[OUT].dma_vaddr,
416 m2m->dma_block[OUT].length))
417 return -EFAULT;
418
419 return 0;
420 }
421
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-09-28 14:11 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-28 14:11 [freescale-fslc:6.6-2.0.x-imx 156/16788] sound/soc/fsl/fsl_asrc_m2m.c:353:5: warning: no previous prototype for 'fsl_asrc_process_buffer_pre' kernel test robot
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.