Re: [PATCH] Add Support to use Resolving List

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

 



Hi,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[cannot apply to v5.3-rc6 next-20190829]
[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/spoorthix-k-intel-com/Add-Support-to-use-Resolving-List/20190830-003531
config: m68k-allmodconfig (attached as .config)
compiler: m68k-linux-gcc (GCC) 7.4.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
        GCC_VERSION=7.4.0 make.cross ARCH=m68k 

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

All warnings (new ones prefixed by >>):

   net/bluetooth/hci_request.c: In function 'update_resolve_list':
>> net/bluetooth/hci_request.c:735:1: warning: no return statement in function returning non-void [-Wreturn-type]
    }
    ^
   net/bluetooth/hci_request.c: In function 'hci_req_add_le_passive_scan':
>> net/bluetooth/hci_request.c:684:25: warning: 'params' may be used uninitialized in this function [-Wmaybe-uninitialized]
     cp.bdaddr_type = params->addr_type;
                      ~~~~~~^~~~~~~~~~~
   net/bluetooth/hci_request.c:694:26: note: 'params' was declared here
     struct hci_conn_params *params;
                             ^~~~~~

vim +735 net/bluetooth/hci_request.c

   672	
   673	static void add_to_resolve_list(struct hci_request *req,
   674					struct hci_conn_params *params)
   675	{
   676		struct hci_cp_le_add_to_resolv_list cp;
   677		struct bdaddr_list_with_irk *entry;
   678	
   679		entry = kzalloc(sizeof(*entry), GFP_KERNEL);
   680		if (!entry)
   681			return;
   682		memset(&cp, 0, sizeof(cp));
   683	
 > 684		cp.bdaddr_type = params->addr_type;
   685		bacpy(&cp.bdaddr, &params->addr);
   686		memcpy(entry->peer_irk, cp.peer_irk, 16);
   687		memcpy(entry->local_irk, cp.local_irk, 16);
   688		hci_req_add(req, HCI_OP_LE_ADD_TO_RESOLV_LIST, sizeof(cp), &cp);
   689	}
   690	
   691	static u8 update_resolve_list(struct hci_request *req)
   692	{
   693		struct hci_dev *hdev = req->hdev;
   694		struct hci_conn_params *params;
   695		struct bdaddr_list *b;
   696		int err;
   697		u8 resolve_list_entries = 0;
   698	
   699		list_for_each_entry(b, &hdev->le_resolv_list, list) {
   700			/* Cannot Remove or add the device to the Resolving list
   701			 * whenever there is an outstanding connection.
   702			 */
   703			if (!hci_pend_le_action_lookup(&hdev->pend_le_conns,
   704						       &b->bdaddr, b->bdaddr_type) &&
   705			    !hci_pend_le_action_lookup(&hdev->pend_le_reports,
   706						       &b->bdaddr, b->bdaddr_type)) {
   707				struct hci_cp_le_del_from_resolv_list cp;
   708	
   709				cp.bdaddr_type = b->bdaddr_type;
   710				bacpy(&cp.bdaddr, &b->bdaddr);
   711	
   712				hci_req_add(req, HCI_OP_LE_DEL_FROM_RESOLV_LIST,
   713					    sizeof(cp), &cp);
   714				continue;
   715			}
   716	
   717			if (hci_find_irk_by_addr(hdev, &b->bdaddr, b->bdaddr_type)) {
   718				/* Add device to resolving list */
   719				resolve_list_entries++;
   720				add_to_resolve_list(req, params);
   721			}
   722	
   723			if (hci_bdaddr_list_lookup(&hdev->le_resolv_list,
   724						   &params->addr, params->addr_type))
   725				continue;
   726	
   727			if (resolve_list_entries >= hdev->le_resolv_list_size) {
   728				err = smp_generate_rpa(hdev, hdev->irk, &hdev->rpa);
   729				if (err < 0)
   730					BT_ERR("%s failed to generate new RPA",
   731					       hdev->name);
   732			}
   733			resolve_list_entries++;
   734		}
 > 735	}
   736	

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