Re: [PATCH] Bluetooth: Use hci_conn_hash_lookup_le

2016-05-02 Thread Julia Lawall
On Mon, 2 May 2016, Johan Hedberg wrote: > Hi, > > On Fri, Apr 29, 2016, Julia Lawall wrote: > > --- a/net/bluetooth/mgmt.c > > +++ b/net/bluetooth/mgmt.c > > @@ -4773,7 +4773,8 @@ static int get_conn_info(struct sock *sk, struct > > hci_dev *hdev, void *data, > > conn = hci_conn_h

Re: [PATCH] Bluetooth: Use hci_conn_hash_lookup_le

2016-05-02 Thread Johan Hedberg
Hi, On Fri, Apr 29, 2016, Julia Lawall wrote: > --- a/net/bluetooth/mgmt.c > +++ b/net/bluetooth/mgmt.c > @@ -4773,7 +4773,8 @@ static int get_conn_info(struct sock *sk, struct > hci_dev *hdev, void *data, > conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, >

[PATCH] Bluetooth: Use hci_conn_hash_lookup_le

2016-04-29 Thread Julia Lawall
Use the function hci_conn_hash_lookup_le that integrates type testing for looking up LE connections. See the patch 1b51c7b6 that introduced this function for more details. The semantic patch that (sort of) fixes this problem is as follows: (http://coccinelle.lip6.fr/) // @@ expression hdev,addr