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/media/pci | |
| parent | e19e1b480ac73c3e62ffebbca1174f0f511f43e7 (diff) | |
| download | linux-bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43.tar.gz linux-bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43.tar.bz2 linux-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/media/pci')
72 files changed, 91 insertions, 91 deletions
diff --git a/drivers/media/pci/bt8xx/bttv-driver.c b/drivers/media/pci/bt8xx/bttv-driver.c index 26cc0f6b7571..663469208271 100644 --- a/drivers/media/pci/bt8xx/bttv-driver.c +++ b/drivers/media/pci/bt8xx/bttv-driver.c @@ -3216,7 +3216,7 @@ static int bttv_probe(struct pci_dev *dev, const struct pci_device_id *pci_id) if (bttv_num == BTTV_MAX) return -ENOMEM; pr_info("Bt8xx card found (%d)\n", bttv_num); - bttvs[bttv_num] = btv = kzalloc_obj(*btv, GFP_KERNEL); + bttvs[bttv_num] = btv = kzalloc_obj(*btv); if (btv == NULL) { pr_err("out of memory\n"); return -ENOMEM; diff --git a/drivers/media/pci/bt8xx/bttv-gpio.c b/drivers/media/pci/bt8xx/bttv-gpio.c index 5b4c6336d2d5..b79daa2d440f 100644 --- a/drivers/media/pci/bt8xx/bttv-gpio.c +++ b/drivers/media/pci/bt8xx/bttv-gpio.c @@ -73,7 +73,7 @@ int bttv_sub_add_device(struct bttv_core *core, char *name) struct bttv_sub_device *sub; int err; - sub = kzalloc_obj(*sub, GFP_KERNEL); + sub = kzalloc_obj(*sub); if (NULL == sub) return -ENOMEM; diff --git a/drivers/media/pci/bt8xx/bttv-input.c b/drivers/media/pci/bt8xx/bttv-input.c index 45e30ebdc5f8..373b6c6817d7 100644 --- a/drivers/media/pci/bt8xx/bttv-input.c +++ b/drivers/media/pci/bt8xx/bttv-input.c @@ -416,7 +416,7 @@ int bttv_input_init(struct bttv *btv) if (!btv->has_remote) return -ENODEV; - ir = kzalloc_obj(*ir, GFP_KERNEL); + ir = kzalloc_obj(*ir); rc = rc_allocate_device(RC_DRIVER_SCANCODE); if (!ir || !rc) goto err_out_free; diff --git a/drivers/media/pci/bt8xx/dst_ca.c b/drivers/media/pci/bt8xx/dst_ca.c index f26ece10d926..6da75c6ed77b 100644 --- a/drivers/media/pci/bt8xx/dst_ca.c +++ b/drivers/media/pci/bt8xx/dst_ca.c @@ -454,7 +454,7 @@ static int ca_send_message(struct dst_state *state, struct ca_msg *p_ca_message, struct ca_msg *hw_buffer; int result = 0; - hw_buffer = kmalloc_obj(*hw_buffer, GFP_KERNEL); + hw_buffer = kmalloc_obj(*hw_buffer); if (!hw_buffer) return -ENOMEM; dprintk(verbose, DST_CA_DEBUG, 1, " "); @@ -535,9 +535,9 @@ static long dst_ca_ioctl(struct file *file, unsigned int cmd, unsigned long ioct mutex_lock(&dst_ca_mutex); dvbdev = file->private_data; state = dvbdev->priv; - p_ca_message = kmalloc_obj(struct ca_msg, GFP_KERNEL); - p_ca_slot_info = kmalloc_obj(struct ca_slot_info, GFP_KERNEL); - p_ca_caps = kmalloc_obj(struct ca_caps, GFP_KERNEL); + p_ca_message = kmalloc_obj(struct ca_msg); + p_ca_slot_info = kmalloc_obj(struct ca_slot_info); + p_ca_caps = kmalloc_obj(struct ca_caps); if (!p_ca_message || !p_ca_slot_info || !p_ca_caps) { result = -ENOMEM; goto free_mem_and_exit; diff --git a/drivers/media/pci/bt8xx/dvb-bt8xx.c b/drivers/media/pci/bt8xx/dvb-bt8xx.c index b9c712c078d2..935503acab7d 100644 --- a/drivers/media/pci/bt8xx/dvb-bt8xx.c +++ b/drivers/media/pci/bt8xx/dvb-bt8xx.c @@ -657,7 +657,7 @@ static void frontend_init(struct dvb_bt8xx_card *card, u32 type) case BTTV_BOARD_TWINHAN_DST: /* DST is not a frontend driver !!! */ - state = kmalloc_obj(struct dst_state, GFP_KERNEL); + state = kmalloc_obj(struct dst_state); if (!state) { pr_err("No memory\n"); break; @@ -809,7 +809,7 @@ static int dvb_bt8xx_probe(struct bttv_sub_device *sub) struct pci_dev* bttv_pci_dev; int ret; - if (!(card = kzalloc_obj(struct dvb_bt8xx_card, GFP_KERNEL))) + if (!(card = kzalloc_obj(struct dvb_bt8xx_card))) return -ENOMEM; mutex_init(&card->lock); diff --git a/drivers/media/pci/cobalt/cobalt-alsa-main.c b/drivers/media/pci/cobalt/cobalt-alsa-main.c index 1b30b44ad112..7bb7f13c70c0 100644 --- a/drivers/media/pci/cobalt/cobalt-alsa-main.c +++ b/drivers/media/pci/cobalt/cobalt-alsa-main.c @@ -45,7 +45,7 @@ static int snd_cobalt_card_create(struct cobalt_stream *s, struct snd_card *sc, struct snd_cobalt_card **cobsc) { - *cobsc = kzalloc_obj(struct snd_cobalt_card, GFP_KERNEL); + *cobsc = kzalloc_obj(struct snd_cobalt_card); if (*cobsc == NULL) return -ENOMEM; diff --git a/drivers/media/pci/cobalt/cobalt-driver.c b/drivers/media/pci/cobalt/cobalt-driver.c index 1c2b00278c55..9b9f69ff4016 100644 --- a/drivers/media/pci/cobalt/cobalt-driver.c +++ b/drivers/media/pci/cobalt/cobalt-driver.c @@ -663,7 +663,7 @@ static int cobalt_probe(struct pci_dev *pci_dev, /* FIXME - module parameter arrays constrain max instances */ i = atomic_inc_return(&cobalt_instance) - 1; - cobalt = kzalloc_obj(struct cobalt, GFP_KERNEL); + cobalt = kzalloc_obj(struct cobalt); if (cobalt == NULL) return -ENOMEM; cobalt->pci_dev = pci_dev; diff --git a/drivers/media/pci/cx18/cx18-alsa-main.c b/drivers/media/pci/cx18/cx18-alsa-main.c index 6214e29a5cd6..b77f5375f3ff 100644 --- a/drivers/media/pci/cx18/cx18-alsa-main.c +++ b/drivers/media/pci/cx18/cx18-alsa-main.c @@ -77,7 +77,7 @@ static int snd_cx18_card_create(struct v4l2_device *v4l2_dev, struct snd_card *sc, struct snd_cx18_card **cxsc) { - *cxsc = kzalloc_obj(struct snd_cx18_card, GFP_KERNEL); + *cxsc = kzalloc_obj(struct snd_cx18_card); if (*cxsc == NULL) return -ENOMEM; diff --git a/drivers/media/pci/cx18/cx18-driver.c b/drivers/media/pci/cx18/cx18-driver.c index bdfdd403a039..f778f79b921d 100644 --- a/drivers/media/pci/cx18/cx18-driver.c +++ b/drivers/media/pci/cx18/cx18-driver.c @@ -314,7 +314,7 @@ void cx18_read_eeprom(struct cx18 *cx, struct tveeprom *tv) memset(tv, 0, sizeof(*tv)); - c = kzalloc_obj(*c, GFP_KERNEL); + c = kzalloc_obj(*c); if (!c) return; @@ -899,7 +899,7 @@ static int cx18_probe(struct pci_dev *pci_dev, return -ENOMEM; } - cx = kzalloc_obj(*cx, GFP_KERNEL); + cx = kzalloc_obj(*cx); if (!cx) return -ENOMEM; diff --git a/drivers/media/pci/cx18/cx18-fileops.c b/drivers/media/pci/cx18/cx18-fileops.c index b3d3a6f67ea8..445afcd3092b 100644 --- a/drivers/media/pci/cx18/cx18-fileops.c +++ b/drivers/media/pci/cx18/cx18-fileops.c @@ -732,7 +732,7 @@ static int cx18_serialized_open(struct cx18_stream *s, struct file *filp) CX18_DEBUG_FILE("open %s\n", s->name); /* Allocate memory */ - item = kzalloc_obj(struct cx18_open_id, GFP_KERNEL); + item = kzalloc_obj(struct cx18_open_id); if (NULL == item) { CX18_DEBUG_WARN("nomem on v4l2 open\n"); return -ENOMEM; diff --git a/drivers/media/pci/cx18/cx18-streams.c b/drivers/media/pci/cx18/cx18-streams.c index b5b969fa9530..5da1a5d69eed 100644 --- a/drivers/media/pci/cx18/cx18-streams.c +++ b/drivers/media/pci/cx18/cx18-streams.c @@ -343,7 +343,7 @@ static int cx18_prep_dev(struct cx18 *cx, int type) /* Allocate the cx18_dvb struct only for the TS on cards with DTV */ if (type == CX18_ENC_STREAM_TYPE_TS) { if (cx->card->hw_all & CX18_HW_DVB) { - s->dvb = kzalloc_obj(struct cx18_dvb, GFP_KERNEL); + s->dvb = kzalloc_obj(struct cx18_dvb); if (s->dvb == NULL) { CX18_ERR("Couldn't allocate cx18_dvb structure for %s\n", s->name); diff --git a/drivers/media/pci/cx23885/altera-ci.c b/drivers/media/pci/cx23885/altera-ci.c index 7eae29e002ea..20a3b6c51b35 100644 --- a/drivers/media/pci/cx23885/altera-ci.c +++ b/drivers/media/pci/cx23885/altera-ci.c @@ -224,14 +224,14 @@ static struct fpga_inode *append_internal(struct fpga_internal *internal) struct fpga_inode *new_node = fpga_first_inode; if (new_node == NULL) { - new_node = kmalloc_obj(struct fpga_inode, GFP_KERNEL); + new_node = kmalloc_obj(struct fpga_inode); fpga_first_inode = new_node; } else { while (new_node->next_inode != NULL) new_node = new_node->next_inode; new_node->next_inode = - kmalloc_obj(struct fpga_inode, GFP_KERNEL); + kmalloc_obj(struct fpga_inode); if (new_node->next_inode != NULL) new_node = new_node->next_inode; else @@ -634,7 +634,7 @@ static int altera_hw_filt_init(struct altera_ci_config *config, int hw_filt_nr) struct fpga_internal *inter = NULL; int ret = 0; - pid_filt = kzalloc_obj(struct netup_hw_pid_filter, GFP_KERNEL); + pid_filt = kzalloc_obj(struct netup_hw_pid_filter); ci_dbg_print("%s\n", __func__); @@ -648,7 +648,7 @@ static int altera_hw_filt_init(struct altera_ci_config *config, int hw_filt_nr) (inter->filts_used)++; ci_dbg_print("%s: Find Internal Structure!\n", __func__); } else { - inter = kzalloc_obj(struct fpga_internal, GFP_KERNEL); + inter = kzalloc_obj(struct fpga_internal); if (!inter) { ret = -ENOMEM; goto err; @@ -706,7 +706,7 @@ int altera_ci_init(struct altera_ci_config *config, int ci_nr) int ret = 0; u8 store = 0; - state = kzalloc_obj(struct altera_ci_state, GFP_KERNEL); + state = kzalloc_obj(struct altera_ci_state); ci_dbg_print("%s\n", __func__); @@ -721,7 +721,7 @@ int altera_ci_init(struct altera_ci_config *config, int ci_nr) inter->fpga_rw = config->fpga_rw; ci_dbg_print("%s: Find Internal Structure!\n", __func__); } else { - inter = kzalloc_obj(struct fpga_internal, GFP_KERNEL); + inter = kzalloc_obj(struct fpga_internal); if (!inter) { ret = -ENOMEM; goto err; diff --git a/drivers/media/pci/cx23885/cimax2.c b/drivers/media/pci/cx23885/cimax2.c index f0ecc92fc444..154918984534 100644 --- a/drivers/media/pci/cx23885/cimax2.c +++ b/drivers/media/pci/cx23885/cimax2.c @@ -451,7 +451,7 @@ int netup_ci_init(struct cx23885_tsport *port) int ret; ci_dbg_print("%s\n", __func__); - state = kzalloc_obj(struct netup_ci_state, GFP_KERNEL); + state = kzalloc_obj(struct netup_ci_state); if (!state) { ci_dbg_print("%s: Unable create CI structure!\n", __func__); ret = -ENOMEM; diff --git a/drivers/media/pci/cx23885/cx23885-alsa.c b/drivers/media/pci/cx23885/cx23885-alsa.c index e56c5b7d84bc..29f6df0e6de4 100644 --- a/drivers/media/pci/cx23885/cx23885-alsa.c +++ b/drivers/media/pci/cx23885/cx23885-alsa.c @@ -374,7 +374,7 @@ static int snd_cx23885_hw_params(struct snd_pcm_substream *substream, BUG_ON(!chip->dma_size); BUG_ON(chip->num_periods & (chip->num_periods-1)); - buf = kzalloc_obj(*buf, GFP_KERNEL); + buf = kzalloc_obj(*buf); if (NULL == buf) return -ENOMEM; diff --git a/drivers/media/pci/cx23885/cx23885-core.c b/drivers/media/pci/cx23885/cx23885-core.c index ef2d00db794c..0892a5fd137d 100644 --- a/drivers/media/pci/cx23885/cx23885-core.c +++ b/drivers/media/pci/cx23885/cx23885-core.c @@ -2124,7 +2124,7 @@ static int cx23885_initdev(struct pci_dev *pci_dev, struct v4l2_ctrl_handler *hdl; int err; - dev = kzalloc_obj(*dev, GFP_KERNEL); + dev = kzalloc_obj(*dev); if (NULL == dev) return -ENOMEM; diff --git a/drivers/media/pci/cx23885/cx23885-input.c b/drivers/media/pci/cx23885/cx23885-input.c index 9c6e5b360bab..ffbbeca8a8e5 100644 --- a/drivers/media/pci/cx23885/cx23885-input.c +++ b/drivers/media/pci/cx23885/cx23885-input.c @@ -327,7 +327,7 @@ int cx23885_input_init(struct cx23885_dev *dev) } /* cx23885 board instance kernel IR state */ - kernel_ir = kzalloc_obj(struct cx23885_kernel_ir, GFP_KERNEL); + kernel_ir = kzalloc_obj(struct cx23885_kernel_ir); if (kernel_ir == NULL) return -ENOMEM; diff --git a/drivers/media/pci/cx23885/cx23888-ir.c b/drivers/media/pci/cx23885/cx23888-ir.c index 242b47a7d0af..087beb82a1f1 100644 --- a/drivers/media/pci/cx23885/cx23888-ir.c +++ b/drivers/media/pci/cx23885/cx23888-ir.c @@ -1142,7 +1142,7 @@ int cx23888_ir_probe(struct cx23885_dev *dev) struct v4l2_subdev_ir_parameters default_params; int ret; - state = kzalloc_obj(struct cx23888_ir_state, GFP_KERNEL); + state = kzalloc_obj(struct cx23888_ir_state); if (state == NULL) return -ENOMEM; diff --git a/drivers/media/pci/cx25821/cx25821-alsa.c b/drivers/media/pci/cx25821/cx25821-alsa.c index a8197a9b0abf..3f73391f9098 100644 --- a/drivers/media/pci/cx25821/cx25821-alsa.c +++ b/drivers/media/pci/cx25821/cx25821-alsa.c @@ -512,7 +512,7 @@ static int snd_cx25821_hw_params(struct snd_pcm_substream *substream, BUG_ON(!chip->dma_size); BUG_ON(chip->num_periods & (chip->num_periods - 1)); - buf = kzalloc_obj(*buf, GFP_KERNEL); + buf = kzalloc_obj(*buf); if (NULL == buf) return -ENOMEM; diff --git a/drivers/media/pci/cx25821/cx25821-core.c b/drivers/media/pci/cx25821/cx25821-core.c index d64712f3aed4..5acb1dc00ae8 100644 --- a/drivers/media/pci/cx25821/cx25821-core.c +++ b/drivers/media/pci/cx25821/cx25821-core.c @@ -1266,7 +1266,7 @@ static int cx25821_initdev(struct pci_dev *pci_dev, struct cx25821_dev *dev; int err = 0; - dev = kzalloc_obj(*dev, GFP_KERNEL); + dev = kzalloc_obj(*dev); if (NULL == dev) return -ENOMEM; |
