diff options
Diffstat (limited to 'drivers/misc')
58 files changed, 95 insertions, 95 deletions
diff --git a/drivers/misc/ad525x_dpot.c b/drivers/misc/ad525x_dpot.c index 8024378b4e61..57bead9fba1b 100644 --- a/drivers/misc/ad525x_dpot.c +++ b/drivers/misc/ad525x_dpot.c @@ -686,7 +686,7 @@ int ad_dpot_probe(struct device *dev, struct dpot_data *data; int i, err = 0; - data = kzalloc_obj(struct dpot_data, GFP_KERNEL); + data = kzalloc_obj(struct dpot_data); if (!data) { err = -ENOMEM; goto exit; diff --git a/drivers/misc/altera-stapl/altera.c b/drivers/misc/altera-stapl/altera.c index 334117d3a214..cf71f8e5448f 100644 --- a/drivers/misc/altera-stapl/altera.c +++ b/drivers/misc/altera-stapl/altera.c @@ -290,13 +290,13 @@ static int altera_execute(struct altera_state *astate, if (sym_count <= 0) goto exit_done; - vars = kzalloc_objs(long, sym_count, GFP_KERNEL); + vars = kzalloc_objs(long, sym_count); if (vars == NULL) status = -ENOMEM; if (status == 0) { - var_size = kzalloc_objs(s32, sym_count, GFP_KERNEL); + var_size = kzalloc_objs(s32, sym_count); if (var_size == NULL) status = -ENOMEM; @@ -2342,7 +2342,7 @@ static int altera_get_act_info(u8 *p, (p[proc_table + (13 * act_proc_id) + 8] & 0x03); procptr = - kzalloc_obj(struct altera_procinfo, GFP_KERNEL); + kzalloc_obj(struct altera_procinfo); if (procptr == NULL) status = -ENOMEM; @@ -2398,7 +2398,7 @@ int altera_init(struct altera_config *config, const struct firmware *fw) retval = -ENOMEM; goto free_key; } - astate = kzalloc_obj(struct altera_state, GFP_KERNEL); + astate = kzalloc_obj(struct altera_state); if (!astate) { retval = -ENOMEM; goto free_value; diff --git a/drivers/misc/apds9802als.c b/drivers/misc/apds9802als.c index 26d5e002dfa4..fc504bd8d916 100644 --- a/drivers/misc/apds9802als.c +++ b/drivers/misc/apds9802als.c @@ -217,7 +217,7 @@ static int apds9802als_probe(struct i2c_client *client) int res; struct als_data *data; - data = kzalloc_obj(struct als_data, GFP_KERNEL); + data = kzalloc_obj(struct als_data); if (data == NULL) { dev_err(&client->dev, "Memory allocation failed\n"); return -ENOMEM; diff --git a/drivers/misc/apds990x.c b/drivers/misc/apds990x.c index b057e659135f..b69c3a1c94d1 100644 --- a/drivers/misc/apds990x.c +++ b/drivers/misc/apds990x.c @@ -1055,7 +1055,7 @@ static int apds990x_probe(struct i2c_client *client) struct apds990x_chip *chip; int err; - chip = kzalloc_obj(*chip, GFP_KERNEL); + chip = kzalloc_obj(*chip); if (!chip) return -ENOMEM; diff --git a/drivers/misc/bcm-vk/bcm_vk_dev.c b/drivers/misc/bcm-vk/bcm_vk_dev.c index cdcf334f0ede..5773ffb46f0f 100644 --- a/drivers/misc/bcm-vk/bcm_vk_dev.c +++ b/drivers/misc/bcm-vk/bcm_vk_dev.c @@ -1289,7 +1289,7 @@ static int bcm_vk_probe(struct pci_dev *pdev, const struct pci_device_id *ent) u32 boot_status; /* allocate vk structure which is tied to kref for freeing */ - vk = kzalloc_obj(*vk, GFP_KERNEL); + vk = kzalloc_obj(*vk); if (!vk) return -ENOMEM; diff --git a/drivers/misc/bcm-vk/bcm_vk_sg.c b/drivers/misc/bcm-vk/bcm_vk_sg.c index bd8c726fdc0f..8662bb865129 100644 --- a/drivers/misc/bcm-vk/bcm_vk_sg.c +++ b/drivers/misc/bcm-vk/bcm_vk_sg.c @@ -60,7 +60,7 @@ static int bcm_vk_dma_alloc(struct device *dev, dma->nr_pages = last - first + 1; /* Allocate DMA pages */ - dma->pages = kmalloc_objs(struct page *, dma->nr_pages, GFP_KERNEL); + dma->pages = kmalloc_objs(struct page *, dma->nr_pages); if (!dma->pages) return -ENOMEM; diff --git a/drivers/misc/c2port/core.c b/drivers/misc/c2port/core.c index 707871bc4a50..54742e849d33 100644 --- a/drivers/misc/c2port/core.c +++ b/drivers/misc/c2port/core.c @@ -912,7 +912,7 @@ struct c2port_device *c2port_device_register(char *name, unlikely(!ops->c2d_get) || unlikely(!ops->c2d_set)) return ERR_PTR(-EINVAL); - c2dev = kzalloc_obj(struct c2port_device, GFP_KERNEL); + c2dev = kzalloc_obj(struct c2port_device); if (unlikely(!c2dev)) return ERR_PTR(-ENOMEM); diff --git a/drivers/misc/cardreader/rtsx_pcr.c b/drivers/misc/cardreader/rtsx_pcr.c index d7211b305918..2b6a994c6fe1 100644 --- a/drivers/misc/cardreader/rtsx_pcr.c +++ b/drivers/misc/cardreader/rtsx_pcr.c @@ -1385,7 +1385,7 @@ static int rtsx_pci_init_chip(struct rtsx_pcr *pcr) pcr_dbg(pcr, "PID: 0x%04x, IC version: 0x%02x\n", PCI_PID(pcr), pcr->ic_version); - pcr->slots = kzalloc_objs(struct rtsx_slot, pcr->num_slots, GFP_KERNEL); + pcr->slots = kzalloc_objs(struct rtsx_slot, pcr->num_slots); if (!pcr->slots) return -ENOMEM; @@ -1493,13 +1493,13 @@ static int rtsx_pci_probe(struct pci_dev *pcidev, if (ret) goto disable; - pcr = kzalloc_obj(*pcr, GFP_KERNEL); + pcr = kzalloc_obj(*pcr); if (!pcr) { ret = -ENOMEM; goto release_pci; } - handle = kzalloc_obj(*handle, GFP_KERNEL); + handle = kzalloc_obj(*handle); if (!handle) { ret = -ENOMEM; goto free_pcr; diff --git a/drivers/misc/cs5535-mfgpt.c b/drivers/misc/cs5535-mfgpt.c index f0bfc6210dab..cdd0e7bda68d 100644 --- a/drivers/misc/cs5535-mfgpt.c +++ b/drivers/misc/cs5535-mfgpt.c @@ -187,7 +187,7 @@ struct cs5535_mfgpt_timer *cs5535_mfgpt_alloc_timer(int timer_nr, int domain) if (timer_nr < 0) goto done; - timer = kmalloc_obj(*timer, GFP_KERNEL); + timer = kmalloc_obj(*timer); if (!timer) { /* aw hell */ spin_lock_irqsave(&mfgpt->lock, flags); diff --git a/drivers/misc/eeprom/max6875.c b/drivers/misc/eeprom/max6875.c index dae682d8c4a7..5731d2dc8a57 100644 --- a/drivers/misc/eeprom/max6875.c +++ b/drivers/misc/eeprom/max6875.c @@ -144,7 +144,7 @@ static int max6875_probe(struct i2c_client *client) if (client->addr & 1) return -ENODEV; - data = kzalloc_obj(struct max6875_data, GFP_KERNEL); + data = kzalloc_obj(struct max6875_data); if (!data) return -ENOMEM; diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastrpc.c index d212649fe7f9..fcf3a702bdf8 100644 --- a/drivers/misc/fastrpc.c +++ b/drivers/misc/fastrpc.c @@ -424,7 +424,7 @@ static int __fastrpc_buf_alloc(struct fastrpc_user *fl, struct device *dev, { struct fastrpc_buf *buf; - buf = kzalloc_obj(*buf, GFP_KERNEL); + buf = kzalloc_obj(*buf); if (!buf) return -ENOMEM; @@ -600,7 +600,7 @@ static struct fastrpc_invoke_ctx *fastrpc_context_alloc( unsigned long flags; int ret; - ctx = kzalloc_obj(*ctx, GFP_KERNEL); + ctx = kzalloc_obj(*ctx); if (!ctx) return ERR_PTR(-ENOMEM); @@ -611,7 +611,7 @@ static struct fastrpc_invoke_ctx *fastrpc_context_alloc( REMOTE_SCALARS_OUTBUFS(sc); if (ctx->nscalars) { - ctx->maps = kzalloc_objs(*ctx->maps, ctx->nscalars, GFP_KERNEL); + ctx->maps = kzalloc_objs(*ctx->maps, ctx->nscalars); if (!ctx->maps) { kfree(ctx); return ERR_PTR(-ENOMEM); @@ -704,7 +704,7 @@ static int fastrpc_dma_buf_attach(struct dma_buf *dmabuf, struct fastrpc_buf *buffer = dmabuf->priv; int ret; - a = kzalloc_obj(*a, GFP_KERNEL); + a = kzalloc_obj(*a); if (!a) return -ENOMEM; @@ -786,7 +786,7 @@ static int fastrpc_map_attach(struct fastrpc_user *fl, int fd, struct scatterlist *sgl = NULL; int err = 0, sgl_index = 0; - map = kzalloc_obj(*map, GFP_KERNEL); + map = kzalloc_obj(*map); if (!map) return -ENOMEM; @@ -1432,7 +1432,7 @@ static int fastrpc_init_create_process(struct fastrpc_user *fl, u32 sc; bool unsigned_module = false; - args = kzalloc_objs(*args, FASTRPC_CREATE_PROCESS_NARGS, GFP_KERNEL); + args = kzalloc_objs(*args, FASTRPC_CREATE_PROCESS_NARGS); if (!args) return -ENOMEM; @@ -1627,7 +1627,7 @@ static int fastrpc_device_open(struct inode *inode, struct file *filp) fdevice = miscdev_to_fdevice(filp->private_data); cctx = fdevice->cctx; - fl = kzalloc_obj(*fl, GFP_KERNEL); + fl = kzalloc_obj(*fl); if (!fl) return -ENOMEM; @@ -1734,7 +1734,7 @@ static int fastrpc_invoke(struct fastrpc_user *fl, char __user *argp) /* nscalars is truncated here to max supported value */ nscalars = REMOTE_SCALARS_LENGTH(inv.sc); if (nscalars) { - args = kzalloc_objs(*args, nscalars, GFP_KERNEL); + args = kzalloc_objs(*args, nscalars); if (!args) return -ENOMEM; @@ -2371,7 +2371,7 @@ static int fastrpc_rpmsg_probe(struct rpmsg_device *rpdev) else if (!qcom_scm_is_available()) return -EPROBE_DEFER; - data = kzalloc_obj(*data, GFP_KERNEL); + data = kzalloc_obj(*data); if (!data) return -ENOMEM; diff --git a/drivers/misc/genwqe/card_base.c b/drivers/misc/genwqe/card_base.c index 75b970d1012e..86bfa82723ff 100644 --- a/drivers/misc/genwqe/card_base.c +++ b/drivers/misc/genwqe/card_base.c @@ -141,7 +141,7 @@ static struct genwqe_dev *genwqe_dev_alloc(void) if (i >= GENWQE_CARD_NO_MAX) return ERR_PTR(-ENODEV); - cd = kzalloc_obj(struct genwqe_dev, GFP_KERNEL); + cd = kzalloc_obj(struct genwqe_dev); if (!cd) return ERR_PTR(-ENOMEM); @@ -403,7 +403,7 @@ static int genwqe_ffdc_buffs_alloc(struct genwqe_dev *cd) /* currently support only the debug units mentioned here */ cd->ffdc[type].entries = e; cd->ffdc[type].regs = - kmalloc_objs(struct genwqe_reg, e, GFP_KERNEL); + kmalloc_objs(struct genwqe_reg, e); /* * regs == NULL is ok, the using code treats this as no regs, * Printing warning is ok in this case. diff --git a/drivers/misc/genwqe/card_ddcb.c b/drivers/misc/genwqe/card_ddcb.c index 87286ad04a4b..63c7a25a055f 100644 --- a/drivers/misc/genwqe/card_ddcb.c +++ b/drivers/misc/genwqe/card_ddcb.c @@ -194,7 +194,7 @@ struct genwqe_ddcb_cmd *ddcb_requ_alloc(void) { struct ddcb_requ *req; - req = kzalloc_obj(*req, GFP_KERNEL); + req = kzalloc_obj(*req); if (!req) return NULL; diff --git a/drivers/misc/genwqe/card_debugfs.c b/drivers/misc/genwqe/card_debugfs.c index 7fc0dce42aa7..53cc17306b22 100644 --- a/drivers/misc/genwqe/card_debugfs.c +++ b/drivers/misc/genwqe/card_debugfs.c @@ -53,7 +53,7 @@ static int curr_dbg_uidn_show(struct seq_file *s, void *unused, int uid) if (entries == 0) return 0; - regs = kzalloc_objs(*regs, entries, GFP_KERNEL); + regs = kzalloc_objs(*regs, entries); if (regs == NULL) return -ENOMEM; @@ -122,7 +122,7 @@ static int curr_regs_show(struct seq_file *s, void *unused) unsigned int i; struct genwqe_reg *regs; - regs = kzalloc_objs(*regs, GENWQE_FFDC_REGS, GFP_KERNEL); + regs = kzalloc_objs(*regs, GENWQE_FFDC_REGS); if (regs == NULL) return -ENOMEM; diff --git a/drivers/misc/genwqe/card_dev.c b/drivers/misc/genwqe/card_dev.c index 9b5458c10053..5a07e8403e97 100644 --- a/drivers/misc/genwqe/card_dev.c +++ b/drivers/misc/genwqe/card_dev.c @@ -301,7 +301,7 @@ static int genwqe_open(struct inode *inode, struct file *filp) struct genwqe_dev *cd; struct genwqe_file *cfile; - cfile = kzalloc_obj(*cfile, GFP_KERNEL); + cfile = kzalloc_obj(*cfile); if (cfile == NULL) return -ENOMEM; @@ -446,7 +446,7 @@ static int genwqe_mmap(struct file *filp, struct vm_area_struct *vma) if (get_order(vsize) > MAX_PAGE_ORDER) return -ENOMEM; - dma_map = kzalloc_obj(struct dma_mapping, GFP_KERNEL); + dma_map = kzalloc_obj(struct dma_mapping); if (dma_map == NULL) return -ENOMEM; @@ -783,7 +783,7 @@ static int genwqe_pin_mem(struct genwqe_file *cfile, struct genwqe_mem *m) map_addr = (m->addr & PAGE_MASK); map_size = round_up(m->size + (m->addr & ~PAGE_MASK), PAGE_SIZE); - dma_map = kzalloc_obj(struct dma_mapping, GFP_KERNEL); + dma_map = kzalloc_obj(struct dma_mapping); if (dma_map == NULL) return -ENOMEM; diff --git a/drivers/misc/hpilo.c b/drivers/misc/hpilo.c index 174cabc7307f..ff3f03ea577e 100644 --- a/drivers/misc/hpilo.c +++ b/drivers/misc/hpilo.c @@ -570,7 +570,7 @@ static int ilo_open(struct inode *ip, struct file *fp) hw = container_of(ip->i_cdev, struct ilo_hwinfo, cdev); /* new ccb allocation */ - data = kzalloc_obj(*data, GFP_KERNEL); + data = kzalloc_obj(*data); if (!data) return -ENOMEM; @@ -798,7 +798,7 @@ static int ilo_probe(struct pci_dev *pdev, /* track global allocations for this device */ error = -ENOMEM; - ilo_hw = kzalloc_obj(*ilo_hw, GFP_KERNEL); + ilo_hw = kzalloc_obj(*ilo_hw); if (!ilo_hw) goto out; diff --git a/drivers/misc/ibmasm/command.c b/drivers/misc/ibmasm/command.c index 9e4f45be78d7..6b037675ff45 100644 --- a/drivers/misc/ibmasm/command.c +++ b/drivers/misc/ibmasm/command.c @@ -24,7 +24,7 @@ struct command *ibmasm_new_command(struct service_processor *sp, size_t buffer_s if (buffer_size > IBMASM_CMD_MAX_BUFFER_SIZE) return NULL; - cmd = kzalloc_obj(struct command, GFP_KERNEL); + cmd = kzalloc_obj(struct command); if (cmd == NULL) return NULL; diff --git a/drivers/misc/ibmasm/event.c b/drivers/misc/ibmasm/event.c index 41aabfcd256f..3990bf2b1728 100644 --- a/drivers/misc/ibmasm/event.c +++ b/drivers/misc/ibmasm/event.c @@ -139,7 +139,7 @@ int ibmasm_event_buffer_init(struct service_processor *sp) struct ibmasm_event *event; int i; - buffer = kmalloc_obj(struct event_buffer, GFP_KERNEL); + buffer = kmalloc_obj(struct event_buffer); if (!buffer) return -ENOMEM; diff --git a/drivers/misc/ibmasm/ibmasmfs.c b/drivers/misc/ibmasm/ibmasmfs.c index f203bc3e8068..f68a8957b98f 100644 --- a/drivers/misc/ibmasm/ibmasmfs.c +++ b/drivers/misc/ibmasm/ibmasmfs.c @@ -235,7 +235,7 @@ static int command_file_open(struct inode *inode, struct file *file) if (!inode->i_private) return -ENODEV; - command_data = kmalloc_obj(struct ibmasmfs_command_data, GFP_KERNEL); + command_data = kmalloc_obj(struct ibmasmfs_command_data); if (!command_data) return -ENOMEM; @@ -344,7 +344,7 @@ static int event_file_open(struct inode *inode, struct file *file) sp = inode->i_private; - event_data = kmalloc_obj(struct ibmasmfs_event_data, GFP_KERNEL); + event_data = kmalloc_obj(struct ibmasmfs_event_data); if (!event_data) return -ENOMEM; @@ -430,7 +430,7 @@ static int r_heartbeat_file_open(struct inode *inode, struct file *file) if (!inode->i_private) return -ENODEV; - rhbeat = kmalloc_obj(struct ibmasmfs_heartbeat_data, GFP_KERNEL); + rhbeat = kmalloc_obj(struct ibmasmfs_heartbeat_data); if (!rhbeat) return -ENOMEM; diff --git a/drivers/misc/ibmasm/module.c b/drivers/misc/ibmasm/module.c index ea625673826b..4509c15a76a8 100644 --- a/drivers/misc/ibmasm/module.c +++ b/drivers/misc/ibmasm/module.c @@ -64,7 +64,7 @@ static int ibmasm_init_one(struct pci_dev *pdev, const struct pci_device_id *id) /* vnc client won't work without bus-mastering */ pci_set_master(pdev); - sp = kzalloc_obj(struct service_processor, GFP_KERNEL); + sp = kzalloc_obj(struct service_processor); if (sp == NULL) { dev_err(&pdev->dev, "Failed to allocate memory\n"); result = -ENOMEM; diff --git a/drivers/misc/ibmvmc.c b/drivers/misc/ibmvmc.c index 78ecc28f00fb..beb18c34f20d 100644 --- a/drivers/misc/ibmvmc.c +++ b/drivers/misc/ibmvmc.c @@ -830,7 +830,7 @@ static int ibmvmc_open(struct inode *inode, struct file *file) (unsigned long)inode, (unsigned long)file, ibmvmc.state); - session = kzalloc_obj(*session, GFP_KERNEL); + session = kzalloc_obj(*session); if (!session) return -ENOMEM; diff --git a/drivers/misc/ics932s401.c b/drivers/misc/ics932s401.c index df4d36fe46ac..015710762a65 100644 --- a/drivers/misc/ics932s401.c +++ b/drivers/misc/ics932s401.c @@ -433,7 +433,7 @@ static int ics932s401_probe(struct i2c_client *client) struct ics932s401_data *data; int err; - data = kzalloc_obj(struct ics932s401_data, GFP_KERNEL); + data = kzalloc_obj(struct ics932s401_data); if (!data) { err = -ENOMEM; goto exit; diff --git a/drivers/misc/isl29003.c b/drivers/misc/isl29003.c index ea56dde9183d..95480e16ae5f 100644 --- a/drivers/misc/isl29003.c +++ b/drivers/misc/isl29003.c @@ -383,7 +383,7 @@ static int isl29003_probe(struct i2c_client *client) if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE)) return -EIO; - data = kzalloc_obj(struct isl29003_data, GFP_KERNEL); + data = kzalloc_obj(struct isl29003_data); if (!data) return -ENOMEM; diff --git a/drivers/misc/keba/cp500.c b/drivers/misc/keba/cp500.c index 6039a718d92f..6c65fbf22e75 100644 --- a/drivers/misc/keba/cp500.c +++ b/drivers/misc/keba/cp500.c @@ -335,7 +335,7 @@ static int cp500_register_i2c(struct cp500 *cp500) { int ret; - cp500->i2c = kzalloc_obj(*cp500->i2c, GFP_KERNEL); + cp500->i2c = kzalloc_obj(*cp500->i2c); if (!cp500->i2c) return -ENOMEM; @@ -386,7 +386,7 @@ static int cp500_register_spi(struct cp500 *cp500, u8 esc_type) int info_size; int ret; - cp500->spi = kzalloc_obj(*cp500->spi, GFP_KERNEL); + cp500->spi = kzalloc_obj(*cp500->spi); if (!cp500->spi) return -ENOMEM; @@ -443,7 +443,7 @@ static int cp500_register_fan(struct cp500 *cp500) { int ret; - cp500->fan = kzalloc_obj(*cp500->fan, GFP_KERNEL); + cp500->fan = kzalloc_obj(*cp500->fan); if (!cp500->fan) return -ENOMEM; @@ -491,7 +491,7 @@ static int cp500_register_batt(struct cp500 *cp500) { int ret; - cp500->batt = kzalloc_obj(*cp500->batt, GFP_KERNEL); + cp500->batt = kzalloc_obj(*cp500->batt); if (!cp500->batt) return -ENOMEM; @@ -541,7 +541,7 @@ static int cp500_register_uart(struct cp500 *cp500, { int ret; - *uart = kzalloc_obj(**uart, GFP_KERNEL); + *uart = kzalloc_obj(**uart); if (!*uart) return -ENOMEM; diff --git a/drivers/misc/lan966x_pci.c b/drivers/misc/lan966x_pci.c index 6245ea993d1b..0bb90c0943bf 100644 --- a/drivers/misc/lan966x_pci.c +++ b/drivers/misc/lan966x_pci.c @@ -58,7 +58,7 @@ static struct pci_dev_intr_ctrl *pci_dev_create_intr_ctrl(struct pci_dev *pdev) if (!fwnode) return ERR_PTR(-ENODEV); - intr_ctrl = kmalloc_obj(*intr_ctrl, GFP_KERNEL); + intr_ctrl = kmalloc_obj(*intr_ctrl); if (!intr_ctrl) return ERR_PTR(-ENOMEM); diff --git a/drivers/misc/lis3lv02d/lis3lv02d.c b/drivers/misc/lis3lv02d/lis3lv02d.c index f5adec86ca28..9c68f8b1d5d6 100644 --- a/drivers/misc/lis3lv02d/lis3lv02d.c +++ b/drivers/misc/lis3lv02d/lis3lv02d.c @@ -952,7 +952,7 @@ int lis3lv02d_init_dt(struct lis3lv02d *lis3) if (!lis3->of_node) return 0; - pdata = kzalloc_obj(*pdata, GFP_KERNEL); + pdata = kzalloc_obj(*pdata); if (!pdata) return -ENOMEM; diff --git a/drivers/misc/lkdtm/bugs.c b/drivers/misc/lkdtm/bugs.c index 6de369f0ccd2..6b39ee357cef 100644 --- a/drivers/misc/lkdtm/bugs.c +++ b/drivers/misc/lkdtm/bugs.c @@ -533,7 +533,7 @@ static void lkdtm_PTR_BOUNDS(void) { struct lkdtm_cb_ptr *inst; - inst = kzalloc_obj(*inst, GFP_KERNEL); + inst = kzalloc_obj(*inst); if (!inst) { pr_err("FAIL: could not allocate struct lkdtm_cb_ptr!\n"); return; @@ -547,7 +547,7 @@ static void lkdtm_PTR_BOUNDS(void) inst->len = element_count; /* Double element_count */ - inst->extra = kzalloc_objs(*inst->extra, element_count * 2, GFP_KERNEL); + inst->extra = kzalloc_objs(*inst->extra, element_count * 2); inst->nr_extra = element_count * 2; pr_info("Pointer access within bounds ...\n"); diff --git a/drivers/misc/mei/bus.c b/drivers/misc/mei/bus.c index fb311b6633d6..f739dbcdb04c 100644 --- a/drivers/misc/mei/bus.c +++ b/drivers/misc/mei/bus.c @@ -1363,7 +1363,7 @@ static struct mei_cl_device *mei_cl_bus_dev_alloc(struct mei_device *bus, struct mei_cl_device *cldev; struct mei_cl *cl; - cldev = kzalloc_obj(*cldev, GFP_KERNEL); + cldev = kzalloc_obj(*cldev); if (!cldev) return NULL; diff --git a/drivers/misc/mei/client.c b/drivers/misc/mei/client.c index 2ad20921ffb7..643b0039cc72 100644 --- a/drivers/misc/mei/client.c +++ b/drivers/misc/mei/client.c @@ -370,7 +370,7 @@ static struct mei_cl_cb *mei_io_cb_init(struct mei_cl *cl, { struct mei_cl_cb *cb; - cb = kzalloc_obj(*cb, GFP_KERNEL); + cb = kzalloc_obj(*cb); if (!cb) return NULL; @@ -605,7 +605,7 @@ struct mei_cl *mei_cl_allocate(struct mei_device *dev) { struct mei_cl *cl; - cl = kmalloc_obj(*cl, GFP_KERNEL); + cl = kmalloc_obj(*cl); if (!cl) return NULL; @@ -1273,7 +1273,7 @@ struct mei_cl_vtag *mei_cl_vtag_alloc(struct file *fp, u8 vtag) { struct mei_cl_vtag *cl_vtag; - cl_vtag = kzalloc_obj(*cl_vtag, GFP_KERNEL); + cl_vtag = kzalloc_obj(*cl_vtag); if (!cl_vtag) return ERR_PTR(-ENOMEM); diff --git a/drivers/misc/mei/gsc_proxy/mei_gsc_proxy.c b/drivers/misc/mei/gsc_proxy/mei_gsc_proxy.c index 00467dc56b9b..a5a15a62a356 100644 --- a/drivers/misc/mei/gsc_proxy/mei_gsc_proxy.c +++ b/drivers/misc/mei/gsc_proxy/mei_gsc_proxy.c @@ -141,7 +141,7 @@ static int mei_gsc_proxy_probe(struct mei_cl_device *cldev, goto enable_err_exit; } - comp_master = kzalloc_obj(*comp_master, GFP_KERNEL); + comp_master = kzalloc_obj(*comp_master); if (!comp_master) { ret = -ENOMEM; goto err_exit; diff --git a/drivers/misc/mei/hbm.c b/drivers/misc/mei/hbm.c index 19db57456f2c..a864ac7121b2 100644 --- a/drivers/misc/mei/hbm.c +++ b/drivers/misc/mei/hbm.c @@ -409,7 +409,7 @@ static int mei_hbm_me_cl_add(struct mei_device *dev, mei_me_cl_rm_by_uuid(dev, uuid); - me_cl = kzalloc_obj(*me_cl, GFP_KERNEL); + me_cl = kzalloc_obj(*me_cl); if (!me_cl) return -ENOMEM; diff --git a/drivers/misc/mei/hdcp/mei_hdcp.c b/drivers/misc/mei/hdcp/mei_hdcp.c index 68cb4da376f9..d498ef5c2dc4 100644 --- a/drivers/misc/mei/hdcp/mei_hdcp.c +++ b/drivers/misc/mei/hdcp/mei_hdcp.c @@ -819,7 +819,7 @@ static int mei_hdcp_probe(struct mei_cl_device *cldev, goto enable_err_exit; } - comp_arbiter = kzalloc_obj(*comp_arbiter, GFP_KERNEL); + comp_arbiter = kzalloc_obj(*comp_arbiter); if (!comp_arbiter) { ret = -ENOMEM; goto err_exit; diff --git a/drivers/misc/mei/pxp/mei_pxp.c b/drivers/misc/mei/pxp/mei_pxp.c index b79573c32a4d..7c2629e12819 100644 --- a/drivers/misc/mei/pxp/mei_pxp.c +++ b/drivers/misc/mei/pxp/mei_pxp.c @@ -273,7 +273,7 @@ static int mei_pxp_probe(struct mei_cl_device *cldev, goto enable_err_exit; } - comp_master = kzalloc_obj(*comp_master, GFP_KERNEL); + comp_master = kzalloc_obj(*comp_master); if (!comp_master) { ret = -ENOMEM; goto err_exit; diff --git a/drivers/misc/mei/vsc-fw-loader.c b/drivers/misc/mei/vsc-fw-loader.c index dc32510c9ddb..7b347248921d 100644 --- a/drivers/misc/mei/vsc-fw-loader.c +++ b/drivers/misc/mei/vsc-fw-loader.c @@ -721,7 +721,7 @@ int vsc_tp_init(struct vsc_tp *tp, struct device *dev) void *rx_buf __free(kfree) = NULL; int ret; - fw_loader = kzalloc_obj(*fw_loader, GFP_KERNEL); + fw_loader = kzalloc_obj(*fw_loader); if (!fw_loader) return -ENOMEM; diff --git a/drivers/misc/ntsync.c b/drivers/misc/ntsync.c index 727d9bbe1a29..ce217b1c3fdd 100644 --- a/drivers/misc/ntsync.c +++ b/drivers/misc/ntsync.c @@ -705,7 +705,7 @@ static struct ntsync_obj *ntsync_alloc_obj(struct ntsync_device *dev, { struct ntsync_obj *obj; - obj = kzalloc_obj(*obj, GFP_KERNEL); + obj = kzalloc_obj(*obj); if (!obj) return NULL; obj->type = type; @@ -1145,7 +1145,7 @@ static int ntsync_char_open(struct inode *inode, struct file *file) { struct ntsync_device *dev; - dev = kzalloc_obj(*dev, GFP_KERNEL); + dev = kzalloc_obj(*dev); if (!dev) return -ENOMEM; diff --git a/drivers/misc/ocxl/afu_irq.c b/drivers/misc/ocxl/afu_irq.c index 3969fc9d58e2..ade7913a35e1 100644 --- a/drivers/misc/ocxl/afu_irq.c +++ b/drivers/misc/ocxl/afu_irq.c @@ -107,7 +107,7 @@ int ocxl_afu_irq_alloc(struct ocxl_context *ctx, int *irq_id) struct afu_irq *irq; int rc; - irq = kzalloc_obj(struct afu_irq, GFP_KERNEL); + irq = kzalloc_obj(struct afu_irq); if (!irq) return -ENOMEM; diff --git a/drivers/misc/ocxl/context.c b/drivers/misc/ocxl/context.c index 3ca1c442fb39..33f25be46247 100644 --- a/drivers/misc/ocxl/context.c +++ b/drivers/misc/ocxl/context.c @@ -10,7 +10,7 @@ int ocxl_context_alloc(struct ocxl_context **context, struct ocxl_afu *afu, int pasid; struct ocxl_context *ctx; - ctx = kzalloc_obj(*ctx, GFP_KERNEL); + ctx = kzalloc_obj(*ctx); if (!ctx) return -ENOMEM; diff --git a/drivers/misc/ocxl/core.c b/drivers/misc/ocxl/core.c index 608ac6a2d855..92466b7fa954 100644 --- a/drivers/misc/ocxl/core.c +++ b/drivers/misc/ocxl/core.c @@ -17,7 +17,7 @@ static struct ocxl_afu *alloc_afu(struct ocxl_fn *fn) { struct ocxl_afu *afu; - afu = kzalloc_obj(struct ocxl_afu, GFP_KERNEL); + afu = kzalloc_obj(struct ocxl_afu); if (!afu) return NULL; @@ -300,7 +300,7 @@ static struct ocxl_fn *alloc_function(void) { struct ocxl_fn *fn; - fn = kzalloc_obj(struct ocxl_fn, GFP_KERNEL); + fn = kzalloc_obj(struct ocxl_fn); if (!fn) return NULL; diff --git a/drivers/misc/ocxl/file.c b/drivers/misc/ocxl/file.c index fc03b82c3eb6..1abbde33e974 100644 --- a/drivers/misc/ocxl/file.c +++ b/drivers/misc/ocxl/file.c @@ -526,7 +526,7 @@ int ocxl_file_register_afu(struct ocxl_afu *afu) struct ocxl_fn *fn = afu->fn; struct pci_dev *pci_dev = to_pci_dev(fn->dev.parent); - info = kzalloc_obj(*info, GFP_KERNEL); + info = kzalloc_obj(*info); if (info == NULL) return -ENOMEM; diff --git a/drivers/misc/ocxl/link.c b/drivers/misc/ocxl/link.c index c413d065abe7..7749dcd16117 100644 --- a/drivers/misc/ocxl/link.c +++ b/drivers/misc/ocxl/link.c @@ -345,7 +345,7 @@ static int alloc_spa(struct pci_dev *dev, struct ocxl_link *link) { struct spa *spa; - spa = kzalloc_obj(struct spa, GFP_KERNEL); + spa = kzalloc_obj(struct spa); if (!spa) return -ENOMEM; @@ -387,7 +387,7 @@ static int alloc_link(struct pci_dev *dev, int PE_mask, struct ocxl_link **out_l struct ocxl_link *link; int rc; - link = kzalloc_obj(struct ocxl_link, GFP_KERNEL); + link = kzalloc_obj(struct ocxl_link); if (!link) return -ENOMEM; @@ -559,7 +559,7 @@ int ocxl_link_add_pe(void *link_handle, int pasid, u32 pidr, u32 tidr, goto unlock; } - pe_data = kmalloc_obj(*pe_data, GFP_KERNEL); + pe_data = kmalloc_obj(*pe_data); if (!pe_data) { rc = -ENOMEM; goto unlock; diff --git a/drivers/misc/ocxl/pasid.c b/drivers/misc/ocxl/pasid.c index 677870f49290..c9a50eb926da 100644 --- a/drivers/misc/ocxl/pasid.c +++ b/drivers/misc/ocxl/pasid.c @@ -28,7 +28,7 @@ static int range_alloc(struct list_head *head, u32 size, int max_id, struct id_range *cur, *new; int rc, last_end; - new = kmalloc_obj(struct id_range, GFP_KERNEL); + new = kmalloc_obj(struct id_range); if (!new) return -ENOMEM; diff --git a/drivers/misc/pch_phub.c b/drivers/misc/pch_phub.c index c69a88a09332..fd147fd2800f 100644 --- a/drivers/misc/pch_phub.c +++ b/drivers/misc/pch_phub.c @@ -666,7 +666,7 @@ static int pch_phub_probe(struct pci_dev *pdev, int ret; struct pch_phub_reg *chip; - chip = kzalloc_obj(struct pch_phub_reg, GFP_KERNEL); + chip = kzalloc_obj(struct pch_phub_reg); if (chip == NULL) return -ENOMEM; diff --git a/drivers/misc/phantom.c b/drivers/misc/phantom.c index cb7f7d9243d3..34a5054a6b40 100644 --- a/drivers/misc/phantom.c +++ b/drivers/misc/phantom.c @@ -362,7 +362,7 @@ static int phantom_probe(struct pci_dev *pdev, } retval = -ENOMEM; - pht = kzalloc_obj(*pht, GFP_KERNEL); + pht = kzalloc_obj(*pht); if (pht == NULL) { dev_err(&pdev->dev, "unable to allocate device\n"); goto err_reg; diff --git a/drivers/misc/rpmb-core.c b/drivers/misc/rpmb-core.c index 2bd557665d1a..ecf14acf230a 100644 --- a/drivers/misc/rpmb-core.c +++ b/drivers/misc/rpmb-core.c @@ -161,7 +161,7 @@ struct rpmb_dev *rpmb_dev_register(struct device *dev, !descr->dev_id_len) return ERR_PTR(-EINVAL); - rdev = kzalloc_obj(*rdev, GFP_KERNEL); + rdev = kzalloc_obj(*rdev); if (!rdev) return ERR_PTR(-ENOMEM); rdev->descr = *descr; diff --git a/drivers/misc/sgi-gru/grumain.c b/drivers/misc/sgi-gru/grumain.c index 171d38913dcf..8d749f345246 100644 --- a/drivers/misc/sgi-gru/grumain.c +++ b/drivers/misc/sgi-gru/grumain.c @@ -356,7 +356,7 @@ struct gru_vma_data *gru_alloc_vma_data(struct vm_area_struct *vma, int tsid) { struct gru_vma_data *vdata = NULL; - vdata = kmalloc_obj(*vdata, GFP_KERNEL); + vdata = kmalloc_obj(*vdata); if (!vdata) return NULL; diff --git a/drivers/misc/sgi-gru/grutlbpurge.c b/drivers/misc/sgi-gru/grutlbpurge.c index 1bb07781a105..a8121d40be68 100644 --- a/drivers/misc/sgi-gru/grutlbpurge.c +++ b/drivers/misc/sgi-gru/grutlbpurge.c @@ -237,7 +237,7 @@ static struct mmu_notifier *gru_alloc_notifier(struct mm_struct *mm) { struct gru_mm_struct *gms; - gms = kzalloc_obj(*gms, GFP_KERNEL); + gms = kzalloc_obj(*gms); if (!gms) return ERR_PTR(-ENOMEM); STAT(gms_alloc); diff --git a/drivers/misc/sgi-xp/xpc_uv.c b/drivers/misc/sgi-xp/xpc_uv.c index ccd3047580c5..f23ec2bb03bf 100644 --- a/drivers/misc/sgi-xp/xpc_uv.c +++ b/drivers/misc/sgi-xp/xpc_uv.c @@ -147,7 +147,7 @@ xpc_create_gru_mq_uv(unsigned int mq_size, int cpu, char *irq_name, struct xpc_gru_mq_uv *mq; struct uv_IO_APIC_route_entry *mmr_value; - mq = kmalloc_obj(struct xpc_gru_mq_uv, GFP_KERNEL); + mq = kmalloc_obj(struct xpc_gru_mq_uv); if (mq == NULL) { dev_err(xpc_part, "xpc_create_gru_mq_uv() failed to kmalloc() " "a xpc_gru_mq_uv structure\n"); @@ -155,7 +155,7 @@ xpc_create_gru_mq_uv(unsigned int mq_size, int cpu, char *irq_name, goto out_0; } - mq->gru_mq_desc = kzalloc_obj(struct gru_message_queue_desc, GFP_KERNEL); + mq->gru_mq_desc = kzalloc_obj(struct gru_message_queue_desc); if (mq->gru_mq_desc == NULL) { dev_err(xpc_part, "xpc_create_gru_mq_uv() failed to kmalloc() " "a gru_message_queue_desc structure\n"); diff --git a/drivers/misc/sram.c b/drivers/misc/sram.c index 39b38d639638..1919d24c8236 100644 --- a/drivers/misc/sram.c +++ b/drivers/misc/sram.c @@ -191,7 +191,7 @@ static int sram_reserve_regions(struct sram_dev *sram, struct resource *res) * after the reserved blocks from the dt are processed. */ nblocks = (np) ? of_get_available_child_count(np) + 1 : 1; - rblocks = kzalloc_objs(*rblocks, nblocks, GFP_KERNEL); + rblocks = kzalloc_objs(*rblocks, nblocks); if (!rblocks) return -ENOMEM; diff --git a/drivers/misc/tifm_core.c b/drivers/misc/tifm_core.c index 96ad091089a7..1a49483297a9 100644 --- a/drivers/misc/tifm_core.c +++ b/drivers/misc/tifm_core.c @@ -252,7 +252,7 @@ struct tifm_dev *tifm_alloc_device(struct tifm_adapter *fm, unsigned int id, if (!tifm_media_type_name(type, 0)) return sock; - sock = kzalloc_obj(struct tifm_dev, GFP_KERNEL); + sock = kzalloc_obj(struct tifm_dev); if (sock) { spin_lock_init(&sock->lock); sock->type = type; diff --git a/drivers/misc/tsl2550.c b/drivers/misc/tsl2550.c index 8f592afe1a32..03f19eda641e 100644 --- a/drivers/misc/tsl2550.c +++ b/drivers/misc/tsl2550.c @@ -343,7 +343,7 @@ static int tsl2550_probe(struct i2c_client *client) goto exit; } - data = kzalloc_obj(struct tsl2550_data, GFP_KERNEL); + data = kzalloc_obj(struct tsl2550_data); if (!data) { err = -ENOMEM; goto exit; diff --git a/drivers/misc/uacce/uacce.c b/drivers/misc/uacce/uacce.c index 55735335ce12..45521d4a56d1 100644 --- a/drivers/misc/uacce/uacce.c +++ b/drivers/misc/uacce/uacce.c @@ -158,7 +158,7 @@ static int uacce_fops_open(struct inode *inode, struct file *filep) if (!uacce) return -ENODEV; - q = kzalloc_obj(struct uacce_queue, GFP_KERNEL); + q = kzalloc_obj(struct uacce_queue); if (!q) return -ENOMEM; @@ -251,7 +251,7 @@ static int uacce_fops_mmap(struct file *filep, struct vm_area_struct *vma) else return -EINVAL; - qfr = kzalloc_obj(*qfr, GFP_KERNEL); + qfr = kzalloc_obj(*qfr); if (!qfr) return -ENOMEM; @@ -506,7 +506,7 @@ struct uacce_device *uacce_alloc(struct device *parent, struct uacce_device *uacce; int ret; - uacce = kzalloc_obj(struct uacce_device, GFP_KERNEL); + uacce = kzalloc_obj(struct uacce_device); if (!uacce) return ERR_PTR(-ENOMEM); diff --git a/drivers/misc/vmw_balloon.c b/drivers/misc/vmw_balloon.c index 5ae13779bd1a..3edb934dd7fd 100644 --- a/drivers/misc/vmw_balloon.c +++ b/drivers/misc/vmw_balloon.c @@ -1616,7 +1616,7 @@ static int vmballoon_enable_stats(struct vmballoon *b) if (b->stats) goto out; - b->stats = kzalloc_obj(*b->stats, GFP_KERNEL); + b->stats = kzalloc_obj(*b->stats); if (!b->stats) { /* allocation failed */ diff --git a/drivers/misc/vmw_vmci/vmci_context.c b/drivers/misc/vmw_vmci/vmci_context.c index 0a87d5430385..19ca00feed6e 100644 --- a/drivers/misc/vmw_vmci/vmci_context.c +++ b/drivers/misc/vmw_vmci/vmci_context.c @@ -104,7 +104,7 @@ struct vmci_ctx *vmci_ctx_create(u32 cid, u32 priv_flags, goto err_out; } - context = kzalloc_obj(*context, GFP_KERNEL); + context = kzalloc_obj(*context); if (!context) { pr_warn("Failed to allocate memory for VMCI context\n"); error = -ENOMEM; @@ -294,7 +294,7 @@ int vmci_ctx_enqueue_datagram(u32 cid, struct vmci_datagram *dg) } /* Allocate guest call entry and add it to the target VM's queue. */ - dq_entry = kmalloc_obj(*dq_entry, GFP_KERNEL); + dq_entry = kmalloc_obj(*dq_entry); if (dq_entry == NULL) { pr_warn("Failed to allocate memory for datagram\n"); vmci_ctx_put(context); @@ -598,7 +598,7 @@ int vmci_ctx_add_notification(u32 context_id, u32 remote_cid) goto out; } - notifier = kmalloc_obj(struct vmci_handle_list, GFP_KERNEL); + notifier = kmalloc_obj(struct vmci_handle_list); if (!notifier) { result = VMCI_ERROR_NO_MEM; goto out; diff --git a/drivers/misc/vmw_vmci/vmci_datagram.c b/drivers/misc/vmw_vmci/vmci_datagram.c index 1a276717e20a..6193a22c3ab5 100644 --- a/drivers/misc/vmw_vmci/vmci_datagram.c +++ b/drivers/misc/vmw_vmci/vmci_datagram.c @@ -71,7 +71,7 @@ static int dg_create_handle(u32 resource_id, handle = vmci_make_handle(context_id, resource_id); - entry = kmalloc_obj(*entry, GFP_KERNEL); + entry = kmalloc_obj(*entry); if (!entry) { pr_warn("Failed allocating memory for datagram entry\n"); return VMCI_ERROR_NO_MEM; diff --git a/drivers/misc/vmw_vmci/vmci_doorbell.c b/drivers/misc/vmw_vmci/vmci_doorbell.c index c2db2d4ab7f6..30303e0f5f68 100644 --- a/drivers/misc/vmw_vmci/vmci_doorbell.c +++ b/drivers/misc/vmw_vmci/vmci_doorbell.c @@ -402,7 +402,7 @@ int vmci_doorbell_create(struct vmci_handle *handle, priv_flags & ~VMCI_PRIVILEGE_ALL_FLAGS) return VMCI_ERROR_INVALID_ARGS; - entry = kmalloc_obj(*entry, GFP_KERNEL); + entry = kmalloc_obj(*entry); if (entry == NULL) { pr_warn("Failed allocating memory for datagram entry\n"); return VMCI_ERROR_NO_MEM; diff --git a/drivers/misc/vmw_vmci/vmci_event.c b/drivers/misc/vmw_vmci/vmci_event.c index 85dc12860f17..fffe068a26eb 100644 --- a/drivers/misc/vmw_vmci/vmci_event.c +++ b/drivers/misc/vmw_vmci/vmci_event.c @@ -151,7 +151,7 @@ int vmci_event_subscribe(u32 event, return VMCI_ERROR_INVALID_ARGS; } - sub = kzalloc_obj(*sub, GFP_KERNEL); + sub = kzalloc_obj(*sub); if (!sub) return VMCI_ERROR_NO_MEM; diff --git a/drivers/misc/vmw_vmci/vmci_host.c b/drivers/misc/vmw_vmci/vmci_host.c index 88fea05203d5..b71ca1bf0a20 100644 --- a/drivers/misc/vmw_vmci/vmci_host.c +++ b/drivers/misc/vmw_vmci/vmci_host.c @@ -120,7 +120,7 @@ static int vmci_host_open(struct inode *inode, struct file *filp) { struct vmci_host_dev *vmci_host_dev; - vmci_host_dev = kzalloc_obj(struct vmci_host_dev, GFP_KERNEL); + vmci_host_dev = kzalloc_obj(struct vmci_host_dev); if (vmci_host_dev == NULL) return -ENOMEM; diff --git a/drivers/misc/vmw_vmci/vmci_queue_pair.c b/drivers/misc/vmw_vmci/vmci_queue_pair.c index d2a7f79f4e8d..872aad355dbe 100644 --- a/drivers/misc/vmw_vmci/vmci_queue_pair.c +++ b/drivers/misc/vmw_vmci/vmci_queue_pair.c @@ -895,7 +895,7 @@ qp_guest_endpoint_create(struct vmci_handle handle, handle = vmci_make_handle(context_id, VMCI_INVALID_ID); } - entry = kzalloc_obj(*entry, GFP_KERNEL); + entry = kzalloc_obj(*entry); if (entry) { entry->qp.peer = peer; entry->qp.flags = flags; @@ -2722,7 +2722,7 @@ int vmci_qpair_alloc(struct vmci_qp **qpair, return VMCI_ERROR_INVALID_ARGS; } - my_qpair = kzalloc_obj(*my_qpair, GFP_KERNEL); + my_qpair = kzalloc_obj(*my_qpair); if (!my_qpair) return VMCI_ERROR_NO_MEM; |
