diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2026-02-21 20:03:00 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2026-02-21 20:03:00 -0800 |
| commit | 32a92f8c89326985e05dce8b22d3f0aa07a3e1bd (patch) | |
| tree | 65f84985b9ed2d5cf3c5243aca78d9428e25c312 /drivers/atm | |
| parent | 323bbfcf1ef8836d0d2ad9e2c1f1c684f0e3b5b3 (diff) | |
| download | lwn-32a92f8c89326985e05dce8b22d3f0aa07a3e1bd.tar.gz lwn-32a92f8c89326985e05dce8b22d3f0aa07a3e1bd.zip | |
Convert more 'alloc_obj' cases to default GFP_KERNEL arguments
This converts some of the visually simpler cases that have been split
over multiple lines. I only did the ones that are easy to verify the
resulting diff by having just that final GFP_KERNEL argument on the next
line.
Somebody should probably do a proper coccinelle script for this, but for
me the trivial script actually resulted in an assertion failure in the
middle of the script. I probably had made it a bit _too_ trivial.
So after fighting that far a while I decided to just do some of the
syntactically simpler cases with variations of the previous 'sed'
scripts.
The more syntactically complex multi-line cases would mostly really want
whitespace cleanup anyway.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/atm')
| -rw-r--r-- | drivers/atm/he.c | 3 | ||||
| -rw-r--r-- | drivers/atm/iphase.c | 12 |
2 files changed, 5 insertions, 10 deletions
diff --git a/drivers/atm/he.c b/drivers/atm/he.c index 8108ef0c089a..bb9cb00f9585 100644 --- a/drivers/atm/he.c +++ b/drivers/atm/he.c @@ -786,8 +786,7 @@ static int he_init_group(struct he_dev *he_dev, int group) } /* rbpl_virt 64-bit pointers */ - he_dev->rbpl_virt = kmalloc_objs(*he_dev->rbpl_virt, RBPL_TABLE_SIZE, - GFP_KERNEL); + he_dev->rbpl_virt = kmalloc_objs(*he_dev->rbpl_virt, RBPL_TABLE_SIZE); if (!he_dev->rbpl_virt) { hprintk("unable to allocate rbpl virt table\n"); goto out_free_rbpl_table; diff --git a/drivers/atm/iphase.c b/drivers/atm/iphase.c index b90761dcd87f..0d38e93772c2 100644 --- a/drivers/atm/iphase.c +++ b/drivers/atm/iphase.c @@ -1978,8 +1978,7 @@ static int tx_init(struct atm_dev *dev) buf_desc_ptr++; tx_pkt_start += iadev->tx_buf_sz; } - iadev->tx_buf = kmalloc_objs(*iadev->tx_buf, iadev->num_tx_desc, - GFP_KERNEL); + iadev->tx_buf = kmalloc_objs(*iadev->tx_buf, iadev->num_tx_desc); if (!iadev->tx_buf) { printk(KERN_ERR DEV_LABEL " couldn't get mem\n"); goto err_free_dle; @@ -1999,8 +1998,7 @@ static int tx_init(struct atm_dev *dev) sizeof(*cpcs), DMA_TO_DEVICE); } - iadev->desc_tbl = kmalloc_objs(*iadev->desc_tbl, iadev->num_tx_desc, - GFP_KERNEL); + iadev->desc_tbl = kmalloc_objs(*iadev->desc_tbl, iadev->num_tx_desc); if (!iadev->desc_tbl) { printk(KERN_ERR DEV_LABEL " couldn't get mem\n"); goto err_free_all_tx_bufs; @@ -2128,8 +2126,7 @@ static int tx_init(struct atm_dev *dev) memset((caddr_t)(iadev->seg_ram+i), 0, iadev->num_vc*4); vc = (struct main_vc *)iadev->MAIN_VC_TABLE_ADDR; evc = (struct ext_vc *)iadev->EXT_VC_TABLE_ADDR; - iadev->testTable = kmalloc_objs(*iadev->testTable, iadev->num_vc, - GFP_KERNEL); + iadev->testTable = kmalloc_objs(*iadev->testTable, iadev->num_vc); if (!iadev->testTable) { printk("Get freepage failed\n"); goto err_free_desc_tbl; @@ -2138,8 +2135,7 @@ static int tx_init(struct atm_dev *dev) { memset((caddr_t)vc, 0, sizeof(*vc)); memset((caddr_t)evc, 0, sizeof(*evc)); - iadev->testTable[i] = kmalloc_obj(struct testTable_t, - GFP_KERNEL); + iadev->testTable[i] = kmalloc_obj(struct testTable_t); if (!iadev->testTable[i]) goto err_free_test_tables; iadev->testTable[i]->lastTime = 0; |
