diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2026-02-21 16:37:42 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2026-02-21 17:09:51 -0800 |
| commit | bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43 (patch) | |
| tree | 01fdd9d27f1b272bef0127966e08eac44d134d0a /drivers/isdn | |
| parent | e19e1b480ac73c3e62ffebbca1174f0f511f43e7 (diff) | |
| download | linux-next-bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43.tar.gz linux-next-bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43.zip | |
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/isdn')
| -rw-r--r-- | drivers/isdn/capi/capi.c | 6 | ||||
| -rw-r--r-- | drivers/isdn/capi/capiutil.c | 4 | ||||
| -rw-r--r-- | drivers/isdn/hardware/mISDN/avmfritz.c | 2 | ||||
| -rw-r--r-- | drivers/isdn/hardware/mISDN/hfcmulti.c | 10 | ||||
| -rw-r--r-- | drivers/isdn/hardware/mISDN/hfcpci.c | 2 | ||||
| -rw-r--r-- | drivers/isdn/hardware/mISDN/hfcsusb.c | 4 | ||||
| -rw-r--r-- | drivers/isdn/hardware/mISDN/mISDNinfineon.c | 4 | ||||
| -rw-r--r-- | drivers/isdn/hardware/mISDN/netjet.c | 2 | ||||
| -rw-r--r-- | drivers/isdn/hardware/mISDN/speedfax.c | 2 | ||||
| -rw-r--r-- | drivers/isdn/hardware/mISDN/w6692.c | 2 | ||||
| -rw-r--r-- | drivers/isdn/mISDN/l1oip_core.c | 4 | ||||
| -rw-r--r-- | drivers/isdn/mISDN/layer2.c | 2 | ||||
| -rw-r--r-- | drivers/isdn/mISDN/stack.c | 2 | ||||
| -rw-r--r-- | drivers/isdn/mISDN/tei.c | 6 | ||||
| -rw-r--r-- | drivers/isdn/mISDN/timerdev.c | 4 |
15 files changed, 28 insertions, 28 deletions
diff --git a/drivers/isdn/capi/capi.c b/drivers/isdn/capi/capi.c index b1b367353b4f..b7c04036ace5 100644 --- a/drivers/isdn/capi/capi.c +++ b/drivers/isdn/capi/capi.c @@ -215,7 +215,7 @@ static struct capiminor *capiminor_alloc(struct capi20_appl *ap, u32 ncci) struct device *dev; unsigned int minor; - mp = kzalloc_obj(*mp, GFP_KERNEL); + mp = kzalloc_obj(*mp); if (!mp) { printk(KERN_ERR "capi: can't alloc capiminor\n"); return NULL; @@ -341,7 +341,7 @@ static struct capincci *capincci_alloc(struct capidev *cdev, u32 ncci) { struct capincci *np; - np = kzalloc_obj(*np, GFP_KERNEL); + np = kzalloc_obj(*np); if (!np) return NULL; np->ncci = ncci; @@ -981,7 +981,7 @@ static int capi_open(struct inode *inode, struct file *file) { struct capidev *cdev; - cdev = kzalloc_obj(*cdev, GFP_KERNEL); + cdev = kzalloc_obj(*cdev); if (!cdev) return -ENOMEM; diff --git a/drivers/isdn/capi/capiutil.c b/drivers/isdn/capi/capiutil.c index 298029340ba8..eec9b36343b7 100644 --- a/drivers/isdn/capi/capiutil.c +++ b/drivers/isdn/capi/capiutil.c @@ -618,10 +618,10 @@ _cdebbuf *capi_message2str(u8 *msg) int __init cdebug_init(void) { - g_cmsg = kmalloc_obj(_cmsg, GFP_KERNEL); + g_cmsg = kmalloc_obj(_cmsg); if (!g_cmsg) return -ENOMEM; - g_debbuf = kmalloc_obj(_cdebbuf, GFP_KERNEL); + g_debbuf = kmalloc_obj(_cdebbuf); if (!g_debbuf) { kfree(g_cmsg); return -ENOMEM; diff --git a/drivers/isdn/hardware/mISDN/avmfritz.c b/drivers/isdn/hardware/mISDN/avmfritz.c index e833b45834d2..55e0b9efa194 100644 --- a/drivers/isdn/hardware/mISDN/avmfritz.c +++ b/drivers/isdn/hardware/mISDN/avmfritz.c @@ -1090,7 +1090,7 @@ fritzpci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) int err = -ENOMEM; struct fritzcard *card; - card = kzalloc_obj(struct fritzcard, GFP_KERNEL); + card = kzalloc_obj(struct fritzcard); if (!card) { pr_info("No kmem for fritzcard\n"); return err; diff --git a/drivers/isdn/hardware/mISDN/hfcmulti.c b/drivers/isdn/hardware/mISDN/hfcmulti.c index 23db1ca03fa6..b3d28976b33a 100644 --- a/drivers/isdn/hardware/mISDN/hfcmulti.c +++ b/drivers/isdn/hardware/mISDN/hfcmulti.c @@ -4777,7 +4777,7 @@ init_e1_port(struct hfc_multi *hc, struct hm_map *m, int pt) char name[MISDN_MAX_IDLEN]; int bcount = 0; - dch = kzalloc_obj(struct dchannel, GFP_KERNEL); + dch = kzalloc_obj(struct dchannel); if (!dch) return -ENOMEM; dch->debug = debug; @@ -4795,7 +4795,7 @@ init_e1_port(struct hfc_multi *hc, struct hm_map *m, int pt) for (ch = 1; ch <= 31; ch++) { if (!((1 << ch) & hc->bmask[pt])) /* skip unused channel */ continue; - bch = kzalloc_obj(struct bchannel, GFP_KERNEL); + bch = kzalloc_obj(struct bchannel); if (!bch) { printk(KERN_ERR "%s: no memory for bchannel\n", __func__); @@ -4850,7 +4850,7 @@ init_multi_port(struct hfc_multi *hc, int pt) int ch, i, ret = 0; char name[MISDN_MAX_IDLEN]; - dch = kzalloc_obj(struct dchannel, GFP_KERNEL); + dch = kzalloc_obj(struct dchannel); if (!dch) return -ENOMEM; dch->debug = debug; @@ -4868,7 +4868,7 @@ init_multi_port(struct hfc_multi *hc, int pt) hc->chan[i + 2].port = pt; hc->chan[i + 2].nt_timer = -1; for (ch = 0; ch < dch->dev.nrbchan; ch++) { - bch = kzalloc_obj(struct bchannel, GFP_KERNEL); + bch = kzalloc_obj(struct bchannel); if (!bch) { printk(KERN_ERR "%s: no memory for bchannel\n", __func__); @@ -4991,7 +4991,7 @@ hfcmulti_init(struct hm_map *m, struct pci_dev *pdev, type[HFC_cnt]); /* allocate card+fifo structure */ - hc = kzalloc_obj(struct hfc_multi, GFP_KERNEL); + hc = kzalloc_obj(struct hfc_multi); if (!hc) { printk(KERN_ERR "No kmem for HFC-Multi card\n"); return -ENOMEM; diff --git a/drivers/isdn/hardware/mISDN/hfcpci.c b/drivers/isdn/hardware/mISDN/hfcpci.c index 6446eea8d9bb..554a1c640321 100644 --- a/drivers/isdn/hardware/mISDN/hfcpci.c +++ b/drivers/isdn/hardware/mISDN/hfcpci.c @@ -2225,7 +2225,7 @@ hfc_probe(struct pci_dev *pdev, const struct pci_device_id *ent) struct hfc_pci *card; struct _hfc_map *m = (struct _hfc_map *)ent->driver_data; - card = kzalloc_obj(struct hfc_pci, GFP_KERNEL); + card = kzalloc_obj(struct hfc_pci); if (!card) { printk(KERN_ERR "No kmem for HFC card\n"); return err; diff --git a/drivers/isdn/hardware/mISDN/hfcsusb.c b/drivers/isdn/hardware/mISDN/hfcsusb.c index 293add6adeaf..227babe83879 100644 --- a/drivers/isdn/hardware/mISDN/hfcsusb.c +++ b/drivers/isdn/hardware/mISDN/hfcsusb.c @@ -1696,7 +1696,7 @@ hfcsusb_stop_endpoint(struct hfcsusb *hw, int channel) static int setup_hfcsusb(struct hfcsusb *hw) { - void *dmabuf = kmalloc_obj(u_char, GFP_KERNEL); + void *dmabuf = kmalloc_obj(u_char); u_char b; int ret; @@ -2018,7 +2018,7 @@ hfcsusb_probe(struct usb_interface *intf, const struct usb_device_id *id) return -EIO; iface = iface_used; - hw = kzalloc_obj(struct hfcsusb, GFP_KERNEL); + hw = kzalloc_obj(struct hfcsusb); if (!hw) return -ENOMEM; /* got no mem */ snprintf(hw->name, MISDN_MAX_IDLEN - 1, "%s", DRIVER_NAME); diff --git a/drivers/isdn/hardware/mISDN/mISDNinfineon.c b/drivers/isdn/hardware/mISDN/mISDNinfineon.c index 09d85c5f2ca5..aaa639ad5526 100644 --- a/drivers/isdn/hardware/mISDN/mISDNinfineon.c +++ b/drivers/isdn/hardware/mISDN/mISDNinfineon.c @@ -1074,7 +1074,7 @@ inf_probe(struct pci_dev *pdev, const struct pci_device_id *ent) int err = -ENOMEM; struct inf_hw *card; - card = kzalloc_obj(struct inf_hw, GFP_KERNEL); + card = kzalloc_obj(struct inf_hw); if (!card) { pr_info("No memory for Infineon ISDN card\n"); return err; @@ -1108,7 +1108,7 @@ inf_probe(struct pci_dev *pdev, const struct pci_device_id *ent) struct inf_hw *sc; for (i = 1; i < 4; i++) { - sc = kzalloc_obj(struct inf_hw, GFP_KERNEL); + sc = kzalloc_obj(struct inf_hw); if (!sc) { release_card(card); pci_disable_device(pdev); diff --git a/drivers/isdn/hardware/mISDN/netjet.c b/drivers/isdn/hardware/mISDN/netjet.c index e5c28f25d190..8d740d8eacec 100644 --- a/drivers/isdn/hardware/mISDN/netjet.c +++ b/drivers/isdn/hardware/mISDN/netjet.c @@ -1070,7 +1070,7 @@ nj_probe(struct pci_dev *pdev, const struct pci_device_id *ent) return -ENODEV; } - card = kzalloc_obj(struct tiger_hw, GFP_KERNEL); + card = kzalloc_obj(struct tiger_hw); if (!card) { pr_info("No kmem for Netjet\n"); return err; diff --git a/drivers/isdn/hardware/mISDN/speedfax.c b/drivers/isdn/hardware/mISDN/speedfax.c index 5df9fd5b0c9c..ab24c3c460e6 100644 --- a/drivers/isdn/hardware/mISDN/speedfax.c +++ b/drivers/isdn/hardware/mISDN/speedfax.c @@ -443,7 +443,7 @@ static int sfaxpci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) { int err = -ENOMEM; - struct sfax_hw *card = kzalloc_obj(struct sfax_hw, GFP_KERNEL); + struct sfax_hw *card = kzalloc_obj(struct sfax_hw); if (!card) { pr_info("No memory for Speedfax+ PCI\n"); diff --git a/drivers/isdn/hardware/mISDN/w6692.c b/drivers/isdn/hardware/mISDN/w6692.c index 60bb2f302b1c..a341470c042f 100644 --- a/drivers/isdn/hardware/mISDN/w6692.c +++ b/drivers/isdn/hardware/mISDN/w6692.c @@ -1342,7 +1342,7 @@ w6692_probe(struct pci_dev *pdev, const struct pci_device_id *ent) struct w6692_hw *card; struct w6692map *m = (struct w6692map *)ent->driver_data; - card = kzalloc_obj(struct w6692_hw, GFP_KERNEL); + card = kzalloc_obj(struct w6692_hw); if (!card) { pr_info("No kmem for w6692 card\n"); return err; diff --git a/drivers/isdn/mISDN/l1oip_core.c b/drivers/isdn/mISDN/l1oip_core.c index 2e02a81fe760..6866a0d6b382 100644 --- a/drivers/isdn/mISDN/l1oip_core.c +++ b/drivers/isdn/mISDN/l1oip_core.c @@ -1370,7 +1370,7 @@ init_card(struct l1oip *hc, int pri, int bundle) (hc->remoteip >> 8) & 0xff, hc->remoteip & 0xff, hc->remoteport, hc->ondemand); - dch = kzalloc_obj(struct dchannel, GFP_KERNEL); + dch = kzalloc_obj(struct dchannel); if (!dch) return -ENOMEM; dch->debug = debug; @@ -1391,7 +1391,7 @@ init_card(struct l1oip *hc, int pri, int bundle) for (ch = 0; ch < dch->dev.nrbchan; ch++) { if (ch == 15) i++; - bch = kzalloc_obj(struct bchannel, GFP_KERNEL); + bch = kzalloc_obj(struct bchannel); if (!bch) { printk(KERN_ERR "%s: no memory for bchannel\n", __func__); diff --git a/drivers/isdn/mISDN/layer2.c b/drivers/isdn/mISDN/layer2.c index ea32330c1612..b75869c9f78f 100644 --- a/drivers/isdn/mISDN/layer2.c +++ b/drivers/isdn/mISDN/layer2.c @@ -2111,7 +2111,7 @@ create_l2(struct mISDNchannel *ch, u_int protocol, u_long options, int tei, struct layer2 *l2; struct channel_req rq; - l2 = kzalloc_obj(struct layer2, GFP_KERNEL); + l2 = kzalloc_obj(struct layer2); if (!l2) { printk(KERN_ERR "kzalloc layer2 failed\n"); return NULL; diff --git a/drivers/isdn/mISDN/stack.c b/drivers/isdn/mISDN/stack.c index 4226bae0f8c6..4e96684af0aa 100644 --- a/drivers/isdn/mISDN/stack.c +++ b/drivers/isdn/mISDN/stack.c @@ -366,7 +366,7 @@ create_stack(struct mISDNdevice *dev) int err; DECLARE_COMPLETION_ONSTACK(done); - newst = kzalloc_obj(struct mISDNstack, GFP_KERNEL); + newst = kzalloc_obj(struct mISDNstack); if (!newst) { printk(KERN_ERR "kmalloc mISDN_stack failed\n"); return -ENOMEM; diff --git a/drivers/isdn/mISDN/tei.c b/drivers/isdn/mISDN/tei.c index e7c1d465cef3..2bad3083be90 100644 --- a/drivers/isdn/mISDN/tei.c +++ b/drivers/isdn/mISDN/tei.c @@ -803,7 +803,7 @@ create_new_tei(struct manager *mgr, int tei, int sapi) printk(KERN_WARNING "%s:no memory for layer2\n", __func__); return NULL; } - l2->tm = kzalloc_obj(struct teimgr, GFP_KERNEL); + l2->tm = kzalloc_obj(struct teimgr); if (!l2->tm) { kfree(l2); printk(KERN_WARNING "%s:no memory for teimgr\n", __func__); @@ -1046,7 +1046,7 @@ create_teimgr(struct manager *mgr, struct channel_req *crq) crq->adr.tei, crq->adr.sapi); if (!l2) return -ENOMEM; - l2->tm = kzalloc_obj(struct teimgr, GFP_KERNEL); + l2->tm = kzalloc_obj(struct teimgr); if (!l2->tm) { kfree(l2); printk(KERN_ERR "kmalloc teimgr failed\n"); @@ -1345,7 +1345,7 @@ create_teimanager(struct mISDNdevice *dev) { struct manager *mgr; - mgr = kzalloc_obj(struct manager, GFP_KERNEL); + mgr = kzalloc_obj(struct manager); if (!mgr) return -ENOMEM; INIT_LIST_HEAD(&mgr->layer2); diff --git a/drivers/isdn/mISDN/timerdev.c b/drivers/isdn/mISDN/timerdev.c index 25b9625b1cd8..a18845755633 100644 --- a/drivers/isdn/mISDN/timerdev.c +++ b/drivers/isdn/mISDN/timerdev.c @@ -47,7 +47,7 @@ mISDN_open(struct inode *ino, struct file *filep) if (*debug & DEBUG_TIMER) printk(KERN_DEBUG "%s(%p,%p)\n", __func__, ino, filep); - dev = kmalloc_obj(struct mISDNtimerdev, GFP_KERNEL); + dev = kmalloc_obj(struct mISDNtimerdev); if (!dev) return -ENOMEM; dev->next_id = 1; @@ -179,7 +179,7 @@ misdn_add_timer(struct mISDNtimerdev *dev, int timeout) wake_up_interruptible(&dev->wait); id = 0; } else { - timer = kzalloc_obj(struct mISDNtimer, GFP_KERNEL); + timer = kzalloc_obj(struct mISDNtimer); if (!timer) return -ENOMEM; timer->dev = dev; |
