[sound:topic/memory-device-fixes 83/83] drivers/media/pci/solo6x10/solo6x10-g723.c:363:6: error: void value not ignored as it ought to be

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git topic/memory-device-fixes
head:   c898c3496b8e5c583e874bbfbbcba3d185cac051
commit: c898c3496b8e5c583e874bbfbbcba3d185cac051 [83/83] ALSA: pcm: Define snd_pcm_lib_preallocate_*() as returning void
config: x86_64-allmodconfig (attached as .config)
compiler: gcc-8 (Debian 8.2.0-14) 8.2.0
reproduce:
        git checkout c898c3496b8e5c583e874bbfbbcba3d185cac051
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All error/warnings (new ones prefixed by >>):

>> drivers/media/pci/solo6x10/solo6x10-g723.c:363:13: sparse: warning: incorrect type in assignment (different base types)
   drivers/media/pci/solo6x10/solo6x10-g723.c:363:13: sparse:    expected int [assigned] ret
   drivers/media/pci/solo6x10/solo6x10-g723.c:363:13: sparse:    got void
--
   drivers/media/pci/solo6x10/solo6x10-g723.c: In function 'solo_snd_pcm_init':
>> drivers/media/pci/solo6x10/solo6x10-g723.c:363:6: error: void value not ignored as it ought to be
     ret = snd_pcm_lib_preallocate_pages_for_all(pcm,
         ^
--
>> drivers/media/pci/tw686x/tw686x-audio.c:304:53: sparse: warning: incorrect type in return expression (different base types)
   drivers/media/pci/tw686x/tw686x-audio.c:304:53: sparse:    expected int
   drivers/media/pci/tw686x/tw686x-audio.c:304:53: sparse:    got void
--
   drivers/media/pci/tw686x/tw686x-audio.c: In function 'tw686x_snd_pcm_init':
>> drivers/media/pci/tw686x/tw686x-audio.c:304:9: error: void value not ignored as it ought to be
     return snd_pcm_lib_preallocate_pages_for_all(pcm,
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        SNDRV_DMA_TYPE_DEV,
        ~~~~~~~~~~~~~~~~~~~
        snd_dma_pci_data(dev->pci_dev),
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        TW686X_AUDIO_PAGE_MAX * AUDIO_DMA_SIZE_MAX,
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        TW686X_AUDIO_PAGE_MAX * AUDIO_DMA_SIZE_MAX);
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/media/pci/tw686x/tw686x-audio.c:309:1: warning: control reaches end of non-void function [-Wreturn-type]
    }
    ^

sparse warnings: (new ones prefixed by >>)

   drivers/media/pci/solo6x10/solo6x10-g723.c:363:13: sparse: warning: incorrect type in assignment (different base types)
>> drivers/media/pci/solo6x10/solo6x10-g723.c:363:13: sparse:    expected int [assigned] ret
>> drivers/media/pci/solo6x10/solo6x10-g723.c:363:13: sparse:    got void
--
   drivers/media/pci/tw686x/tw686x-audio.c:304:53: sparse: warning: incorrect type in return expression (different base types)
>> drivers/media/pci/tw686x/tw686x-audio.c:304:53: sparse:    expected int
>> drivers/media/pci/tw686x/tw686x-audio.c:304:53: sparse:    got void

vim +363 drivers/media/pci/solo6x10/solo6x10-g723.c

faa4fd2a drivers/staging/solo6x10/solo6010-g723.c   Ben Collins           2010-06-17  338  
decebabf drivers/staging/solo6x10/g723.c            Krzysztof Hałasa      2011-02-11  339  static int solo_snd_pcm_init(struct solo_dev *solo_dev)
faa4fd2a drivers/staging/solo6x10/solo6010-g723.c   Ben Collins           2010-06-17  340  {
faa4fd2a drivers/staging/solo6x10/solo6010-g723.c   Ben Collins           2010-06-17  341  	struct snd_card *card = solo_dev->snd_card;
faa4fd2a drivers/staging/solo6x10/solo6010-g723.c   Ben Collins           2010-06-17  342  	struct snd_pcm *pcm;
faa4fd2a drivers/staging/solo6x10/solo6010-g723.c   Ben Collins           2010-06-17  343  	struct snd_pcm_substream *ss;
faa4fd2a drivers/staging/solo6x10/solo6010-g723.c   Ben Collins           2010-06-17  344  	int ret;
faa4fd2a drivers/staging/solo6x10/solo6010-g723.c   Ben Collins           2010-06-17  345  	int i;
faa4fd2a drivers/staging/solo6x10/solo6010-g723.c   Ben Collins           2010-06-17  346  
faa4fd2a drivers/staging/solo6x10/solo6010-g723.c   Ben Collins           2010-06-17  347  	ret = snd_pcm_new(card, card->driver, 0, 0, solo_dev->nr_chans,
faa4fd2a drivers/staging/solo6x10/solo6010-g723.c   Ben Collins           2010-06-17  348  			  &pcm);
faa4fd2a drivers/staging/solo6x10/solo6010-g723.c   Ben Collins           2010-06-17  349  	if (ret < 0)
faa4fd2a drivers/staging/solo6x10/solo6010-g723.c   Ben Collins           2010-06-17  350  		return ret;
faa4fd2a drivers/staging/solo6x10/solo6010-g723.c   Ben Collins           2010-06-17  351  
faa4fd2a drivers/staging/solo6x10/solo6010-g723.c   Ben Collins           2010-06-17  352  	snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE,
faa4fd2a drivers/staging/solo6x10/solo6010-g723.c   Ben Collins           2010-06-17  353  			&snd_solo_pcm_ops);
faa4fd2a drivers/staging/solo6x10/solo6010-g723.c   Ben Collins           2010-06-17  354  
faa4fd2a drivers/staging/solo6x10/solo6010-g723.c   Ben Collins           2010-06-17  355  	snd_pcm_chip(pcm) = solo_dev;
faa4fd2a drivers/staging/solo6x10/solo6010-g723.c   Ben Collins           2010-06-17  356  	pcm->info_flags = 0;
cc1e6315 drivers/media/pci/solo6x10/solo6x10-g723.c Mauro Carvalho Chehab 2018-09-10  357  	strscpy(pcm->name, card->shortname, sizeof(pcm->name));
faa4fd2a drivers/staging/solo6x10/solo6010-g723.c   Ben Collins           2010-06-17  358  
faa4fd2a drivers/staging/solo6x10/solo6010-g723.c   Ben Collins           2010-06-17  359  	for (i = 0, ss = pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream;
faa4fd2a drivers/staging/solo6x10/solo6010-g723.c   Ben Collins           2010-06-17  360  	     ss; ss = ss->next, i++)
faa4fd2a drivers/staging/solo6x10/solo6010-g723.c   Ben Collins           2010-06-17  361  		sprintf(ss->name, "Camera #%d Audio", i);
faa4fd2a drivers/staging/solo6x10/solo6010-g723.c   Ben Collins           2010-06-17  362  
faa4fd2a drivers/staging/solo6x10/solo6010-g723.c   Ben Collins           2010-06-17 @363  	ret = snd_pcm_lib_preallocate_pages_for_all(pcm,
faa4fd2a drivers/staging/solo6x10/solo6010-g723.c   Ben Collins           2010-06-17  364  					SNDRV_DMA_TYPE_CONTINUOUS,
faa4fd2a drivers/staging/solo6x10/solo6010-g723.c   Ben Collins           2010-06-17  365  					snd_dma_continuous_data(GFP_KERNEL),
9d1b1f61 drivers/media/pci/solo6x10/solo6x10-g723.c Krzysztof Hałasa      2015-06-08  366  					G723_PERIOD_BYTES * PERIODS,
9d1b1f61 drivers/media/pci/solo6x10/solo6x10-g723.c Krzysztof Hałasa      2015-06-08  367  					G723_PERIOD_BYTES * PERIODS);
faa4fd2a drivers/staging/solo6x10/solo6010-g723.c   Ben Collins           2010-06-17  368  	if (ret < 0)
faa4fd2a drivers/staging/solo6x10/solo6010-g723.c   Ben Collins           2010-06-17  369  		return ret;
faa4fd2a drivers/staging/solo6x10/solo6010-g723.c   Ben Collins           2010-06-17  370  
faa4fd2a drivers/staging/solo6x10/solo6010-g723.c   Ben Collins           2010-06-17  371  	solo_dev->snd_pcm = pcm;
faa4fd2a drivers/staging/solo6x10/solo6010-g723.c   Ben Collins           2010-06-17  372  
faa4fd2a drivers/staging/solo6x10/solo6010-g723.c   Ben Collins           2010-06-17  373  	return 0;
faa4fd2a drivers/staging/solo6x10/solo6010-g723.c   Ben Collins           2010-06-17  374  }
faa4fd2a drivers/staging/solo6x10/solo6010-g723.c   Ben Collins           2010-06-17  375  

:::::: The code at line 363 was first introduced by commit
:::::: faa4fd2a09517b39cc1f5d622453f97a59acfdac Staging: solo6x10: New driver (staging) for Softlogic 6x10

:::::: TO: Ben Collins <bcollins@xxxxxxxxxxxxxx>
:::::: CC: Greg Kroah-Hartman <gregkh@xxxxxxx>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip

_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux