Re: [PATCH v4 2/3] Bluetooth: hci_qca: Add support for Qualcomm Bluetooth chip wcn3990.

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

 



Hi Balakrishna,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on bluetooth-next/master]
[also build test ERROR on next-20180504]
[cannot apply to bluetooth/master v4.17-rc3]
[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/Balakrishna-Godavarthi/dt-bindings-net-bluetooth-Add-device-tree-bindings-for-QTI-chip-wcn3990/20180506-004430
base:   https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git master
config: x86_64-randconfig-x014-201818 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-16) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

Note: the linux-review/Balakrishna-Godavarthi/dt-bindings-net-bluetooth-Add-device-tree-bindings-for-QTI-chip-wcn3990/20180506-004430 HEAD 8ea35b4e8656709a14f0170188ef9004ac96b4ac builds fine.
      It only hurts bisectibility.

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

   drivers//bluetooth/hci_qca.c: In function 'qca_open':
>> drivers//bluetooth/hci_qca.c:512:4: error: implicit declaration of function 'btqca_power_setup'; did you mean 'ether_setup'? [-Werror=implicit-function-declaration]
       btqca_power_setup(true);
       ^~~~~~~~~~~~~~~~~
       ether_setup
   drivers//bluetooth/hci_qca.c: In function 'qca_close':
>> drivers//bluetooth/hci_qca.c:604:4: error: implicit declaration of function 'qca_btsoc_cleanup'; did you mean 'hci_sock_cleanup'? [-Werror=implicit-function-declaration]
       qca_btsoc_cleanup(hu->hdev);
       ^~~~~~~~~~~~~~~~~
       hci_sock_cleanup
   drivers//bluetooth/hci_qca.c: In function 'qca_send_poweron_cmd':
>> drivers//bluetooth/hci_qca.c:988:8: error: 'CHEROKEE_POWERON_PULSE' undeclared (first use in this function)
     cmd = CHEROKEE_POWERON_PULSE;
           ^~~~~~~~~~~~~~~~~~~~~~
   drivers//bluetooth/hci_qca.c:988:8: note: each undeclared identifier is reported only once for each function it appears in
   drivers//bluetooth/hci_qca.c: In function 'qca_send_poweroff_cmd':
>> drivers//bluetooth/hci_qca.c:1018:8: error: 'CHEROKEE_POWEROFF_PULSE' undeclared (first use in this function)
     cmd = CHEROKEE_POWEROFF_PULSE;
           ^~~~~~~~~~~~~~~~~~~~~~~
   drivers//bluetooth/hci_qca.c: In function 'qca_setup':
>> drivers//bluetooth/hci_qca.c:1144:9: error: implicit declaration of function 'rome_patch_ver_req'; did you mean 'blk_path_error'? [-Werror=implicit-function-declaration]
      ret = rome_patch_ver_req(hdev, &soc_ver);
            ^~~~~~~~~~~~~~~~~~
            blk_path_error
>> drivers//bluetooth/hci_qca.c:1182:9: error: implicit declaration of function 'qca_uart_setup_cherokee'; did you mean 'qca_uart_setup_rome'? [-Werror=implicit-function-declaration]
      ret = qca_uart_setup_cherokee(hdev, qca_baudrate, &soc_ver);
            ^~~~~~~~~~~~~~~~~~~~~~~
            qca_uart_setup_rome
   drivers//bluetooth/hci_qca.c: At top level:
>> drivers//bluetooth/hci_qca.c:1308:5: error: conflicting types for 'btqca_power_setup'
    int btqca_power_setup(bool on)
        ^~~~~~~~~~~~~~~~~
   drivers//bluetooth/hci_qca.c:1309:1: note: an argument type that has a default promotion can't match an empty parameter name list declaration
    {
    ^
   drivers//bluetooth/hci_qca.c:512:4: note: previous implicit declaration of 'btqca_power_setup' was here
       btqca_power_setup(true);
       ^~~~~~~~~~~~~~~~~
   drivers//bluetooth/hci_qca.c: In function 'btqca_power_setup':
>> drivers//bluetooth/hci_qca.c:1346:3: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
      if (vregs[i].load_ua)
      ^~
   drivers//bluetooth/hci_qca.c:1349:4: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
       btqca_disable_regulators(i+1, vregs);
       ^~~~~~~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors

vim +512 drivers//bluetooth/hci_qca.c

   442	
   443	/* Initialize protocol */
   444	static int qca_open(struct hci_uart *hu)
   445	{
   446		struct qca_serdev *qcadev;
   447		struct qca_data *qca;
   448	
   449		BT_DBG("hu %p qca_open", hu);
   450	
   451		qca = kzalloc(sizeof(struct qca_data), GFP_ATOMIC);
   452		if (!qca)
   453			return -ENOMEM;
   454	
   455		skb_queue_head_init(&qca->txq);
   456		skb_queue_head_init(&qca->tx_wait_q);
   457		spin_lock_init(&qca->hci_ibs_lock);
   458		qca->workqueue = alloc_ordered_workqueue("qca_wq", 0);
   459		if (!qca->workqueue) {
   460			BT_ERR("QCA Workqueue not initialized properly");
   461			kfree(qca);
   462			return -ENOMEM;
   463		}
   464	
   465		INIT_WORK(&qca->ws_awake_rx, qca_wq_awake_rx);
   466		INIT_WORK(&qca->ws_awake_device, qca_wq_awake_device);
   467		INIT_WORK(&qca->ws_rx_vote_off, qca_wq_serial_rx_clock_vote_off);
   468		INIT_WORK(&qca->ws_tx_vote_off, qca_wq_serial_tx_clock_vote_off);
   469	
   470		qca->hu = hu;
   471	
   472		/* Assume we start with both sides asleep -- extra wakes OK */
   473		qca->tx_ibs_state = HCI_IBS_TX_ASLEEP;
   474		qca->rx_ibs_state = HCI_IBS_RX_ASLEEP;
   475	
   476		/* clocks actually on, but we start votes off */
   477		qca->tx_vote = false;
   478		qca->rx_vote = false;
   479		qca->flags = 0;
   480	
   481		qca->ibs_sent_wacks = 0;
   482		qca->ibs_sent_slps = 0;
   483		qca->ibs_sent_wakes = 0;
   484		qca->ibs_recv_wacks = 0;
   485		qca->ibs_recv_slps = 0;
   486		qca->ibs_recv_wakes = 0;
   487		qca->vote_last_jif = jiffies;
   488		qca->vote_on_ms = 0;
   489		qca->vote_off_ms = 0;
   490		qca->votes_on = 0;
   491		qca->votes_off = 0;
   492		qca->tx_votes_on = 0;
   493		qca->tx_votes_off = 0;
   494		qca->rx_votes_on = 0;
   495		qca->rx_votes_off = 0;
   496	
   497		hu->priv = qca;
   498	
   499		timer_setup(&qca->wake_retrans_timer, hci_ibs_wake_retrans_timeout, 0);
   500		qca->wake_retrans = IBS_WAKE_RETRANS_TIMEOUT_MS;
   501	
   502		timer_setup(&qca->tx_idle_timer, hci_ibs_tx_idle_timeout, 0);
   503		qca->tx_idle_delay = IBS_TX_IDLE_TIMEOUT_MS;
   504	
   505		if (hu->serdev) {
   506			serdev_device_open(hu->serdev);
   507	
   508			qcadev = serdev_device_get_drvdata(hu->serdev);
   509			if (qcadev->btsoc_type == BTQCA_CHEROKEE) {
   510				hu->init_speed = qcadev->init_speed;
   511				hu->oper_speed = qcadev->oper_speed;
 > 512				btqca_power_setup(true);
   513			} else
   514				gpiod_set_value_cansleep(qcadev->bt_en, 1);
   515		}
   516	
   517		BT_DBG("HCI_UART_QCA open, tx_idle_delay=%u, wake_retrans=%u",
   518		       qca->tx_idle_delay, qca->wake_retrans);
   519	
   520		return 0;
   521	}
   522	
   523	static void qca_debugfs_init(struct hci_dev *hdev)
   524	{
   525		struct hci_uart *hu = hci_get_drvdata(hdev);
   526		struct qca_data *qca = hu->priv;
   527		struct dentry *ibs_dir;
   528		umode_t mode;
   529	
   530		if (!hdev->debugfs)
   531			return;
   532	
   533		ibs_dir = debugfs_create_dir("ibs", hdev->debugfs);
   534	
   535		/* read only */
   536		mode = S_IRUGO;
   537		debugfs_create_u8("tx_ibs_state", mode, ibs_dir, &qca->tx_ibs_state);
   538		debugfs_create_u8("rx_ibs_state", mode, ibs_dir, &qca->rx_ibs_state);
   539		debugfs_create_u64("ibs_sent_sleeps", mode, ibs_dir,
   540				   &qca->ibs_sent_slps);
   541		debugfs_create_u64("ibs_sent_wakes", mode, ibs_dir,
   542				   &qca->ibs_sent_wakes);
   543		debugfs_create_u64("ibs_sent_wake_acks", mode, ibs_dir,
   544				   &qca->ibs_sent_wacks);
   545		debugfs_create_u64("ibs_recv_sleeps", mode, ibs_dir,
   546				   &qca->ibs_recv_slps);
   547		debugfs_create_u64("ibs_recv_wakes", mode, ibs_dir,
   548				   &qca->ibs_recv_wakes);
   549		debugfs_create_u64("ibs_recv_wake_acks", mode, ibs_dir,
   550				   &qca->ibs_recv_wacks);
   551		debugfs_create_bool("tx_vote", mode, ibs_dir, &qca->tx_vote);
   552		debugfs_create_u64("tx_votes_on", mode, ibs_dir, &qca->tx_votes_on);
   553		debugfs_create_u64("tx_votes_off", mode, ibs_dir, &qca->tx_votes_off);
   554		debugfs_create_bool("rx_vote", mode, ibs_dir, &qca->rx_vote);
   555		debugfs_create_u64("rx_votes_on", mode, ibs_dir, &qca->rx_votes_on);
   556		debugfs_create_u64("rx_votes_off", mode, ibs_dir, &qca->rx_votes_off);
   557		debugfs_create_u64("votes_on", mode, ibs_dir, &qca->votes_on);
   558		debugfs_create_u64("votes_off", mode, ibs_dir, &qca->votes_off);
   559		debugfs_create_u32("vote_on_ms", mode, ibs_dir, &qca->vote_on_ms);
   560		debugfs_create_u32("vote_off_ms", mode, ibs_dir, &qca->vote_off_ms);
   561	
   562		/* read/write */
   563		mode = S_IRUGO | S_IWUSR;
   564		debugfs_create_u32("wake_retrans", mode, ibs_dir, &qca->wake_retrans);
   565		debugfs_create_u32("tx_idle_delay", mode, ibs_dir,
   566				   &qca->tx_idle_delay);
   567	}
   568	
   569	/* Flush protocol data */
   570	static int qca_flush(struct hci_uart *hu)
   571	{
   572		struct qca_data *qca = hu->priv;
   573	
   574		BT_DBG("hu %p qca flush", hu);
   575	
   576		skb_queue_purge(&qca->tx_wait_q);
   577		skb_queue_purge(&qca->txq);
   578	
   579		return 0;
   580	}
   581	
   582	/* Close protocol */
   583	static int qca_close(struct hci_uart *hu)
   584	{
   585		struct qca_serdev *qcadev;
   586		struct qca_data *qca = hu->priv;
   587	
   588		BT_DBG("hu %p qca close", hu);
   589	
   590		serial_clock_vote(HCI_IBS_VOTE_STATS_UPDATE, hu);
   591	
   592		skb_queue_purge(&qca->tx_wait_q);
   593		skb_queue_purge(&qca->txq);
   594		del_timer(&qca->tx_idle_timer);
   595		del_timer(&qca->wake_retrans_timer);
   596		destroy_workqueue(qca->workqueue);
   597		qca->hu = NULL;
   598	
   599		if (hu->serdev) {
   600			serdev_device_close(hu->serdev);
   601	
   602			qcadev = serdev_device_get_drvdata(hu->serdev);
   603			if (qcadev->btsoc_type == BTQCA_CHEROKEE)
 > 604				qca_btsoc_cleanup(hu->hdev);
   605			else
   606				gpiod_set_value_cansleep(qcadev->bt_en, 0);
   607		}
   608	
   609		kfree_skb(qca->rx_skb);
   610	
   611		hu->priv = NULL;
   612	
   613		kfree(qca);
   614	
   615		return 0;
   616	}
   617	

---
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