summaryrefslogtreecommitdiff
path: root/net/bluetooth
diff options
context:
space:
mode:
Diffstat (limited to 'net/bluetooth')
-rw-r--r--net/bluetooth/6lowpan.c2
-rw-r--r--net/bluetooth/cmtp/capi.c2
-rw-r--r--net/bluetooth/cmtp/core.c2
-rw-r--r--net/bluetooth/hci_conn.c12
-rw-r--r--net/bluetooth/hci_core.c20
-rw-r--r--net/bluetooth/hci_sync.c10
-rw-r--r--net/bluetooth/hidp/core.c2
-rw-r--r--net/bluetooth/iso.c2
-rw-r--r--net/bluetooth/l2cap_core.c2
-rw-r--r--net/bluetooth/mgmt.c10
-rw-r--r--net/bluetooth/mgmt_util.c4
-rw-r--r--net/bluetooth/msft.c8
-rw-r--r--net/bluetooth/rfcomm/core.c2
-rw-r--r--net/bluetooth/rfcomm/tty.c2
-rw-r--r--net/bluetooth/sco.c2
-rw-r--r--net/bluetooth/smp.c6
16 files changed, 44 insertions, 44 deletions
diff --git a/net/bluetooth/6lowpan.c b/net/bluetooth/6lowpan.c
index acaf7c9e4a69..2f03b780b40d 100644
--- a/net/bluetooth/6lowpan.c
+++ b/net/bluetooth/6lowpan.c
@@ -1107,7 +1107,7 @@ static int lowpan_enable_set(void *data, u64 val)
{
struct set_enable *set_enable;
- set_enable = kzalloc_obj(*set_enable, GFP_KERNEL);
+ set_enable = kzalloc_obj(*set_enable);
if (!set_enable)
return -ENOMEM;
diff --git a/net/bluetooth/cmtp/capi.c b/net/bluetooth/cmtp/capi.c
index df4edd43176e..b95413bffa16 100644
--- a/net/bluetooth/cmtp/capi.c
+++ b/net/bluetooth/cmtp/capi.c
@@ -72,7 +72,7 @@
static struct cmtp_application *cmtp_application_add(struct cmtp_session *session, __u16 appl)
{
- struct cmtp_application *app = kzalloc_obj(*app, GFP_KERNEL);
+ struct cmtp_application *app = kzalloc_obj(*app);
BT_DBG("session %p application %p appl %u", session, app, appl);
diff --git a/net/bluetooth/cmtp/core.c b/net/bluetooth/cmtp/core.c
index ebfa049598dc..261aeeda3236 100644
--- a/net/bluetooth/cmtp/core.c
+++ b/net/bluetooth/cmtp/core.c
@@ -341,7 +341,7 @@ int cmtp_add_connection(struct cmtp_connadd_req *req, struct socket *sock)
if (req->flags & ~valid_flags)
return -EINVAL;
- session = kzalloc_obj(struct cmtp_session, GFP_KERNEL);
+ session = kzalloc_obj(struct cmtp_session);
if (!session)
return -ENOMEM;
diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c
index 02d33fe11042..4719dac07190 100644
--- a/net/bluetooth/hci_conn.c
+++ b/net/bluetooth/hci_conn.c
@@ -462,7 +462,7 @@ bool hci_setup_sync(struct hci_conn *conn, __u16 handle)
struct conn_handle_t *conn_handle;
if (enhanced_sync_conn_capable(conn->hdev)) {
- conn_handle = kzalloc_obj(*conn_handle, GFP_KERNEL);
+ conn_handle = kzalloc_obj(*conn_handle);
if (!conn_handle)
return false;
@@ -726,7 +726,7 @@ static int hci_le_terminate_big(struct hci_dev *hdev, struct hci_conn *conn)
bt_dev_dbg(hdev, "big 0x%2.2x bis 0x%2.2x", conn->iso_qos.bcast.big,
conn->iso_qos.bcast.bis);
- d = kzalloc_obj(*d, GFP_KERNEL);
+ d = kzalloc_obj(*d);
if (!d)
return -ENOMEM;
@@ -777,7 +777,7 @@ static int hci_le_big_terminate(struct hci_dev *hdev, struct hci_conn *conn)
bt_dev_dbg(hdev, "hcon %p big 0x%2.2x sync_handle 0x%4.4x", conn,
conn->iso_qos.bcast.big, conn->sync_handle);
- d = kzalloc_obj(*d, GFP_KERNEL);
+ d = kzalloc_obj(*d);
if (!d)
return -ENOMEM;
@@ -960,7 +960,7 @@ static struct hci_conn *__hci_conn_add(struct hci_dev *hdev, int type,
bt_dev_dbg(hdev, "dst %pMR handle 0x%4.4x", dst, handle);
- conn = kzalloc_obj(*conn, GFP_KERNEL);
+ conn = kzalloc_obj(*conn);
if (!conn)
return ERR_PTR(-ENOMEM);
@@ -1739,7 +1739,7 @@ static struct hci_link *hci_conn_link(struct hci_conn *parent,
if (conn->parent)
return NULL;
- link = kzalloc_obj(*link, GFP_KERNEL);
+ link = kzalloc_obj(*link);
if (!link)
return NULL;
@@ -2781,7 +2781,7 @@ struct hci_chan *hci_chan_create(struct hci_conn *conn)
return NULL;
}
- chan = kzalloc_obj(*chan, GFP_KERNEL);
+ chan = kzalloc_obj(*chan);
if (!chan)
return NULL;
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index a0cad792be0b..7094f80de24e 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -262,7 +262,7 @@ u32 hci_inquiry_cache_update(struct hci_dev *hdev, struct inquiry_data *data,
}
/* Entry not in the cache. Add new one. */
- ie = kzalloc_obj(*ie, GFP_KERNEL);
+ ie = kzalloc_obj(*ie);
if (!ie) {
flags |= MGMT_DEV_FOUND_CONFIRM_NAME;
goto done;
@@ -1286,7 +1286,7 @@ struct link_key *hci_add_link_key(struct hci_dev *hdev, struct hci_conn *conn,
key = old_key;
} else {
old_key_type = conn ? conn->key_type : 0xff;
- key = kzalloc_obj(*key, GFP_KERNEL);
+ key = kzalloc_obj(*key);
if (!key)
return NULL;
list_add_rcu(&key->list, &hdev->link_keys);
@@ -1331,7 +1331,7 @@ struct smp_ltk *hci_add_ltk(struct hci_dev *hdev, bdaddr_t *bdaddr,
if (old_key)
key = old_key;
else {
- key = kzalloc_obj(*key, GFP_KERNEL);
+ key = kzalloc_obj(*key);
if (!key)
return NULL;
list_add_rcu(&key->list, &hdev->long_term_keys);
@@ -1356,7 +1356,7 @@ struct smp_irk *hci_add_irk(struct hci_dev *hdev, bdaddr_t *bdaddr,
irk = hci_find_irk_by_addr(hdev, bdaddr, addr_type);
if (!irk) {
- irk = kzalloc_obj(*irk, GFP_KERNEL);
+ irk = kzalloc_obj(*irk);
if (!irk)
return NULL;
@@ -1550,7 +1550,7 @@ int hci_add_remote_oob_data(struct hci_dev *hdev, bdaddr_t *bdaddr,
data = hci_find_remote_oob_data(hdev, bdaddr, bdaddr_type);
if (!data) {
- data = kmalloc_obj(*data, GFP_KERNEL);
+ data = kmalloc_obj(*data);
if (!data)
return -ENOMEM;
@@ -1718,7 +1718,7 @@ struct adv_info *hci_add_adv_instance(struct hci_dev *hdev, u8 instance,
instance < 1 || instance > hdev->le_num_of_adv_sets + 1)
return ERR_PTR(-EOVERFLOW);
- adv = kzalloc_obj(*adv, GFP_KERNEL);
+ adv = kzalloc_obj(*adv);
if (!adv)
return ERR_PTR(-ENOMEM);
@@ -2107,7 +2107,7 @@ int hci_bdaddr_list_add(struct list_head *list, bdaddr_t *bdaddr, u8 type)
if (hci_bdaddr_list_lookup(list, bdaddr, type))
return -EEXIST;
- entry = kzalloc_obj(*entry, GFP_KERNEL);
+ entry = kzalloc_obj(*entry);
if (!entry)
return -ENOMEM;
@@ -2130,7 +2130,7 @@ int hci_bdaddr_list_add_with_irk(struct list_head *list, bdaddr_t *bdaddr,
if (hci_bdaddr_list_lookup(list, bdaddr, type))
return -EEXIST;
- entry = kzalloc_obj(*entry, GFP_KERNEL);
+ entry = kzalloc_obj(*entry);
if (!entry)
return -ENOMEM;
@@ -2159,7 +2159,7 @@ int hci_bdaddr_list_add_with_flags(struct list_head *list, bdaddr_t *bdaddr,
if (hci_bdaddr_list_lookup(list, bdaddr, type))
return -EEXIST;
- entry = kzalloc_obj(*entry, GFP_KERNEL);
+ entry = kzalloc_obj(*entry);
if (!entry)
return -ENOMEM;
@@ -2276,7 +2276,7 @@ struct hci_conn_params *hci_conn_params_add(struct hci_dev *hdev,
if (params)
return params;
- params = kzalloc_obj(*params, GFP_KERNEL);
+ params = kzalloc_obj(*params);
if (!params) {
bt_dev_err(hdev, "out of memory");
return NULL;
diff --git a/net/bluetooth/hci_sync.c b/net/bluetooth/hci_sync.c
index ed5db3eb3df3..44c205ff9fa8 100644
--- a/net/bluetooth/hci_sync.c
+++ b/net/bluetooth/hci_sync.c
@@ -711,7 +711,7 @@ int hci_cmd_sync_submit(struct hci_dev *hdev, hci_cmd_sync_work_func_t func,
goto unlock;
}
- entry = kmalloc_obj(*entry, GFP_KERNEL);
+ entry = kmalloc_obj(*entry);
if (!entry) {
err = -ENOMEM;
goto unlock;
@@ -2685,7 +2685,7 @@ static struct conn_params *conn_params_copy(struct list_head *list, size_t *n)
rcu_read_unlock();
- p = kvzalloc_objs(struct conn_params, *n, GFP_KERNEL);
+ p = kvzalloc_objs(struct conn_params, *n);
if (!p)
return NULL;
@@ -7341,7 +7341,7 @@ int hci_past_sync(struct hci_conn *conn, struct hci_conn *le)
if (!past_sender_capable(conn->hdev))
return -EOPNOTSUPP;
- data = kmalloc_obj(*data, GFP_KERNEL);
+ data = kmalloc_obj(*data);
if (!data)
return -ENOMEM;
@@ -7473,7 +7473,7 @@ int hci_acl_change_pkt_type(struct hci_conn *conn, u16 pkt_type)
struct hci_dev *hdev = conn->hdev;
struct hci_cp_change_conn_ptype *cp;
- cp = kmalloc_obj(*cp, GFP_KERNEL);
+ cp = kmalloc_obj(*cp);
if (!cp)
return -ENOMEM;
@@ -7508,7 +7508,7 @@ int hci_le_set_phy(struct hci_conn *conn, u8 tx_phys, u8 rx_phys)
struct hci_dev *hdev = conn->hdev;
struct hci_cp_le_set_phy *cp;
- cp = kmalloc_obj(*cp, GFP_KERNEL);
+ cp = kmalloc_obj(*cp);
if (!cp)
return -ENOMEM;
diff --git a/net/bluetooth/hidp/core.c b/net/bluetooth/hidp/core.c
index a91d5452f24a..6fe815241b01 100644
--- a/net/bluetooth/hidp/core.c
+++ b/net/bluetooth/hidp/core.c
@@ -920,7 +920,7 @@ static int hidp_session_new(struct hidp_session **out, const bdaddr_t *bdaddr,
ctrl = bt_sk(ctrl_sock->sk);
intr = bt_sk(intr_sock->sk);
- session = kzalloc_obj(*session, GFP_KERNEL);
+ session = kzalloc_obj(*session);
if (!session)
return -ENOMEM;
diff --git a/net/bluetooth/iso.c b/net/bluetooth/iso.c
index 693271af6c22..ec61db89936b 100644
--- a/net/bluetooth/iso.c
+++ b/net/bluetooth/iso.c
@@ -212,7 +212,7 @@ static struct iso_conn *iso_conn_add(struct hci_conn *hcon)
return conn;
}
- conn = kzalloc_obj(*conn, GFP_KERNEL);
+ conn = kzalloc_obj(*conn);
if (!conn)
return NULL;
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
index 4804377781b6..2ad1cb4cbde7 100644
--- a/net/bluetooth/l2cap_core.c
+++ b/net/bluetooth/l2cap_core.c
@@ -6902,7 +6902,7 @@ static struct l2cap_conn *l2cap_conn_add(struct hci_conn *hcon)
if (!hchan)
return NULL;
- conn = kzalloc_obj(*conn, GFP_KERNEL);
+ conn = kzalloc_obj(*conn);
if (!conn) {
hci_chan_del(hchan);
return NULL;
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index c9725ca3356c..1cfe03260d50 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -2767,7 +2767,7 @@ static int add_uuid(struct sock *sk, struct hci_dev *hdev, void *data, u16 len)
goto failed;
}
- uuid = kmalloc_obj(*uuid, GFP_KERNEL);
+ uuid = kmalloc_obj(*uuid);
if (!uuid) {
err = -ENOMEM;
goto failed;
@@ -4377,7 +4377,7 @@ static int set_blocked_keys(struct sock *sk, struct hci_dev *hdev, void *data,
hci_blocked_keys_clear(hdev);
for (i = 0; i < key_count; ++i) {
- struct blocked_key *b = kzalloc_obj(*b, GFP_KERNEL);
+ struct blocked_key *b = kzalloc_obj(*b);
if (!b) {
err = MGMT_STATUS_NO_RESOURCES;
@@ -5490,7 +5490,7 @@ static u8 parse_adv_monitor_pattern(struct adv_monitor *m, u8 pattern_count,
(offset + length) > HCI_MAX_AD_LENGTH)
return MGMT_STATUS_INVALID_PARAMS;
- p = kmalloc_obj(*p, GFP_KERNEL);
+ p = kmalloc_obj(*p);
if (!p)
return MGMT_STATUS_NO_RESOURCES;
@@ -5527,7 +5527,7 @@ static int add_adv_patterns_monitor(struct sock *sk, struct hci_dev *hdev,
goto done;
}
- m = kzalloc_obj(*m, GFP_KERNEL);
+ m = kzalloc_obj(*m);
if (!m) {
status = MGMT_STATUS_NO_RESOURCES;
goto done;
@@ -5564,7 +5564,7 @@ static int add_adv_patterns_monitor_rssi(struct sock *sk, struct hci_dev *hdev,
goto done;
}
- m = kzalloc_obj(*m, GFP_KERNEL);
+ m = kzalloc_obj(*m);
if (!m) {
status = MGMT_STATUS_NO_RESOURCES;
goto done;
diff --git a/net/bluetooth/mgmt_util.c b/net/bluetooth/mgmt_util.c
index 4ed16ca8771d..4f19654d41a9 100644
--- a/net/bluetooth/mgmt_util.c
+++ b/net/bluetooth/mgmt_util.c
@@ -266,7 +266,7 @@ struct mgmt_pending_cmd *mgmt_pending_new(struct sock *sk, u16 opcode,
{
struct mgmt_pending_cmd *cmd;
- cmd = kzalloc_obj(*cmd, GFP_KERNEL);
+ cmd = kzalloc_obj(*cmd);
if (!cmd)
return NULL;
@@ -413,7 +413,7 @@ struct mgmt_mesh_tx *mgmt_mesh_add(struct sock *sk, struct hci_dev *hdev,
{
struct mgmt_mesh_tx *mesh_tx;
- mesh_tx = kzalloc_obj(*mesh_tx, GFP_KERNEL);
+ mesh_tx = kzalloc_obj(*mesh_tx);
if (!mesh_tx)
return NULL;
diff --git a/net/bluetooth/msft.c b/net/bluetooth/msft.c
index 25cde1ea5d23..2f008167cbaa 100644
--- a/net/bluetooth/msft.c
+++ b/net/bluetooth/msft.c
@@ -276,7 +276,7 @@ static int msft_le_monitor_advertisement_cb(struct hci_dev *hdev, u16 opcode,
if (status)
goto unlock;
- handle_data = kmalloc_obj(*handle_data, GFP_KERNEL);
+ handle_data = kmalloc_obj(*handle_data);
if (!handle_data) {
status = HCI_ERROR_UNSPECIFIED;
goto unlock;
@@ -756,7 +756,7 @@ void msft_register(struct hci_dev *hdev)
bt_dev_dbg(hdev, "Register MSFT extension");
- msft = kzalloc_obj(*msft, GFP_KERNEL);
+ msft = kzalloc_obj(*msft);
if (!msft) {
bt_dev_err(hdev, "Failed to register MSFT extension");
return;
@@ -790,7 +790,7 @@ static void msft_device_found(struct hci_dev *hdev, bdaddr_t *bdaddr,
{
struct monitored_device *dev;
- dev = kmalloc_obj(*dev, GFP_KERNEL);
+ dev = kmalloc_obj(*dev);
if (!dev) {
bt_dev_err(hdev, "MSFT vendor event %u: no memory",
MSFT_EV_LE_MONITOR_DEVICE);
@@ -932,7 +932,7 @@ static struct msft_monitor_addr_filter_data *msft_add_address_filter
struct msft_data *msft = hdev->msft_data;
int err;
- address_filter = kzalloc_obj(*address_filter, GFP_KERNEL);
+ address_filter = kzalloc_obj(*address_filter);
if (!address_filter)
return NULL;
diff --git a/net/bluetooth/rfcomm/core.c b/net/bluetooth/rfcomm/core.c
index d7718844c520..611a9a94151e 100644
--- a/net/bluetooth/rfcomm/core.c
+++ b/net/bluetooth/rfcomm/core.c
@@ -680,7 +680,7 @@ int rfcomm_dlc_get_modem_status(struct rfcomm_dlc *d, u8 *v24_sig)
/* ---- RFCOMM sessions ---- */
static struct rfcomm_session *rfcomm_session_add(struct socket *sock, int state)
{
- struct rfcomm_session *s = kzalloc_obj(*s, GFP_KERNEL);
+ struct rfcomm_session *s = kzalloc_obj(*s);
if (!s)
return NULL;
diff --git a/net/bluetooth/rfcomm/tty.c b/net/bluetooth/rfcomm/tty.c
index 4d8ab1a49e92..b65feeba1b30 100644
--- a/net/bluetooth/rfcomm/tty.c
+++ b/net/bluetooth/rfcomm/tty.c
@@ -221,7 +221,7 @@ static struct rfcomm_dev *__rfcomm_dev_add(struct rfcomm_dev_req *req,
struct list_head *head = &rfcomm_dev_list;
int err = 0;
- dev = kzalloc_obj(struct rfcomm_dev, GFP_KERNEL);
+ dev = kzalloc_obj(struct rfcomm_dev);
if (!dev)
return ERR_PTR(-ENOMEM);
diff --git a/net/bluetooth/sco.c b/net/bluetooth/sco.c
index 26c5c5fe7c5a..70a378ff168e 100644
--- a/net/bluetooth/sco.c
+++ b/net/bluetooth/sco.c
@@ -204,7 +204,7 @@ static struct sco_conn *sco_conn_add(struct hci_conn *hcon)
return conn;
}
- conn = kzalloc_obj(struct sco_conn, GFP_KERNEL);
+ conn = kzalloc_obj(struct sco_conn);
if (!conn)
return NULL;
diff --git a/net/bluetooth/smp.c b/net/bluetooth/smp.c
index e0e66dc95007..e67bf7b34ea7 100644
--- a/net/bluetooth/smp.c
+++ b/net/bluetooth/smp.c
@@ -1344,7 +1344,7 @@ static void smp_distribute_keys(struct smp_chan *smp)
/* Generate a new random key */
get_random_bytes(sign.csrk, sizeof(sign.csrk));
- csrk = kzalloc_obj(*csrk, GFP_KERNEL);
+ csrk = kzalloc_obj(*csrk);
if (csrk) {
if (hcon->sec_level > BT_SECURITY_MEDIUM)
csrk->type = MGMT_CSRK_LOCAL_AUTHENTICATED;
@@ -2664,7 +2664,7 @@ static int smp_cmd_sign_info(struct l2cap_conn *conn, struct sk_buff *skb)
skb_pull(skb, sizeof(*rp));
- csrk = kzalloc_obj(*csrk, GFP_KERNEL);
+ csrk = kzalloc_obj(*csrk);
if (csrk) {
if (conn->hcon->sec_level > BT_SECURITY_MEDIUM)
csrk->type = MGMT_CSRK_REMOTE_AUTHENTICATED;
@@ -3293,7 +3293,7 @@ static struct l2cap_chan *smp_add_cid(struct hci_dev *hdev, u16 cid)
goto create_chan;
}
- smp = kzalloc_obj(*smp, GFP_KERNEL);
+ smp = kzalloc_obj(*smp);
if (!smp)
return ERR_PTR(-ENOMEM);