[linux-next:master 9712/11791] sound/virtio/virtio_chmap.c:66:9: sparse: sparse: no generic selection for 'restricted __le32 virtio_cread_v'

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

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   ff90dfd2579b2c7bc1f0baa0cb99c918c6c1ec64
commit: bd80b5294a0d7da5debd5886cab55a7b96993992 [9712/11791] ALSA: virtio: introduce PCM channel map support
config: microblaze-randconfig-s031-20210219 (attached as .config)
compiler: microblaze-linux-gcc (GCC) 9.3.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.3-229-g60c1f270-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=bd80b5294a0d7da5debd5886cab55a7b96993992
        git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
        git fetch --no-tags linux-next master
        git checkout bd80b5294a0d7da5debd5886cab55a7b96993992
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=microblaze 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <rong.a.chen@xxxxxxxxx>


"sparse warnings: (new ones prefixed by >>)"
>> sound/virtio/virtio_chmap.c:66:9: sparse: sparse: no generic selection for 'restricted __le32 virtio_cread_v'
>> sound/virtio/virtio_chmap.c:66:9: sparse: sparse: incompatible types in comparison expression (different base types):
>> sound/virtio/virtio_chmap.c:66:9: sparse:    bad type *
>> sound/virtio/virtio_chmap.c:66:9: sparse:    unsigned int *
>> sound/virtio/virtio_chmap.c:66:9: sparse: sparse: no generic selection for 'restricted __le32 [addressable] virtio_cread_v'

vim +66 sound/virtio/virtio_chmap.c

bd80b5294a0d7d Anton Yakovlev 2021-02-09   50  
bd80b5294a0d7d Anton Yakovlev 2021-02-09   51  /**
bd80b5294a0d7d Anton Yakovlev 2021-02-09   52   * virtsnd_chmap_parse_cfg() - Parse the channel map configuration.
bd80b5294a0d7d Anton Yakovlev 2021-02-09   53   * @snd: VirtIO sound device.
bd80b5294a0d7d Anton Yakovlev 2021-02-09   54   *
bd80b5294a0d7d Anton Yakovlev 2021-02-09   55   * This function is called during initial device initialization.
bd80b5294a0d7d Anton Yakovlev 2021-02-09   56   *
bd80b5294a0d7d Anton Yakovlev 2021-02-09   57   * Context: Any context that permits to sleep.
bd80b5294a0d7d Anton Yakovlev 2021-02-09   58   * Return: 0 on success, -errno on failure.
bd80b5294a0d7d Anton Yakovlev 2021-02-09   59   */
bd80b5294a0d7d Anton Yakovlev 2021-02-09   60  int virtsnd_chmap_parse_cfg(struct virtio_snd *snd)
bd80b5294a0d7d Anton Yakovlev 2021-02-09   61  {
bd80b5294a0d7d Anton Yakovlev 2021-02-09   62  	struct virtio_device *vdev = snd->vdev;
bd80b5294a0d7d Anton Yakovlev 2021-02-09   63  	unsigned int i;
bd80b5294a0d7d Anton Yakovlev 2021-02-09   64  	int rc;
bd80b5294a0d7d Anton Yakovlev 2021-02-09   65  
bd80b5294a0d7d Anton Yakovlev 2021-02-09  @66  	virtio_cread(vdev, struct virtio_snd_config, chmaps, &snd->nchmaps);
bd80b5294a0d7d Anton Yakovlev 2021-02-09   67  	if (!snd->nchmaps)
bd80b5294a0d7d Anton Yakovlev 2021-02-09   68  		return 0;
bd80b5294a0d7d Anton Yakovlev 2021-02-09   69  
bd80b5294a0d7d Anton Yakovlev 2021-02-09   70  	snd->chmaps = devm_kcalloc(&vdev->dev, snd->nchmaps,
bd80b5294a0d7d Anton Yakovlev 2021-02-09   71  				   sizeof(*snd->chmaps), GFP_KERNEL);
bd80b5294a0d7d Anton Yakovlev 2021-02-09   72  	if (!snd->chmaps)
bd80b5294a0d7d Anton Yakovlev 2021-02-09   73  		return -ENOMEM;
bd80b5294a0d7d Anton Yakovlev 2021-02-09   74  
bd80b5294a0d7d Anton Yakovlev 2021-02-09   75  	rc = virtsnd_ctl_query_info(snd, VIRTIO_SND_R_CHMAP_INFO, 0,
bd80b5294a0d7d Anton Yakovlev 2021-02-09   76  				    snd->nchmaps, sizeof(*snd->chmaps),
bd80b5294a0d7d Anton Yakovlev 2021-02-09   77  				    snd->chmaps);
bd80b5294a0d7d Anton Yakovlev 2021-02-09   78  	if (rc)
bd80b5294a0d7d Anton Yakovlev 2021-02-09   79  		return rc;
bd80b5294a0d7d Anton Yakovlev 2021-02-09   80  
bd80b5294a0d7d Anton Yakovlev 2021-02-09   81  	/* Count the number of channel maps per each PCM device/stream. */
bd80b5294a0d7d Anton Yakovlev 2021-02-09   82  	for (i = 0; i < snd->nchmaps; ++i) {
bd80b5294a0d7d Anton Yakovlev 2021-02-09   83  		struct virtio_snd_chmap_info *info = &snd->chmaps[i];
bd80b5294a0d7d Anton Yakovlev 2021-02-09   84  		unsigned int nid = le32_to_cpu(info->hdr.hda_fn_nid);
bd80b5294a0d7d Anton Yakovlev 2021-02-09   85  		struct virtio_pcm *vpcm;
bd80b5294a0d7d Anton Yakovlev 2021-02-09   86  		struct virtio_pcm_stream *vs;
bd80b5294a0d7d Anton Yakovlev 2021-02-09   87  
bd80b5294a0d7d Anton Yakovlev 2021-02-09   88  		vpcm = virtsnd_pcm_find_or_create(snd, nid);
bd80b5294a0d7d Anton Yakovlev 2021-02-09   89  		if (IS_ERR(vpcm))
bd80b5294a0d7d Anton Yakovlev 2021-02-09   90  			return PTR_ERR(vpcm);
bd80b5294a0d7d Anton Yakovlev 2021-02-09   91  
bd80b5294a0d7d Anton Yakovlev 2021-02-09   92  		switch (info->direction) {
bd80b5294a0d7d Anton Yakovlev 2021-02-09   93  		case VIRTIO_SND_D_OUTPUT:
bd80b5294a0d7d Anton Yakovlev 2021-02-09   94  			vs = &vpcm->streams[SNDRV_PCM_STREAM_PLAYBACK];
bd80b5294a0d7d Anton Yakovlev 2021-02-09   95  			break;
bd80b5294a0d7d Anton Yakovlev 2021-02-09   96  		case VIRTIO_SND_D_INPUT:
bd80b5294a0d7d Anton Yakovlev 2021-02-09   97  			vs = &vpcm->streams[SNDRV_PCM_STREAM_CAPTURE];
bd80b5294a0d7d Anton Yakovlev 2021-02-09   98  			break;
bd80b5294a0d7d Anton Yakovlev 2021-02-09   99  		default:
bd80b5294a0d7d Anton Yakovlev 2021-02-09  100  			dev_err(&vdev->dev,
bd80b5294a0d7d Anton Yakovlev 2021-02-09  101  				"chmap #%u: unknown direction (%u)\n", i,
bd80b5294a0d7d Anton Yakovlev 2021-02-09  102  				info->direction);
bd80b5294a0d7d Anton Yakovlev 2021-02-09  103  			return -EINVAL;
bd80b5294a0d7d Anton Yakovlev 2021-02-09  104  		}
bd80b5294a0d7d Anton Yakovlev 2021-02-09  105  
bd80b5294a0d7d Anton Yakovlev 2021-02-09  106  		vs->nchmaps++;
bd80b5294a0d7d Anton Yakovlev 2021-02-09  107  	}
bd80b5294a0d7d Anton Yakovlev 2021-02-09  108  
bd80b5294a0d7d Anton Yakovlev 2021-02-09  109  	return 0;
bd80b5294a0d7d Anton Yakovlev 2021-02-09  110  }
bd80b5294a0d7d Anton Yakovlev 2021-02-09  111  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip

_______________________________________________
kbuild mailing list -- kbuild@xxxxxxxxxxxx
To unsubscribe send an email to kbuild-leave@xxxxxxxxxxxx

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux