bluetooth: Use list_head for hci blacklist head.
Subsystems (2)
PATCH 1/1 bluetooth: Use list_head for hci blacklist head.
The bdaddr in the list root is completely unused and just taking up space.
include/net/bluetooth/hci_core.h +1 -1
@@ -132,7 +132,7 @@ struct hci_dev {struct inquiry_cache inq_cache;struct hci_conn_hash conn_hash; -struct bdaddr_list blacklist; +struct list_head blacklist;struct hci_dev_stats stat;
net/bluetooth/hci_core.c +1 -1
@@ -924,7 +924,7 @@ int hci_register_dev(struct hci_dev *hdev)hci_conn_hash_init (hdev); -INIT_LIST_HEAD (&hdev->blacklist.list); +INIT_LIST_HEAD (&hdev->blacklist);memset (&hdev->stat,0 ,sizeof (struct hci_dev_stats ));
net/bluetooth/hci_sock.c +3 -5
@@ -168,9 +168,8 @@ static int hci_sock_release(struct socket *sock)struct bdaddr_list *hci_blacklist_lookup (struct hci_dev *hdev,bdaddr_t *bdaddr) {struct list_head *p; -struct bdaddr_list *blacklist = &hdev->blacklist; -list_for_each (p, &blacklist->list) { +list_for_each (p, &hdev->blacklist) {struct bdaddr_list *b; b = list_entry(p, struct bdaddr_list, list);
@@ -202,7 +201,7 @@ static int hci_blacklist_add(struct hci_dev *hdev, void __user *arg)bacpy (&entry->bdaddr, &bdaddr); -list_add (&entry->list, &hdev->blacklist.list); +list_add (&entry->list, &hdev->blacklist);return 0 ; }
@@ -210,9 +209,8 @@ static int hci_blacklist_add(struct hci_dev *hdev, void __user *arg)int hci_blacklist_clear (struct hci_dev *hdev) {struct list_head *p, *n; -struct bdaddr_list *blacklist = &hdev->blacklist; -list_for_each_safe (p, n, &blacklist->list) { +list_for_each_safe (p, n, &hdev->blacklist) {struct bdaddr_list *b; b = list_entry(p, struct bdaddr_list, list);
net/bluetooth/hci_sysfs.c +1 -2
@@ -439,12 +439,11 @@ static const struct file_operations inquiry_cache_fops = {static int blacklist_show (struct seq_file *f,void *p) {struct hci_dev *hdev = f->private; -struct bdaddr_list *blacklist = &hdev->blacklist;struct list_head *l;hci_dev_lock_bh (hdev); -list_for_each (l, &blacklist->list) { +list_for_each (l, &hdev->blacklist) {struct bdaddr_list *b;bdaddr_t bdaddr;
Hi Dave,
Quoted 4 lines
The bdaddr in the list root is completely unused and just taking up space.
Signed-off-by David S. Miller <[email protected]>
looks fine to me.
in case you wanna add it directly to net-next-2.6 tree.
Johan, wanna do a quick test-run of this patch and add Tested-by.
Regards
Marcel
Johan Hedberg
Tested-byHi,
Quoted 5 lines · Marcel Holtmann
Quoted 4 lines
The bdaddr in the list root is completely unused and just taking up space.
Signed-off-by David S. Miller <[email protected]>
Quoted 7 lines
looks fine to me.
Acked-by Marcel Holtmann <[email protected]>in case you wanna add it directly to net-next-2.6 tree.
Johan, wanna do a quick test-run of this patch and add Tested-by.
Seems to work fine.
Johan
Marcel Holtmann
maintainerHi Johan,
Quoted 9 lines
Quoted 9 lines
Quoted 4 lines
The bdaddr in the list root is completely unused and just taking up space.
Signed-off-by David S. Miller <[email protected]>looks fine to me.
Acked-by Marcel Holtmann <[email protected]>
Quoted 7 lines
Quoted 3 lines
in case you wanna add it directly to net-next-2.6 tree.
Johan, wanna do a quick test-run of this patch and add Tested-by.
Seems to work fine.
Tested-by Johan Hedberg <[email protected]>
thanks.
Dave, I have put the patch into my tree now and will send it to John shortly. I think it is better that way for the Bluetooth 3.0 guys that are rebasing against wireless-next-2.6.
Regards
Marcel
From: Marcel Holtmann <[email protected]>
Date: Sat, 31 Jul 2010 16:08:34 -0700
Quoted 3 lines
Dave, I have put the patch into my tree now and will send it to John shortly. I think it is better that way for the Bluetooth 3.0 guys that are rebasing against wireless-next-2.6.
Sounds great.