Re: [PATCH] Bluetooth: Add support for virtio transport driver

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

 



Hi Marcel,

I love your patch! Yet something to improve:

[auto build test ERROR on bluetooth-next/master]
[also build test ERROR on linus/master v5.12-rc6 next-20210406]
[cannot apply to bluetooth/master]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Marcel-Holtmann/Bluetooth-Add-support-for-virtio-transport-driver/20210406-221514
base:   https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git master
config: um-allmodconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
        # https://github.com/0day-ci/linux/commit/189912fb9343a7f898dbab721e7c4a70957e235b
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Marcel-Holtmann/Bluetooth-Add-support-for-virtio-transport-driver/20210406-221514
        git checkout 189912fb9343a7f898dbab721e7c4a70957e235b
        # save the attached .config to linux build tree
        make W=1 ARCH=um 

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

All errors (new ones prefixed by >>):

   cc1: warning: arch/um/include/uapi: No such file or directory [-Wmissing-include-dirs]
   drivers/bluetooth/virtio_bt.c: In function 'virtbt_probe':
>> drivers/bluetooth/virtio_bt.c:343:3: error: implicit declaration of function 'hci_set_aosp_capable'; did you mean 'lmp_transp_capable'? [-Werror=implicit-function-declaration]
     343 |   hci_set_aosp_capable(hdev);
         |   ^~~~~~~~~~~~~~~~~~~~
         |   lmp_transp_capable
   cc1: some warnings being treated as errors


vim +343 drivers/bluetooth/virtio_bt.c

   240	
   241	static int virtbt_probe(struct virtio_device *vdev)
   242	{
   243		vq_callback_t *callbacks[VIRTBT_NUM_VQS] = {
   244			[VIRTBT_VQ_TX] = virtbt_tx_done,
   245			[VIRTBT_VQ_RX] = virtbt_rx_done,
   246		};
   247		const char *names[VIRTBT_NUM_VQS] = {
   248			[VIRTBT_VQ_TX] = "tx",
   249			[VIRTBT_VQ_RX] = "rx",
   250		};
   251		struct virtio_bluetooth *vbt;
   252		struct hci_dev *hdev;
   253		int err;
   254		__u8 type;
   255	
   256		if (!virtio_has_feature(vdev, VIRTIO_F_VERSION_1))
   257			return -ENODEV;
   258	
   259		type = virtio_cread8(vdev, offsetof(struct virtio_bt_config, type));
   260	
   261		switch (type) {
   262		case VIRTIO_BT_CONFIG_TYPE_PRIMARY:
   263		case VIRTIO_BT_CONFIG_TYPE_AMP:
   264			break;
   265		default:
   266			return -EINVAL;
   267		}
   268	
   269		vbt = kzalloc(sizeof(*vbt), GFP_KERNEL);
   270		if (!vbt)
   271			return -ENOMEM;
   272	
   273		vdev->priv = vbt;
   274		vbt->vdev = vdev;
   275	
   276		INIT_WORK(&vbt->rx, virtbt_rx_work);
   277	
   278		err = virtio_find_vqs(vdev, VIRTBT_NUM_VQS, vbt->vqs, callbacks,
   279				      names, NULL);
   280		if (err)
   281			return err;
   282	
   283		hdev = hci_alloc_dev();
   284		if (!hdev) {
   285			err = -ENOMEM;
   286			goto failed;
   287		}
   288	
   289		vbt->hdev = hdev;
   290	
   291		hdev->bus = HCI_VIRTIO;
   292		hdev->dev_type = type;
   293		hci_set_drvdata(hdev, vbt);
   294	
   295		hdev->open  = virtbt_open;
   296		hdev->close = virtbt_close;
   297		hdev->flush = virtbt_flush;
   298		hdev->send  = virtbt_send_frame;
   299	
   300		if (virtio_has_feature(vdev, VIRTIO_BT_F_VND_HCI)) {
   301			__u16 vendor;
   302	
   303			virtio_cread(vdev, struct virtio_bt_config, vendor, &vendor);
   304	
   305			switch (vendor) {
   306			case VIRTIO_BT_CONFIG_VENDOR_ZEPHYR:
   307				hdev->manufacturer = 1521;
   308				hdev->setup = virtbt_setup_zephyr;
   309				hdev->shutdown = virtbt_shutdown_generic;
   310				hdev->set_bdaddr = virtbt_set_bdaddr_zephyr;
   311				break;
   312	
   313			case VIRTIO_BT_CONFIG_VENDOR_INTEL:
   314				hdev->manufacturer = 2;
   315				hdev->setup = virtbt_setup_intel;
   316				hdev->shutdown = virtbt_shutdown_generic;
   317				hdev->set_bdaddr = virtbt_set_bdaddr_intel;
   318				set_bit(HCI_QUIRK_STRICT_DUPLICATE_FILTER, &hdev->quirks);
   319				set_bit(HCI_QUIRK_SIMULTANEOUS_DISCOVERY, &hdev->quirks);
   320				set_bit(HCI_QUIRK_WIDEBAND_SPEECH_SUPPORTED, &hdev->quirks);
   321				break;
   322	
   323			case VIRTIO_BT_CONFIG_VENDOR_REALTEK:
   324				hdev->manufacturer = 93;
   325				hdev->setup = virtbt_setup_realtek;
   326				hdev->shutdown = virtbt_shutdown_generic;
   327				set_bit(HCI_QUIRK_SIMULTANEOUS_DISCOVERY, &hdev->quirks);
   328				set_bit(HCI_QUIRK_WIDEBAND_SPEECH_SUPPORTED, &hdev->quirks);
   329				break;
   330			}
   331		}
   332	
   333		if (virtio_has_feature(vdev, VIRTIO_BT_F_MSFT_EXT)) {
   334			__u16 msft_opcode;
   335	
   336			virtio_cread(vdev, struct virtio_bt_config,
   337				     msft_opcode, &msft_opcode);
   338	
   339			hci_set_msft_opcode(hdev, msft_opcode);
   340		}
   341	
   342		if (virtio_has_feature(vdev, VIRTIO_BT_F_AOSP_EXT))
 > 343			hci_set_aosp_capable(hdev);
   344	
   345		if (hci_register_dev(hdev) < 0) {
   346			hci_free_dev(hdev);
   347			err = -EBUSY;
   348			goto failed;
   349		}
   350	
   351		return 0;
   352	
   353	failed:
   354		vdev->config->del_vqs(vdev);
   355		return err;
   356	}
   357	

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

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux