Re: [PATCH v4 3/3] Bluetooth: btqcomsmd: retieve BD address from DT

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

 



Hi Loic,

[auto build test WARNING on robh/for-next]
[also build test WARNING on v4.13]
[cannot apply to bluetooth-next/master next-20170907]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Loic-Poulain/dt-bindings-soc-qcom-Add-local-bd-address-property-to-WCNSS-BT/20170908-102410
base:   https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
config: xtensa-allyesconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 4.9.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=xtensa 

All warnings (new ones prefixed by >>):

   drivers//bluetooth/btqcomsmd.c: In function 'btqcomsmd_probe':
>> drivers//bluetooth/btqcomsmd.c:160:3: warning: passing argument 2 of 'baswap' discards 'const' qualifier from pointer target type
      baswap(&btq->bdaddr, local_bd_addr);
      ^
   In file included from drivers//bluetooth/btqcomsmd.c:23:0:
   include/net/bluetooth/bluetooth.h:236:6: note: expected 'struct bdaddr_t *' but argument is of type 'const struct bdaddr_t *'
    void baswap(bdaddr_t *dst, bdaddr_t *src);
         ^

vim +160 drivers//bluetooth/btqcomsmd.c

   128	
   129	static int btqcomsmd_probe(struct platform_device *pdev)
   130	{
   131		const bdaddr_t *local_bd_addr;
   132		struct btqcomsmd *btq;
   133		struct hci_dev *hdev;
   134		void *wcnss;
   135		int ret;
   136	
   137		btq = devm_kzalloc(&pdev->dev, sizeof(*btq), GFP_KERNEL);
   138		if (!btq)
   139			return -ENOMEM;
   140	
   141		wcnss = dev_get_drvdata(pdev->dev.parent);
   142	
   143		btq->acl_channel = qcom_wcnss_open_channel(wcnss, "APPS_RIVA_BT_ACL",
   144							   btqcomsmd_acl_callback, btq);
   145		if (IS_ERR(btq->acl_channel))
   146			return PTR_ERR(btq->acl_channel);
   147	
   148		btq->cmd_channel = qcom_wcnss_open_channel(wcnss, "APPS_RIVA_BT_CMD",
   149							   btqcomsmd_cmd_callback, btq);
   150		if (IS_ERR(btq->cmd_channel))
   151			return PTR_ERR(btq->cmd_channel);
   152	
   153		/* The local-bd-address DT property is usually injected by the
   154		 * bootloader which has access to the allocated BD address.
   155		 */
   156		local_bd_addr = of_get_property(pdev->dev.of_node, "local-mac-address",
   157						&ret);
   158		if (local_bd_addr && ret == sizeof(bdaddr_t)) {
   159			/* local-bd-address stored with most significant byte first */
 > 160			baswap(&btq->bdaddr, local_bd_addr);
   161			BT_INFO("BD address %pMR retrieved from device-tree",
   162				&btq->bdaddr);
   163		}
   164	
   165		hdev = hci_alloc_dev();
   166		if (!hdev)
   167			return -ENOMEM;
   168	
   169		hci_set_drvdata(hdev, btq);
   170		btq->hdev = hdev;
   171		SET_HCIDEV_DEV(hdev, &pdev->dev);
   172	
   173		hdev->bus = HCI_SMD;
   174		hdev->open = btqcomsmd_open;
   175		hdev->close = btqcomsmd_close;
   176		hdev->send = btqcomsmd_send;
   177		hdev->setup = btqcomsmd_setup;
   178		hdev->set_bdaddr = qca_set_bdaddr_rome;
   179	
   180		ret = hci_register_dev(hdev);
   181		if (ret < 0) {
   182			hci_free_dev(hdev);
   183			return ret;
   184		}
   185	
   186		platform_set_drvdata(pdev, btq);
   187	
   188		return 0;
   189	}
   190	

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

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