summaryrefslogtreecommitdiff
path: root/drivers/bluetooth
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2026-02-21 16:37:42 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2026-02-21 17:09:51 -0800
commitbf4afc53b77aeaa48b5409da5c8da6bb4eff7f43 (patch)
tree01fdd9d27f1b272bef0127966e08eac44d134d0a /drivers/bluetooth
parente19e1b480ac73c3e62ffebbca1174f0f511f43e7 (diff)
Convert 'alloc_obj' family to use the new default GFP_KERNEL argument
This was done entirely with mindless brute force, using git grep -l '\<k[vmz]*alloc_objs*(.*, GFP_KERNEL)' | xargs sed -i 's/\(alloc_objs*(.*\), GFP_KERNEL)/\1)/' to convert the new alloc_obj() users that had a simple GFP_KERNEL argument to just drop that argument. Note that due to the extreme simplicity of the scripting, any slightly more complex cases spread over multiple lines would not be triggered: they definitely exist, but this covers the vast bulk of the cases, and the resulting diff is also then easier to check automatically. For the same reason the 'flex' versions will be done as a separate conversion. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/bluetooth')
-rw-r--r--drivers/bluetooth/bpa10x.c2
-rw-r--r--drivers/bluetooth/btintel.c2
-rw-r--r--drivers/bluetooth/btintel_pcie.c4
-rw-r--r--drivers/bluetooth/btmrvl_debugfs.c2
-rw-r--r--drivers/bluetooth/btmrvl_main.c4
-rw-r--r--drivers/bluetooth/btmtk.c2
-rw-r--r--drivers/bluetooth/btrsi.c2
-rw-r--r--drivers/bluetooth/btrtl.c6
-rw-r--r--drivers/bluetooth/btusb.c4
-rw-r--r--drivers/bluetooth/hci_ag6xx.c2
-rw-r--r--drivers/bluetooth/hci_aml.c2
-rw-r--r--drivers/bluetooth/hci_ath.c2
-rw-r--r--drivers/bluetooth/hci_bcm.c2
-rw-r--r--drivers/bluetooth/hci_bcsp.c2
-rw-r--r--drivers/bluetooth/hci_h4.c2
-rw-r--r--drivers/bluetooth/hci_h5.c4
-rw-r--r--drivers/bluetooth/hci_intel.c2
-rw-r--r--drivers/bluetooth/hci_ldisc.c2
-rw-r--r--drivers/bluetooth/hci_ll.c2
-rw-r--r--drivers/bluetooth/hci_mrvl.c2
-rw-r--r--drivers/bluetooth/hci_qca.c2
-rw-r--r--drivers/bluetooth/hci_vhci.c2
-rw-r--r--drivers/bluetooth/virtio_bt.c2
23 files changed, 29 insertions, 29 deletions
diff --git a/drivers/bluetooth/bpa10x.c b/drivers/bluetooth/bpa10x.c
index af7cd7b217ca..2ae38a321c4b 100644
--- a/drivers/bluetooth/bpa10x.c
+++ b/drivers/bluetooth/bpa10x.c
@@ -284,7 +284,7 @@ static int bpa10x_send_frame(struct hci_dev *hdev, struct sk_buff *skb)
switch (hci_skb_pkt_type(skb)) {
case HCI_COMMAND_PKT:
- dr = kmalloc_obj(*dr, GFP_KERNEL);
+ dr = kmalloc_obj(*dr);
if (!dr) {
usb_free_urb(urb);
return -ENOMEM;
diff --git a/drivers/bluetooth/btintel.c b/drivers/bluetooth/btintel.c
index b810c748f4d5..246b6205c5e0 100644
--- a/drivers/bluetooth/btintel.c
+++ b/drivers/bluetooth/btintel.c
@@ -871,7 +871,7 @@ struct regmap *btintel_regmap_init(struct hci_dev *hdev, u16 opcode_read,
bt_dev_info(hdev, "regmap: Init R%x-W%x region", opcode_read,
opcode_write);
- ctx = kzalloc_obj(*ctx, GFP_KERNEL);
+ ctx = kzalloc_obj(*ctx);
if (!ctx)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/bluetooth/btintel_pcie.c b/drivers/bluetooth/btintel_pcie.c
index 54a3705e9063..37b744e35bc4 100644
--- a/drivers/bluetooth/btintel_pcie.c
+++ b/drivers/bluetooth/btintel_pcie.c
@@ -1665,7 +1665,7 @@ static int btintel_pcie_setup_txq_bufs(struct btintel_pcie_data *data,
struct data_buf *buf;
/* Allocate the same number of buffers as the descriptor */
- txq->bufs = kmalloc_objs(*buf, txq->count, GFP_KERNEL);
+ txq->bufs = kmalloc_objs(*buf, txq->count);
if (!txq->bufs)
return -ENOMEM;
@@ -1709,7 +1709,7 @@ static int btintel_pcie_setup_rxq_bufs(struct btintel_pcie_data *data,
struct data_buf *buf;
/* Allocate the same number of buffers as the descriptor */
- rxq->bufs = kmalloc_objs(*buf, rxq->count, GFP_KERNEL);
+ rxq->bufs = kmalloc_objs(*buf, rxq->count);
if (!rxq->bufs)
return -ENOMEM;
diff --git a/drivers/bluetooth/btmrvl_debugfs.c b/drivers/bluetooth/btmrvl_debugfs.c
index 3ffb54501b11..9b3e768c09f4 100644
--- a/drivers/bluetooth/btmrvl_debugfs.c
+++ b/drivers/bluetooth/btmrvl_debugfs.c
@@ -144,7 +144,7 @@ void btmrvl_debugfs_init(struct hci_dev *hdev)
if (!hdev->debugfs)
return;
- dbg = kzalloc_obj(*dbg, GFP_KERNEL);
+ dbg = kzalloc_obj(*dbg);
priv->debugfs_data = dbg;
if (!dbg) {
diff --git a/drivers/bluetooth/btmrvl_main.c b/drivers/bluetooth/btmrvl_main.c
index 78be98c029bf..d6f0ad0b4b6e 100644
--- a/drivers/bluetooth/btmrvl_main.c
+++ b/drivers/bluetooth/btmrvl_main.c
@@ -710,13 +710,13 @@ struct btmrvl_private *btmrvl_add_card(void *card)
{
struct btmrvl_private *priv;
- priv = kzalloc_obj(*priv, GFP_KERNEL);
+ priv = kzalloc_obj(*priv);
if (!priv) {
BT_ERR("Can not allocate priv");
goto err_priv;
}
- priv->adapter = kzalloc_obj(*priv->adapter, GFP_KERNEL);
+ priv->adapter = kzalloc_obj(*priv->adapter);
if (!priv->adapter) {
BT_ERR("Allocate buffer for btmrvl_adapter failed!");
goto err_adapter;
diff --git a/drivers/bluetooth/btmtk.c b/drivers/bluetooth/btmtk.c
index 9e75e06607b4..fa7533578f85 100644
--- a/drivers/bluetooth/btmtk.c
+++ b/drivers/bluetooth/btmtk.c
@@ -537,7 +537,7 @@ static int btmtk_usb_submit_wmt_recv_urb(struct hci_dev *hdev)
if (!urb)
return -ENOMEM;
- dr = kmalloc_obj(*dr, GFP_KERNEL);
+ dr = kmalloc_obj(*dr);
if (!dr) {
usb_free_urb(urb);
return -ENOMEM;
diff --git a/drivers/bluetooth/btrsi.c b/drivers/bluetooth/btrsi.c
index 9710655472fe..c68dd2fba01c 100644
--- a/drivers/bluetooth/btrsi.c
+++ b/drivers/bluetooth/btrsi.c
@@ -112,7 +112,7 @@ static int rsi_hci_attach(void *priv, struct rsi_proto_ops *ops)
struct hci_dev *hdev;
int err = 0;
- h_adapter = kzalloc_obj(*h_adapter, GFP_KERNEL);
+ h_adapter = kzalloc_obj(*h_adapter);
if (!h_adapter)
return -ENOMEM;
diff --git a/drivers/bluetooth/btrtl.c b/drivers/bluetooth/btrtl.c
index d8a29e8ff524..62f9d4df3a4f 100644
--- a/drivers/bluetooth/btrtl.c
+++ b/drivers/bluetooth/btrtl.c
@@ -524,7 +524,7 @@ static int btrtl_parse_section(struct hci_dev *hdev,
break;
}
- subsec = kzalloc_obj(*subsec, GFP_KERNEL);
+ subsec = kzalloc_obj(*subsec);
if (!subsec)
return -ENOMEM;
subsec->opcode = opcode;
@@ -828,7 +828,7 @@ static int rtl_download_firmware(struct hci_dev *hdev,
struct sk_buff *skb;
struct hci_rp_read_local_version *rp;
- dl_cmd = kmalloc_obj(*dl_cmd, GFP_KERNEL);
+ dl_cmd = kmalloc_obj(*dl_cmd);
if (!dl_cmd)
return -ENOMEM;
@@ -1077,7 +1077,7 @@ struct btrtl_device_info *btrtl_initialize(struct hci_dev *hdev,
u8 key_id;
u8 reg_val[2];
- btrtl_dev = kzalloc_obj(*btrtl_dev, GFP_KERNEL);
+ btrtl_dev = kzalloc_obj(*btrtl_dev);
if (!btrtl_dev) {
ret = -ENOMEM;
goto err_alloc;
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index 21fd5e7914f6..a1c5eb993e47 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -2071,7 +2071,7 @@ static struct urb *alloc_ctrl_urb(struct hci_dev *hdev, struct sk_buff *skb)
if (!urb)
return ERR_PTR(-ENOMEM);
- dr = kmalloc_obj(*dr, GFP_KERNEL);
+ dr = kmalloc_obj(*dr);
if (!dr) {
usb_free_urb(urb);
return ERR_PTR(-ENOMEM);
@@ -4059,7 +4059,7 @@ static int btusb_probe(struct usb_interface *intf,
return -ENODEV;
}
- data = kzalloc_obj(*data, GFP_KERNEL);
+ data = kzalloc_obj(*data);
if (!data)
return -ENOMEM;
diff --git a/drivers/bluetooth/hci_ag6xx.c b/drivers/bluetooth/hci_ag6xx.c
index 1ee31387c0be..3729d956782d 100644
--- a/drivers/bluetooth/hci_ag6xx.c
+++ b/drivers/bluetooth/hci_ag6xx.c
@@ -36,7 +36,7 @@ static int ag6xx_open(struct hci_uart *hu)
BT_DBG("hu %p", hu);
- ag6xx = kzalloc_obj(*ag6xx, GFP_KERNEL);
+ ag6xx = kzalloc_obj(*ag6xx);
if (!ag6xx)
return -ENOMEM;
diff --git a/drivers/bluetooth/hci_aml.c b/drivers/bluetooth/hci_aml.c
index 0d874aaca316..959d9e67b669 100644
--- a/drivers/bluetooth/hci_aml.c
+++ b/drivers/bluetooth/hci_aml.c
@@ -541,7 +541,7 @@ static int aml_open(struct hci_uart *hu)
return -EOPNOTSUPP;
}
- aml_data = kzalloc_obj(*aml_data, GFP_KERNEL);
+ aml_data = kzalloc_obj(*aml_data);
if (!aml_data)
return -ENOMEM;
diff --git a/drivers/bluetooth/hci_ath.c b/drivers/bluetooth/hci_ath.c
index f8d794ea81ef..fa679ad0acdf 100644
--- a/drivers/bluetooth/hci_ath.c
+++ b/drivers/bluetooth/hci_ath.c
@@ -101,7 +101,7 @@ static int ath_open(struct hci_uart *hu)
if (!hci_uart_has_flow_control(hu))
return -EOPNOTSUPP;
- ath = kzalloc_obj(*ath, GFP_KERNEL);
+ ath = kzalloc_obj(*ath);
if (!ath)
return -ENOMEM;
diff --git a/drivers/bluetooth/hci_bcm.c b/drivers/bluetooth/hci_bcm.c
index 97068809a713..1a4fc3882fd2 100644
--- a/drivers/bluetooth/hci_bcm.c
+++ b/drivers/bluetooth/hci_bcm.c
@@ -448,7 +448,7 @@ static int bcm_open(struct hci_uart *hu)
if (!hci_uart_has_flow_control(hu))
return -EOPNOTSUPP;
- bcm = kzalloc_obj(*bcm, GFP_KERNEL);
+ bcm = kzalloc_obj(*bcm);
if (!bcm)
return -ENOMEM;
diff --git a/drivers/bluetooth/hci_bcsp.c b/drivers/bluetooth/hci_bcsp.c
index 09416cc468d4..b386f91d8b46 100644
--- a/drivers/bluetooth/hci_bcsp.c
+++ b/drivers/bluetooth/hci_bcsp.c
@@ -716,7 +716,7 @@ static int bcsp_open(struct hci_uart *hu)
BT_DBG("hu %p", hu);
- bcsp = kzalloc_obj(*bcsp, GFP_KERNEL);
+ bcsp = kzalloc_obj(*bcsp);
if (!bcsp)
return -ENOMEM;
diff --git a/drivers/bluetooth/hci_h4.c b/drivers/bluetooth/hci_h4.c
index 2ee2eef954e0..07cc2a79a77b 100644
--- a/drivers/bluetooth/hci_h4.c
+++ b/drivers/bluetooth/hci_h4.c
@@ -44,7 +44,7 @@ static int h4_open(struct hci_uart *hu)
BT_DBG("hu %p", hu);
- h4 = kzalloc_obj(*h4, GFP_KERNEL);
+ h4 = kzalloc_obj(*h4);
if (!h4)
return -ENOMEM;
diff --git a/drivers/bluetooth/hci_h5.c b/drivers/bluetooth/hci_h5.c
index c31403acb9df..cfdf75dc2847 100644
--- a/drivers/bluetooth/hci_h5.c
+++ b/drivers/bluetooth/hci_h5.c
@@ -222,7 +222,7 @@ static int h5_open(struct hci_uart *hu)
if (hu->serdev) {
h5 = serdev_device_get_drvdata(hu->serdev);
} else {
- h5 = kzalloc_obj(*h5, GFP_KERNEL);
+ h5 = kzalloc_obj(*h5);
if (!h5)
return -ENOMEM;
}
@@ -1069,7 +1069,7 @@ static int h5_btrtl_resume(struct h5 *h5)
if (test_bit(H5_WAKEUP_DISABLE, &h5->flags)) {
struct h5_btrtl_reprobe *reprobe;
- reprobe = kzalloc_obj(*reprobe, GFP_KERNEL);
+ reprobe = kzalloc_obj(*reprobe);
if (!reprobe)
return -ENOMEM;
diff --git a/drivers/bluetooth/hci_intel.c b/drivers/bluetooth/hci_intel.c
index 989e87f24273..c31105b91e47 100644
--- a/drivers/bluetooth/hci_intel.c
+++ b/drivers/bluetooth/hci_intel.c
@@ -384,7 +384,7 @@ static int intel_open(struct hci_uart *hu)
if (!hci_uart_has_flow_control(hu))
return -EOPNOTSUPP;
- intel = kzalloc_obj(*intel, GFP_KERNEL);
+ intel = kzalloc_obj(*intel);
if (!intel)
return -ENOMEM;
diff --git a/drivers/bluetooth/hci_ldisc.c b/drivers/bluetooth/hci_ldisc.c
index 7638bf6d6b09..71c1997a0f73 100644
--- a/drivers/bluetooth/hci_ldisc.c
+++ b/drivers/bluetooth/hci_ldisc.c
@@ -491,7 +491,7 @@ static int hci_uart_tty_open(struct tty_struct *tty)
if (tty->ops->write == NULL)
return -EOPNOTSUPP;
- hu = kzalloc_obj(*hu, GFP_KERNEL);
+ hu = kzalloc_obj(*hu);
if (!hu) {
BT_ERR("Can't allocate control structure");
return -ENFILE;
diff --git a/drivers/bluetooth/hci_ll.c b/drivers/bluetooth/hci_ll.c
index 9c3b24d90462..91acf24f1ef5 100644
--- a/drivers/bluetooth/hci_ll.c
+++ b/drivers/bluetooth/hci_ll.c
@@ -114,7 +114,7 @@ static int ll_open(struct hci_uart *hu)
BT_DBG("hu %p", hu);
- ll = kzalloc_obj(*ll, GFP_KERNEL);
+ ll = kzalloc_obj(*ll);
if (!ll)
return -ENOMEM;
diff --git a/drivers/bluetooth/hci_mrvl.c b/drivers/bluetooth/hci_mrvl.c
index 8e8a283e4cb9..516b8f74c434 100644
--- a/drivers/bluetooth/hci_mrvl.c
+++ b/drivers/bluetooth/hci_mrvl.c
@@ -64,7 +64,7 @@ static int mrvl_open(struct hci_uart *hu)
if (!hci_uart_has_flow_control(hu))
return -EOPNOTSUPP;
- mrvl = kzalloc_obj(*mrvl, GFP_KERNEL);
+ mrvl = kzalloc_obj(*mrvl);
if (!mrvl)
return -ENOMEM;
diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
index cac861991b52..5b02e7c3f56d 100644
--- a/drivers/bluetooth/hci_qca.c
+++ b/drivers/bluetooth/hci_qca.c
@@ -585,7 +585,7 @@ static int qca_open(struct hci_uart *hu)
if (!hci_uart_has_flow_control(hu))
return -EOPNOTSUPP;
- qca = kzalloc_obj(*qca, GFP_KERNEL);
+ qca = kzalloc_obj(*qca);
if (!qca)
return -ENOMEM;
diff --git a/drivers/bluetooth/hci_vhci.c b/drivers/bluetooth/hci_vhci.c
index 6e653bb8efcc..2762eacf7f20 100644
--- a/drivers/bluetooth/hci_vhci.c
+++ b/drivers/bluetooth/hci_vhci.c
@@ -640,7 +640,7 @@ static int vhci_open(struct inode *inode, struct file *file)
{
struct vhci_data *data;
- data = kzalloc_obj(*data, GFP_KERNEL);
+ data = kzalloc_obj(*data);
if (!data)
return -ENOMEM;
diff --git a/drivers/bluetooth/virtio_bt.c b/drivers/bluetooth/virtio_bt.c
index bc33d2755ced..76d61af8a275 100644
--- a/drivers/bluetooth/virtio_bt.c
+++ b/drivers/bluetooth/virtio_bt.c
@@ -275,7 +275,7 @@ static int virtbt_probe(struct virtio_device *vdev)
return -EINVAL;
}
- vbt = kzalloc_obj(*vbt, GFP_KERNEL);
+ vbt = kzalloc_obj(*vbt);
if (!vbt)
return -ENOMEM;