diff options
Diffstat (limited to 'drivers/mtd')
86 files changed, 127 insertions, 127 deletions
diff --git a/drivers/mtd/chips/cfi_cmdset_0001.c b/drivers/mtd/chips/cfi_cmdset_0001.c index 9a54e390cd44..277a03924b2f 100644 --- a/drivers/mtd/chips/cfi_cmdset_0001.c +++ b/drivers/mtd/chips/cfi_cmdset_0001.c @@ -501,7 +501,7 @@ struct mtd_info *cfi_cmdset_0001(struct map_info *map, int primary) struct mtd_info *mtd; int i; - mtd = kzalloc_obj(*mtd, GFP_KERNEL); + mtd = kzalloc_obj(*mtd); if (!mtd) return NULL; mtd->priv = map; diff --git a/drivers/mtd/chips/cfi_cmdset_0002.c b/drivers/mtd/chips/cfi_cmdset_0002.c index efb3ba02432e..63294a99d8fc 100644 --- a/drivers/mtd/chips/cfi_cmdset_0002.c +++ b/drivers/mtd/chips/cfi_cmdset_0002.c @@ -604,7 +604,7 @@ struct mtd_info *cfi_cmdset_0002(struct map_info *map, int primary) struct mtd_info *mtd; int i; - mtd = kzalloc_obj(*mtd, GFP_KERNEL); + mtd = kzalloc_obj(*mtd); if (!mtd) return NULL; mtd->priv = map; @@ -2818,7 +2818,7 @@ static int __maybe_unused cfi_ppb_unlock(struct mtd_info *mtd, loff_t ofs, for (i = 0; i < mtd->numeraseregions; i++) max_sectors += regions[i].numblocks; - sect = kzalloc_objs(struct ppb_lock, max_sectors, GFP_KERNEL); + sect = kzalloc_objs(struct ppb_lock, max_sectors); if (!sect) return -ENOMEM; diff --git a/drivers/mtd/chips/cfi_cmdset_0020.c b/drivers/mtd/chips/cfi_cmdset_0020.c index 5665d3b72da1..a0e7d8a960c5 100644 --- a/drivers/mtd/chips/cfi_cmdset_0020.c +++ b/drivers/mtd/chips/cfi_cmdset_0020.c @@ -172,7 +172,7 @@ static struct mtd_info *cfi_staa_setup(struct map_info *map) int i,j; unsigned long devsize = (1<<cfi->cfiq->DevSize) * cfi->interleave; - mtd = kzalloc_obj(*mtd, GFP_KERNEL); + mtd = kzalloc_obj(*mtd); //printk(KERN_DEBUG "number of CFI chips: %d\n", cfi->numchips); if (!mtd) { diff --git a/drivers/mtd/chips/map_absent.c b/drivers/mtd/chips/map_absent.c index 6a9bd84a6def..1804a44b3eab 100644 --- a/drivers/mtd/chips/map_absent.c +++ b/drivers/mtd/chips/map_absent.c @@ -46,7 +46,7 @@ static struct mtd_info *map_absent_probe(struct map_info *map) { struct mtd_info *mtd; - mtd = kzalloc_obj(*mtd, GFP_KERNEL); + mtd = kzalloc_obj(*mtd); if (!mtd) { return NULL; } diff --git a/drivers/mtd/chips/map_ram.c b/drivers/mtd/chips/map_ram.c index f94d20672423..2dde70e742c5 100644 --- a/drivers/mtd/chips/map_ram.c +++ b/drivers/mtd/chips/map_ram.c @@ -57,7 +57,7 @@ static struct mtd_info *map_ram_probe(struct map_info *map) #endif /* OK. It seems to be RAM. */ - mtd = kzalloc_obj(*mtd, GFP_KERNEL); + mtd = kzalloc_obj(*mtd); if (!mtd) return NULL; diff --git a/drivers/mtd/chips/map_rom.c b/drivers/mtd/chips/map_rom.c index 644ef8d62cc8..dbc34e886b57 100644 --- a/drivers/mtd/chips/map_rom.c +++ b/drivers/mtd/chips/map_rom.c @@ -45,7 +45,7 @@ static struct mtd_info *map_rom_probe(struct map_info *map) { struct mtd_info *mtd; - mtd = kzalloc_obj(*mtd, GFP_KERNEL); + mtd = kzalloc_obj(*mtd); if (!mtd) return NULL; diff --git a/drivers/mtd/devices/block2mtd.c b/drivers/mtd/devices/block2mtd.c index 41b1c1348efe..03e80b2c4f5a 100644 --- a/drivers/mtd/devices/block2mtd.c +++ b/drivers/mtd/devices/block2mtd.c @@ -271,7 +271,7 @@ static struct block2mtd_dev *add_device(char *devname, int erase_size, if (!devname) return NULL; - dev = kzalloc_obj(struct block2mtd_dev, GFP_KERNEL); + dev = kzalloc_obj(struct block2mtd_dev); if (!dev) return NULL; diff --git a/drivers/mtd/devices/docg3.c b/drivers/mtd/devices/docg3.c index 8db760b2c900..33050a2a80f7 100644 --- a/drivers/mtd/devices/docg3.c +++ b/drivers/mtd/devices/docg3.c @@ -1810,10 +1810,10 @@ doc_probe_device(struct docg3_cascade *cascade, int floor, struct device *dev) struct mtd_info *mtd; ret = -ENOMEM; - docg3 = kzalloc_obj(struct docg3, GFP_KERNEL); + docg3 = kzalloc_obj(struct docg3); if (!docg3) goto nomem1; - mtd = kzalloc_obj(struct mtd_info, GFP_KERNEL); + mtd = kzalloc_obj(struct mtd_info); if (!mtd) goto nomem2; mtd->priv = docg3; diff --git a/drivers/mtd/devices/ms02-nv.c b/drivers/mtd/devices/ms02-nv.c index 0a5d6ca1fe2f..453b3e05feb7 100644 --- a/drivers/mtd/devices/ms02-nv.c +++ b/drivers/mtd/devices/ms02-nv.c @@ -117,7 +117,7 @@ static int __init ms02nv_init_one(ulong addr) int ret = -ENODEV; /* The module decodes 8MiB of address space. */ - mod_res = kzalloc_obj(*mod_res, GFP_KERNEL); + mod_res = kzalloc_obj(*mod_res); if (!mod_res) return -ENOMEM; @@ -138,10 +138,10 @@ static int __init ms02nv_init_one(ulong addr) } ret = -ENOMEM; - mtd = kzalloc_obj(*mtd, GFP_KERNEL); + mtd = kzalloc_obj(*mtd); if (!mtd) goto err_out_mod_res_rel; - mp = kzalloc_obj(*mp, GFP_KERNEL); + mp = kzalloc_obj(*mp); if (!mp) goto err_out_mtd; @@ -149,7 +149,7 @@ static int __init ms02nv_init_one(ulong addr) mp->resource.module = mod_res; /* Firmware's diagnostic NVRAM area. */ - diag_res = kzalloc_obj(*diag_res, GFP_KERNEL); + diag_res = kzalloc_obj(*diag_res); if (!diag_res) goto err_out_mp; @@ -162,7 +162,7 @@ static int __init ms02nv_init_one(ulong addr) mp->resource.diag_ram = diag_res; /* User-available general-purpose NVRAM area. */ - user_res = kzalloc_obj(*user_res, GFP_KERNEL); + user_res = kzalloc_obj(*user_res); if (!user_res) goto err_out_diag_res; @@ -175,7 +175,7 @@ static int __init ms02nv_init_one(ulong addr) mp->resource.user_ram = user_res; /* Control and status register. */ - csr_res = kzalloc_obj(*csr_res, GFP_KERNEL); + csr_res = kzalloc_obj(*csr_res); if (!csr_res) goto err_out_user_res; diff --git a/drivers/mtd/devices/mtd_dataflash.c b/drivers/mtd/devices/mtd_dataflash.c index 3eebca290f50..e766258d76f7 100644 --- a/drivers/mtd/devices/mtd_dataflash.c +++ b/drivers/mtd/devices/mtd_dataflash.c @@ -627,7 +627,7 @@ static int add_dataflash_otp(struct spi_device *spi, char *name, int nr_pages, char *otp_tag = ""; int err = 0; - priv = kzalloc_obj(*priv, GFP_KERNEL); + priv = kzalloc_obj(*priv); if (!priv) return -ENOMEM; diff --git a/drivers/mtd/devices/mtd_intel_dg.c b/drivers/mtd/devices/mtd_intel_dg.c index ed5a07459012..c4c736ead0e5 100644 --- a/drivers/mtd/devices/mtd_intel_dg.c +++ b/drivers/mtd/devices/mtd_intel_dg.c @@ -720,7 +720,7 @@ static int intel_dg_nvm_init_mtd(struct intel_dg_nvm *nvm, struct device *device nvm->mtd.erasesize = SZ_4K; /* 4K bytes granularity */ nvm->mtd.size = nvm->size; - parts = kzalloc_objs(*parts, nvm->nregions, GFP_KERNEL); + parts = kzalloc_objs(*parts, nvm->nregions); if (!parts) return -ENOMEM; diff --git a/drivers/mtd/devices/mtdram.c b/drivers/mtd/devices/mtdram.c index 5418cfcfb1d9..3fff3cdd9834 100644 --- a/drivers/mtd/devices/mtdram.c +++ b/drivers/mtd/devices/mtdram.c @@ -158,7 +158,7 @@ static int __init init_mtdram(void) return -EINVAL; /* Allocate some memory */ - mtd_info = kmalloc_obj(struct mtd_info, GFP_KERNEL); + mtd_info = kmalloc_obj(struct mtd_info); if (!mtd_info) return -ENOMEM; diff --git a/drivers/mtd/devices/phram.c b/drivers/mtd/devices/phram.c index d35f43dec8e3..b42cadcd76b1 100644 --- a/drivers/mtd/devices/phram.c +++ b/drivers/mtd/devices/phram.c @@ -130,7 +130,7 @@ static int register_device(struct platform_device *pdev, const char *name, struct phram_mtd_list *new; int ret = -ENOMEM; - new = kzalloc_obj(*new, GFP_KERNEL); + new = kzalloc_obj(*new); if (!new) goto out0; diff --git a/drivers/mtd/devices/pmc551.c b/drivers/mtd/devices/pmc551.c index 1d793bf7ad71..dc0ebfeb846e 100644 --- a/drivers/mtd/devices/pmc551.c +++ b/drivers/mtd/devices/pmc551.c @@ -715,11 +715,11 @@ static int __init init_pmc551(void) msize = length; } - mtd = kzalloc_obj(struct mtd_info, GFP_KERNEL); + mtd = kzalloc_obj(struct mtd_info); if (!mtd) break; - priv = kzalloc_obj(struct mypriv, GFP_KERNEL); + priv = kzalloc_obj(struct mypriv); if (!priv) { kfree(mtd); break; diff --git a/drivers/mtd/devices/slram.c b/drivers/mtd/devices/slram.c index 1ac94e837f26..69cb63d99f57 100644 --- a/drivers/mtd/devices/slram.c +++ b/drivers/mtd/devices/slram.c @@ -135,17 +135,17 @@ static int register_device(char *name, unsigned long start, unsigned long length curmtd = &(*curmtd)->next; } - *curmtd = kmalloc_obj(slram_mtd_list_t, GFP_KERNEL); + *curmtd = kmalloc_obj(slram_mtd_list_t); if (!(*curmtd)) { E("slram: Cannot allocate new MTD device.\n"); return(-ENOMEM); } - (*curmtd)->mtdinfo = kzalloc_obj(struct mtd_info, GFP_KERNEL); + (*curmtd)->mtdinfo = kzalloc_obj(struct mtd_info); (*curmtd)->next = NULL; if ((*curmtd)->mtdinfo) { (*curmtd)->mtdinfo->priv = - kzalloc_obj(slram_priv_t, GFP_KERNEL); + kzalloc_obj(slram_priv_t); if (!(*curmtd)->mtdinfo->priv) { kfree((*curmtd)->mtdinfo); diff --git a/drivers/mtd/ftl.c b/drivers/mtd/ftl.c index bc372a0c040d..9b8d40d7aa37 100644 --- a/drivers/mtd/ftl.c +++ b/drivers/mtd/ftl.c @@ -201,7 +201,7 @@ static int build_maps(partition_t *part) /* Set up erase unit maps */ part->DataUnits = le16_to_cpu(part->header.NumEraseUnits) - part->header.NumTransferUnits; - part->EUNInfo = kmalloc_objs(struct eun_info_t, part->DataUnits, GFP_KERNEL); + part->EUNInfo = kmalloc_objs(struct eun_info_t, part->DataUnits); if (!part->EUNInfo) goto out; for (i = 0; i < part->DataUnits; i++) @@ -337,7 +337,7 @@ static int erase_xfer(partition_t *part, /* Is there a free erase slot? Always in MTD. */ - erase=kmalloc_obj(struct erase_info, GFP_KERNEL); + erase=kmalloc_obj(struct erase_info); if (!erase) return -ENOMEM; @@ -1005,7 +1005,7 @@ static void ftl_add_mtd(struct mtd_blktrans_ops *tr, struct mtd_info *mtd) { partition_t *partition; - partition = kzalloc_obj(partition_t, GFP_KERNEL); + partition = kzalloc_obj(partition_t); if (!partition) { printk(KERN_WARNING "No memory to scan for FTL on %s\n", diff --git a/drivers/mtd/inftlcore.c b/drivers/mtd/inftlcore.c index cde1e3f52a49..1fb924a47227 100644 --- a/drivers/mtd/inftlcore.c +++ b/drivers/mtd/inftlcore.c @@ -52,7 +52,7 @@ static void inftl_add_mtd(struct mtd_blktrans_ops *tr, struct mtd_info *mtd) pr_debug("INFTL: add_mtd for %s\n", mtd->name); - inftl = kzalloc_obj(*inftl, GFP_KERNEL); + inftl = kzalloc_obj(*inftl); if (!inftl) return; diff --git a/drivers/mtd/lpddr/lpddr_cmds.c b/drivers/mtd/lpddr/lpddr_cmds.c index 97f960af44b4..a4167ee5e415 100644 --- a/drivers/mtd/lpddr/lpddr_cmds.c +++ b/drivers/mtd/lpddr/lpddr_cmds.c @@ -41,7 +41,7 @@ struct mtd_info *lpddr_cmdset(struct map_info *map) int numchips; int i, j; - mtd = kzalloc_obj(*mtd, GFP_KERNEL); + mtd = kzalloc_obj(*mtd); if (!mtd) return NULL; mtd->priv = map; @@ -65,7 +65,7 @@ struct mtd_info *lpddr_cmdset(struct map_info *map) mtd->erasesize = 1 << lpddr->qinfo->UniformBlockSizeShift; mtd->writesize = 1 << lpddr->qinfo->BufSizeShift; - shared = kmalloc_objs(struct flchip_shared, lpddr->numchips, GFP_KERNEL); + shared = kmalloc_objs(struct flchip_shared, lpddr->numchips); if (!shared) { kfree(mtd); return NULL; diff --git a/drivers/mtd/lpddr/qinfo_probe.c b/drivers/mtd/lpddr/qinfo_probe.c index 9339da9f09a1..de05fe31754a 100644 --- a/drivers/mtd/lpddr/qinfo_probe.c +++ b/drivers/mtd/lpddr/qinfo_probe.c @@ -120,7 +120,7 @@ out: static int lpddr_chip_setup(struct map_info *map, struct lpddr_private *lpddr) { - lpddr->qinfo = kzalloc_obj(struct qinfo_chip, GFP_KERNEL); + lpddr->qinfo = kzalloc_obj(struct qinfo_chip); if (!lpddr->qinfo) return 0; diff --git a/drivers/mtd/maps/amd76xrom.c b/drivers/mtd/maps/amd76xrom.c index 1825f8e2898f..95f9b99ce5fc 100644 --- a/drivers/mtd/maps/amd76xrom.c +++ b/drivers/mtd/maps/amd76xrom.c @@ -188,7 +188,7 @@ static int amd76xrom_init_one(struct pci_dev *pdev, int i; if (!map) { - map = kmalloc_obj(*map, GFP_KERNEL); + map = kmalloc_obj(*map); if (!map) goto out; } diff --git a/drivers/mtd/maps/ck804xrom.c b/drivers/mtd/maps/ck804xrom.c index 0ac4b26b1dd7..5e44134caa8e 100644 --- a/drivers/mtd/maps/ck804xrom.c +++ b/drivers/mtd/maps/ck804xrom.c @@ -218,7 +218,7 @@ static int __init ck804xrom_init_one(struct pci_dev *pdev, int i; if (!map) { - map = kmalloc_obj(*map, GFP_KERNEL); + map = kmalloc_obj(*map); if (!map) goto out; } diff --git a/drivers/mtd/maps/esb2rom.c b/drivers/mtd/maps/esb2rom.c index 14d050a5629f..fc7f2c3a62b0 100644 --- a/drivers/mtd/maps/esb2rom.c +++ b/drivers/mtd/maps/esb2rom.c @@ -278,7 +278,7 @@ static int __init esb2rom_init_one(struct pci_dev *pdev, int i; if (!map) { - map = kmalloc_obj(*map, GFP_KERNEL); + map = kmalloc_obj(*map); if (!map) goto out; } diff --git a/drivers/mtd/maps/ichxrom.c b/drivers/mtd/maps/ichxrom.c index b940beb70b65..6608b782149b 100644 --- a/drivers/mtd/maps/ichxrom.c +++ b/drivers/mtd/maps/ichxrom.c @@ -212,7 +212,7 @@ static int __init ichxrom_init_one(struct pci_dev *pdev, int i; if (!map) { - map = kmalloc_obj(*map, GFP_KERNEL); + map = kmalloc_obj(*map); if (!map) goto out; } diff --git a/drivers/mtd/maps/pci.c b/drivers/mtd/maps/pci.c index b70b8edceb1b..4a84ca8aed40 100644 --- a/drivers/mtd/maps/pci.c +++ b/drivers/mtd/maps/pci.c @@ -264,7 +264,7 @@ static int mtd_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) if (err) goto out; - map = kmalloc_obj(*map, GFP_KERNEL); + map = kmalloc_obj(*map); err = -ENOMEM; if (!map) goto release; diff --git a/drivers/mtd/maps/pcmciamtd.c b/drivers/mtd/maps/pcmciamtd.c index 8b7192ff6f04..a2e5a63e5d18 100644 --- a/drivers/mtd/maps/pcmciamtd.c +++ b/drivers/mtd/maps/pcmciamtd.c @@ -674,7 +674,7 @@ static int pcmciamtd_probe(struct pcmcia_device *link) struct pcmciamtd_dev *dev; /* Create new memory card device */ - dev = kzalloc_obj(*dev, GFP_KERNEL); + dev = kzalloc_obj(*dev); if (!dev) return -ENOMEM; pr_debug("dev=0x%p\n", dev); diff --git a/drivers/mtd/maps/pismo.c b/drivers/mtd/maps/pismo.c index 30b95fd3352d..b0310fddcaa3 100644 --- a/drivers/mtd/maps/pismo.c +++ b/drivers/mtd/maps/pismo.c @@ -218,7 +218,7 @@ static int pismo_probe(struct i2c_client *client) return -EIO; } - pismo = kzalloc_obj(*pismo, GFP_KERNEL); + pismo = kzalloc_obj(*pismo); if (!pismo) return -ENOMEM; diff --git a/drivers/mtd/maps/plat-ram.c b/drivers/mtd/maps/plat-ram.c index d0f9b81ad7c5..816111031cf1 100644 --- a/drivers/mtd/maps/plat-ram.c +++ b/drivers/mtd/maps/plat-ram.c @@ -109,7 +109,7 @@ static int platram_probe(struct platform_device *pdev) pdata = dev_get_platdata(&pdev->dev); - info = kzalloc_obj(*info, GFP_KERNEL); + info = kzalloc_obj(*info); if (info == NULL) { err = -ENOMEM; goto exit_error; diff --git a/drivers/mtd/maps/pxa2xx-flash.c b/drivers/mtd/maps/pxa2xx-flash.c index 5ad7ae7a311c..bc303a9909d4 100644 --- a/drivers/mtd/maps/pxa2xx-flash.c +++ b/drivers/mtd/maps/pxa2xx-flash.c @@ -51,7 +51,7 @@ static int pxa2xx_flash_probe(struct platform_device *pdev) if (!res) return -ENODEV; - info = kzalloc_obj(struct pxa2xx_flash_info, GFP_KERNEL); + info = kzalloc_obj(struct pxa2xx_flash_info); if (!info) return -ENOMEM; diff --git a/drivers/mtd/maps/sa1100-flash.c b/drivers/mtd/maps/sa1100-flash.c index ed69df084352..8a1a0f0365ca 100644 --- a/drivers/mtd/maps/sa1100-flash.c +++ b/drivers/mtd/maps/sa1100-flash.c @@ -222,7 +222,7 @@ static struct sa_info *sa1100_setup_mtd(struct platform_device *pdev, } else if (info->num_subdev > 1) { struct mtd_info **cdev; - cdev = kmalloc_objs(*cdev, nr, GFP_KERNEL); + cdev = kmalloc_objs(*cdev, nr); if (!cdev) { ret = -ENOMEM; goto err; diff --git a/drivers/mtd/maps/sun_uflash.c b/drivers/mtd/maps/sun_uflash.c index aebbf2931f1c..cac780cd23f9 100644 --- a/drivers/mtd/maps/sun_uflash.c +++ b/drivers/mtd/maps/sun_uflash.c @@ -61,7 +61,7 @@ static int uflash_devinit(struct platform_device *op, struct device_node *dp) return -ENODEV; } - up = kzalloc_obj(struct uflash_dev, GFP_KERNEL); + up = kzalloc_obj(struct uflash_dev); if (!up) return -ENOMEM; diff --git a/drivers/mtd/maps/vmu-flash.c b/drivers/mtd/maps/vmu-flash.c index bd4ebcde51db..75e06d249ce9 100644 --- a/drivers/mtd/maps/vmu-flash.c +++ b/drivers/mtd/maps/vmu-flash.c @@ -73,7 +73,7 @@ static struct vmu_block *ofs_to_block(unsigned long src_ofs, if (num > card->parts[partition].numblocks) goto failed; - vblock = kmalloc_obj(struct vmu_block, GFP_KERNEL); + vblock = kmalloc_obj(struct vmu_block); if (!vblock) goto failed; @@ -539,7 +539,7 @@ static void vmu_queryblocks(struct mapleq *mq) mtd_cur->_sync = vmu_flash_sync; mtd_cur->writesize = card->blocklen; - mpart = kmalloc_obj(struct mdev_part, GFP_KERNEL); + mpart = kmalloc_obj(struct mdev_part); if (!mpart) goto fail_mpart; @@ -548,7 +548,7 @@ static void vmu_queryblocks(struct mapleq *mq) mtd_cur->priv = mpart; mtd_cur->owner = THIS_MODULE; - pcache = kzalloc_obj(struct vmu_cache, GFP_KERNEL); + pcache = kzalloc_obj(struct vmu_cache); if (!pcache) goto fail_cache_create; part_cur->pcache = pcache; @@ -609,7 +609,7 @@ static int vmu_connect(struct maple_device *mdev) basic_flash_data = be32_to_cpu(mdev->devinfo.function_data[c - 1]); - card = kmalloc_obj(struct memcard, GFP_KERNEL); + card = kmalloc_obj(struct memcard); if (!card) { error = -ENOMEM; goto fail_nomem; @@ -627,13 +627,13 @@ static int vmu_connect(struct maple_device *mdev) * Not sure there are actually any multi-partition devices in the * real world, but the hardware supports them, so, so will we */ - card->parts = kmalloc_objs(struct vmupart, card->partitions, GFP_KERNEL); + card->parts = kmalloc_objs(struct vmupart, card->partitions); if (!card->parts) { error = -ENOMEM; goto fail_partitions; } - card->mtd = kmalloc_objs(struct mtd_info, card->partitions, GFP_KERNEL); + card->mtd = kmalloc_objs(struct mtd_info, card->partitions); if (!card->mtd) { error = -ENOMEM; goto fail_mtd_info; diff --git a/drivers/mtd/mtd_blkdevs.c b/drivers/mtd/mtd_blkdevs.c index 470a838cbab7..4d2e7b7774e9 100644 --- a/drivers/mtd/mtd_blkdevs.c +++ b/drivers/mtd/mtd_blkdevs.c @@ -324,7 +324,7 @@ int add_mtd_blktrans_dev(struct mtd_blktrans_dev *new) new->readonly = 1; ret = -ENOMEM; - new->tag_set = kzalloc_obj(*new->tag_set, GFP_KERNEL); + new->tag_set = kzalloc_obj(*new->tag_set); if (!new->tag_set) goto out_list_del; diff --git a/drivers/mtd/mtdblock.c b/drivers/mtd/mtdblock.c index 80614f218228..c9143711fa39 100644 --- a/drivers/mtd/mtdblock.c +++ b/drivers/mtd/mtdblock.c @@ -316,7 +316,7 @@ static int mtdblock_flush(struct mtd_blktrans_dev *dev) static void mtdblock_add_mtd(struct mtd_blktrans_ops *tr, struct mtd_info *mtd) { - struct mtdblk_dev *dev = kzalloc_obj(*dev, GFP_KERNEL); + struct mtdblk_dev *dev = kzalloc_obj(*dev); if (!dev) return; diff --git a/drivers/mtd/mtdblock_ro.c b/drivers/mtd/mtdblock_ro.c index e82f27eec5ae..e564521d6911 100644 --- a/drivers/mtd/mtdblock_ro.c +++ b/drivers/mtd/mtdblock_ro.c @@ -36,7 +36,7 @@ static int mtdblock_writesect(struct mtd_blktrans_dev *dev, static void mtdblock_add_mtd(struct mtd_blktrans_ops *tr, struct mtd_info *mtd) { - struct mtd_blktrans_dev *dev = kzalloc_obj(*dev, GFP_KERNEL); + struct mtd_blktrans_dev *dev = kzalloc_obj(*dev); if (!dev) return; diff --git a/drivers/mtd/mtdchar.c b/drivers/mtd/mtdchar.c index 35b31fea77f3..55a43682c567 100644 --- a/drivers/mtd/mtdchar.c +++ b/drivers/mtd/mtdchar.c @@ -72,7 +72,7 @@ static int mtdchar_open(struct inode *inode, struct file *file) goto out1; } - mfi = kzalloc_obj(*mfi, GFP_KERNEL); + mfi = kzalloc_obj(*mfi); if (!mfi) { ret = -ENOMEM; goto out1; @@ -923,7 +923,7 @@ static int mtdchar_ioctl(struct file *file, u_int cmd, u_long arg) { struct erase_info *erase; - erase=kzalloc_obj(struct erase_info, GFP_KERNEL); + erase=kzalloc_obj(struct erase_info); if (!erase) ret = -ENOMEM; else { @@ -1162,7 +1162,7 @@ static int mtdchar_ioctl(struct file *file, u_int cmd, u_long arg) if (!master->ooblayout) return -EOPNOTSUPP; - usrlay = kmalloc_obj(*usrlay, GFP_KERNEL); + usrlay = kmalloc_obj(*usrlay); if (!usrlay) return -ENOMEM; diff --git a/drivers/mtd/mtdconcat.c b/drivers/mtd/mtdconcat.c index c4145ba218df..4ea98e398b30 100644 --- a/drivers/mtd/mtdconcat.c +++ b/drivers/mtd/mtdconcat.c @@ -416,7 +416,7 @@ static int concat_erase(struct mtd_info *mtd, struct erase_info *instr) } /* make a local copy of instr to avoid modifying the caller's struct */ - erase = kmalloc_obj(struct erase_info, GFP_KERNEL); + erase = kmalloc_obj(struct erase_info); if (!erase) return -ENOMEM; diff --git a/drivers/mtd/mtdpart.c b/drivers/mtd/mtdpart.c index 2c0be153a96e..e016cfbc7224 100644 --- a/drivers/mtd/mtdpart.c +++ b/drivers/mtd/mtdpart.c @@ -53,7 +53,7 @@ static struct mtd_info *allocate_partition(struct mtd_info *parent, u64 tmp; /* allocate the partition structure */ - child = kzalloc_obj(*child, GFP_KERNEL); + child = kzalloc_obj(*child); name = kstrdup(part->name, GFP_KERNEL); if (!name || !child) { printk(KERN_ERR"memory allocation error while creating partitions for \"%s\"\n", diff --git a/drivers/mtd/mtdswap.c b/drivers/mtd/mtdswap.c index a2d072da1bbe..866933fc8426 100644 --- a/drivers/mtd/mtdswap.c +++ b/drivers/mtd/mtdswap.c @@ -1413,11 +1413,11 @@ static void mtdswap_add_mtd(struct mtd_blktrans_ops *tr, struct mtd_info *mtd) "%u spare, %u bad blocks\n", MTDSWAP_PREFIX, part, swap_size / 1024, spare_cnt, bad_blocks); - d = kzalloc_obj(struct mtdswap_dev, GFP_KERNEL); + d = kzalloc_obj(struct mtdswap_dev); if (!d) return; - mbd_dev = kzalloc_obj(struct mtd_blktrans_dev, GFP_KERNEL); + mbd_dev = kzalloc_obj(struct mtd_blktrans_dev); if (!mbd_dev) { kfree(d); return; diff --git a/drivers/mtd/nand/ecc-sw-bch.c b/drivers/mtd/nand/ecc-sw-bch.c index 8ed20f176521..26d5f3f10964 100644 --- a/drivers/mtd/nand/ecc-sw-bch.c +++ b/drivers/mtd/nand/ecc-sw-bch.c @@ -227,7 +227,7 @@ int nand_ecc_sw_bch_init_ctx(struct nand_device *nand) return -EINVAL; } - engine_conf = kzalloc_obj(*engine_conf, GFP_KERNEL); + engine_conf = kzalloc_obj(*engine_conf); if (!engine_conf) return -ENOMEM; diff --git a/drivers/mtd/nand/ecc-sw-hamming.c b/drivers/mtd/nand/ecc-sw-hamming.c index 65fe971a409d..460acc1029c3 100644 --- a/drivers/mtd/nand/ecc-sw-hamming.c +++ b/drivers/mtd/nand/ecc-sw-hamming.c @@ -496,7 +496,7 @@ int nand_ecc_sw_hamming_init_ctx(struct nand_device *nand) if (conf->step_size != 256 && conf->step_size != 512) conf->step_size = 256; - engine_conf = kzalloc_obj(*engine_conf, GFP_KERNEL); + engine_conf = kzalloc_obj(*engine_conf); if (!engine_conf) return -ENOMEM; diff --git a/drivers/mtd/nand/onenand/generic.c b/drivers/mtd/nand/onenand/generic.c index 69ca617985c8..3191904ced14 100644 --- a/drivers/mtd/nand/onenand/generic.c +++ b/drivers/mtd/nand/onenand/generic.c @@ -37,7 +37,7 @@ static int generic_onenand_probe(struct platform_device *pdev) unsigned long size = resource_size(res); int err; - info = kzalloc_obj(struct onenand_info, GFP_KERNEL); + info = kzalloc_obj(struct onenand_info); if (!info) return -ENOMEM; diff --git a/drivers/mtd/nand/onenand/onenand_bbt.c b/drivers/mtd/nand/onenand/onenand_bbt.c index 380e5051595f..012163fb6add 100644 --- a/drivers/mtd/nand/onenand/onenand_bbt.c +++ b/drivers/mtd/nand/onenand/onenand_bbt.c @@ -231,7 +231,7 @@ int onenand_default_bbt(struct mtd_info *mtd) struct onenand_chip *this = mtd->priv; struct bbm_info *bbm; - this->bbm = kzalloc_obj(struct bbm_info, GFP_KERNEL); + this->bbm = kzalloc_obj(struct bbm_info); if (!this->bbm) return -ENOMEM; diff --git a/drivers/mtd/nand/qpic_common.c b/drivers/mtd/nand/qpic_common.c index 0acd6c65f326..4f3e4dd766da 100644 --- a/drivers/mtd/nand/qpic_common.c +++ b/drivers/mtd/nand/qpic_common.c @@ -156,7 +156,7 @@ int qcom_prepare_bam_async_desc(struct qcom_nand_controller *nandc, enum dma_transfer_direction dir_eng; struct dma_async_tx_descriptor *dma_desc; - desc = kzalloc_obj(*desc, GFP_KERNEL); + desc = kzalloc_obj(*desc); if (!desc) return -ENOMEM; @@ -364,7 +364,7 @@ int qcom_prep_adm_dma_desc(struct qcom_nand_controller *nandc, bool read, struct scatterlist *sgl; int ret; - desc = kzalloc_obj(*desc, GFP_KERNEL); + desc = kzalloc_obj(*desc); if (!desc) return -ENOMEM; diff --git a/drivers/mtd/nand/raw/au1550nd.c b/drivers/mtd/nand/raw/au1550nd.c index 6b09eb643ed2..f1e99197ab84 100644 --- a/drivers/mtd/nand/raw/au1550nd.c +++ b/drivers/mtd/nand/raw/au1550nd.c @@ -266,7 +266,7 @@ static int au1550nd_probe(struct platform_device *pdev) return -ENODEV; } - ctx = kzalloc_obj(*ctx, GFP_KERNEL); + ctx = kzalloc_obj(*ctx); if (!ctx) return -ENOMEM; diff --git a/drivers/mtd/nand/raw/cafe_nand.c b/drivers/mtd/nand/raw/cafe_nand.c index b05a41ce2e35..65a36d5de742 100644 --- a/drivers/mtd/nand/raw/cafe_nand.c +++ b/drivers/mtd/nand/raw/cafe_nand.c @@ -678,7 +678,7 @@ static int cafe_nand_probe(struct pci_dev *pdev, pci_set_master(pdev); - cafe = kzalloc_obj(*cafe, GFP_KERNEL); + cafe = kzalloc_obj(*cafe); if (!cafe) { err = -ENOMEM; goto out_disable_device; diff --git a/drivers/mtd/nand/raw/cs553x_nand.c b/drivers/mtd/nand/raw/cs553x_nand.c index ca2a7e16b5d8..0b872b1e3b04 100644 --- a/drivers/mtd/nand/raw/cs553x_nand.c +++ b/drivers/mtd/nand/raw/cs553x_nand.c @@ -273,7 +273,7 @@ static int __init cs553x_init_one(int cs, int mmio, unsigned long adr) } /* Allocate memory for MTD device structure and private data */ - controller = kzalloc_obj(*controller, GFP_KERNEL); + controller = kzalloc_obj(*controller); if (!controller) { err = -ENOMEM; goto out; diff --git a/drivers/mtd/nand/raw/fsl_elbc_nand.c b/drivers/mtd/nand/raw/fsl_elbc_nand.c index fdca096d74ba..c655d27bc4cc 100644 --- a/drivers/mtd/nand/raw/fsl_elbc_nand.c +++ b/drivers/mtd/nand/raw/fsl_elbc_nand.c @@ -895,13 +895,13 @@ static int fsl_elbc_nand_probe(struct platform_device *pdev) return -ENODEV; } - priv = kzalloc_obj(*priv, GFP_KERNEL); + priv = kzalloc_obj(*priv); if (!priv) return -ENOMEM; mutex_lock(&fsl_elbc_nand_mutex); if (!fsl_lbc_ctrl_dev->nand) { - elbc_fcm_ctrl = kzalloc_obj(*elbc_fcm_ctrl, GFP_KERNEL); + elbc_fcm_ctrl = kzalloc_obj(*elbc_fcm_ctrl); if (!elbc_fcm_ctrl) { mutex_unlock(&fsl_elbc_nand_mutex); ret = -ENOMEM; diff --git a/drivers/mtd/nand/raw/fsl_ifc_nand.c b/drivers/mtd/nand/raw/fsl_ifc_nand.c index 6eb507f6a204..dd88b22a91bd 100644 --- a/drivers/mtd/nand/raw/fsl_ifc_nand.c +++ b/drivers/mtd/nand/raw/fsl_ifc_nand.c @@ -1018,7 +1018,7 @@ static int fsl_ifc_nand_probe(struct platform_device *dev) mutex_lock(&fsl_ifc_nand_mutex); if (!fsl_ifc_ctrl_dev->nand) { - ifc_nand_ctrl = kzalloc_obj(*ifc_nand_ctrl, GFP_KERNEL); + ifc_nand_ctrl = kzalloc_obj(*ifc_nand_ctrl); if (!ifc_nand_ctrl) { mutex_unlock(&fsl_ifc_nand_mutex); return -ENOMEM; diff --git a/drivers/mtd/nand/raw/nand_base.c b/drivers/mtd/nand/raw/nand_base.c index 29f603fb2d8f..770c26f9c6ce 100644 --- a/drivers/mtd/nand/raw/nand_base.c +++ b/drivers/mtd/nand/raw/nand_base.c @@ -1062,7 +1062,7 @@ static int nand_choose_interface_config(struct nand_chip *chip) if (!nand_controller_can_setup_interface(chip)) return 0; - iface = kzalloc_obj(*iface, GFP_KERNEL); + iface = kzalloc_obj(*iface); if (!iface) return -ENOMEM; diff --git a/drivers/mtd/nand/raw/nand_bbt.c b/drivers/mtd/nand/raw/nand_bbt.c index 5e500bf2a3c2..b0e7592a2ab7 100644 --- a/drivers/mtd/nand/raw/nand_bbt.c +++ b/drivers/mtd/nand/raw/nand_bbt.c @@ -1375,7 +1375,7 @@ static int nand_create_badblock_pattern(struct nand_chip *this) pr_warn("Bad block pattern already allocated; not replacing\n"); return -EINVAL; } - bd = kzalloc_obj(*bd, GFP_KERNEL); + bd = kzalloc_obj(*bd); if (!bd) return -ENOMEM; bd->options = this->bbt_options & BADBLOCK_SCAN_MASK; diff --git a/drivers/mtd/nand/raw/nand_hynix.c b/drivers/mtd/nand/raw/nand_hynix.c index 12f4e5d1038e..0510ceff591d 100644 --- a/drivers/mtd/nand/raw/nand_hynix.c +++ b/drivers/mtd/nand/raw/nand_hynix.c @@ -705,7 +705,7 @@ static int hynix_nand_init(struct nand_chip *chip) else chip->options |= NAND_BBM_FIRSTPAGE | NAND_BBM_SECONDPAGE; - hynix = kzalloc_obj(*hynix, GFP_KERNEL); + hynix = kzalloc_obj(*hynix); if (!hynix) return -ENOMEM; diff --git a/drivers/mtd/nand/raw/nand_jedec.c b/drivers/mtd/nand/raw/nand_jedec.c index 8b2725863fbf..b523bf65746b 100644 --- a/drivers/mtd/nand/raw/nand_jedec.c +++ b/drivers/mtd/nand/raw/nand_jedec.c @@ -42,7 +42,7 @@ int nand_jedec_detect(struct nand_chip *chip) return 0; /* JEDEC chip: allocate a buffer to hold its parameter page */ - p = kzalloc_obj(*p, GFP_KERNEL); + p = kzalloc_obj(*p); if (!p) return -ENOMEM; diff --git a/drivers/mtd/nand/raw/nand_micron.c b/drivers/mtd/nand/raw/nand_micron.c index b97a2bd606ae..8807b8aade41 100644 --- a/drivers/mtd/nand/raw/nand_micron.c +++ b/drivers/mtd/nand/raw/nand_micron.c @@ -484,7 +484,7 @@ static int micron_nand_init(struct nand_chip *chip) int ondie; int ret; - micron = kzalloc_obj(*micron, GFP_KERNEL); + micron = kzalloc_obj(*micron); if (!micron) return -ENOMEM; diff --git a/drivers/mtd/nand/raw/nand_onfi.c b/drivers/mtd/nand/raw/nand_onfi.c index c4e7304372f1..cd3ad373883e 100644 --- a/drivers/mtd/nand/raw/nand_onfi.c +++ b/drivers/mtd/nand/raw/nand_onfi.c @@ -306,7 +306,7 @@ int nand_onfi_detect(struct nand_chip *chip) if (le16_to_cpu(p->opt_cmd) & ONFI_OPT_CMD_READ_CACHE) chip->parameters.supports_read_cache = true; - onfi = kzalloc_obj(*onfi, GFP_KERNEL); + onfi = kzalloc_obj(*onfi); if (!onfi) { ret = -ENOMEM; goto free_model; diff --git a/drivers/mtd/nand/raw/nandsim.c b/drivers/mtd/nand/raw/nandsim.c index 4e7ea6c11a15..fe968037f75a 100644 --- a/drivers/mtd/nand/raw/nandsim.c +++ b/drivers/mtd/nand/raw/nandsim.c @@ -851,7 +851,7 @@ static int ns_parse_weakblocks(void) } if (*w == ',') w += 1; - wb = kzalloc_obj(*wb, GFP_KERNEL); + wb = kzalloc_obj(*wb); if (!wb) { NS_ERR("unable to allocate memory.\n"); return -ENOMEM; @@ -902,7 +902,7 @@ static int ns_parse_weakpages(void) } if (*w == ',') w += 1; - wp = kzalloc_obj(*wp, GFP_KERNEL); + wp = kzalloc_obj(*wp); if (!wp) { NS_ERR("unable to allocate memory.\n"); return -ENOMEM; @@ -953,7 +953,7 @@ static int ns_parse_gravepages(void) } if (*g == ',') g += 1; - gp = kzalloc_obj(*gp, GFP_KERNEL); + gp = kzalloc_obj(*gp); if (!gp) { NS_ERR("unable to allocate memory.\n"); return -ENOMEM; @@ -2268,7 +2268,7 @@ static int __init ns_init_module(void) return -EINVAL; } - ns = kzalloc_obj(struct nandsim, GFP_KERNEL); + ns = kzalloc_obj(struct nandsim); if (!ns) { NS_ERR("unable to allocate core structures.\n"); return -ENOMEM; diff --git a/drivers/mtd/nand/raw/pasemi_nand.c b/drivers/mtd/nand/raw/pasemi_nand.c index 05d3e58c50dc..09409b703d93 100644 --- a/drivers/mtd/nand/raw/pasemi_nand.c +++ b/drivers/mtd/nand/raw/pasemi_nand.c @@ -113,7 +113,7 @@ static int pasemi_nand_probe(struct platform_device *ofdev) dev_dbg(dev, "pasemi_nand at %pR\n", &res); /* Allocate memory for MTD device structure and private data */ - ddata = kzalloc_obj(*ddata, GFP_KERNEL); + ddata = kzalloc_obj(*ddata); if (!ddata) { err = -ENOMEM; goto out; diff --git a/drivers/mtd/nand/raw/r852.c b/drivers/mtd/nand/raw/r852.c index 24e702919b87..8a5572b30893 100644 --- a/drivers/mtd/nand/raw/r852.c +++ b/drivers/mtd/nand/raw/r852.c @@ -867,7 +867,7 @@ static int r852_probe(struct pci_dev *pci_dev, const struct pci_device_id *id) error = -ENOMEM; /* init nand chip, but register it only on card insert */ - chip = kzalloc_obj(struct nand_chip, GFP_KERNEL); + chip = kzalloc_obj(struct nand_chip); if (!chip) goto error4; @@ -883,7 +883,7 @@ static int r852_probe(struct pci_dev *pci_dev, const struct pci_device_id *id) chip->legacy.write_buf = r852_write_buf; /* init our device structure */ - dev = kzalloc_obj(struct r852_device, GFP_KERNEL); + dev = kzalloc_obj(struct r852_device); if (!dev) goto error5; diff --git a/drivers/mtd/nand/raw/sharpsl.c b/drivers/mtd/nand/raw/sharpsl.c index d74097783036..4154ab74f169 100644 --- a/drivers/mtd/nand/raw/sharpsl.c +++ b/drivers/mtd/nand/raw/sharpsl.c @@ -132,7 +132,7 @@ static int sharpsl_nand_probe(struct platform_device *pdev) } /* Allocate memory for MTD device structure and private data */ - sharpsl = kzalloc_obj(struct sharpsl_nand, GFP_KERNEL); + sharpsl = kzalloc_obj(struct sharpsl_nand); if (!sharpsl) return -ENOMEM; diff --git a/drivers/mtd/nand/raw/txx9ndfmc.c b/drivers/mtd/nand/raw/txx9ndfmc.c index e49c38abef68..4cc6e91dbc23 100644 --- a/drivers/mtd/nand/raw/txx9ndfmc.c +++ b/drivers/mtd/nand/raw/txx9ndfmc.c @@ -319,7 +319,7 @@ static int txx9ndfmc_probe(struct platform_device *dev) if (!(plat->ch_mask & (1 << i))) continue; - txx9_priv = kzalloc_obj(struct txx9ndfmc_priv, GFP_KERNEL); + txx9_priv = kzalloc_obj(struct txx9ndfmc_priv); if (!txx9_priv) continue; chip = &txx9_priv->chip; diff --git a/drivers/mtd/nand/spi/core.c b/drivers/mtd/nand/spi/core.c index 86dee7d13a38..8aa3753aaaa1 100644 --- a/drivers/mtd/nand/spi/core.c +++ b/drivers/mtd/nand/spi/core.c @@ -350,7 +350,7 @@ static int spinand_ondie_ecc_init_ctx(struct nand_device *nand) nand->ecc.ctx.conf.step_size = nand->ecc.requirements.step_size; nand->ecc.ctx.conf.strength = nand->ecc.requirements.strength; - engine_conf = kzalloc_obj(*engine_conf, GFP_KERNEL); + engine_conf = kzalloc_obj(*engine_conf); if (!engine_conf) return -ENOMEM; diff --git a/drivers/mtd/nand/spi/gigadevice.c b/drivers/mtd/nand/spi/gigadevice.c index 137571093ec0..a6d6d6e0cc37 100644 --- a/drivers/mtd/nand/spi/gigadevice.c +++ b/drivers/mtd/nand/spi/gigadevice.c @@ -642,7 +642,7 @@ static int gd5fxgm9_spinand_init(struct spinand_device *spinand) { struct gigadevice_priv *priv; - priv = kzalloc_obj(*priv, GFP_KERNEL); + priv = kzalloc_obj(*priv); if (!priv) return -ENOMEM; diff --git a/drivers/mtd/nand/spi/macronix.c b/drivers/mtd/nand/spi/macronix.c index 2e6b9be9c58b..67cafa1bb8ef 100644 --- a/drivers/mtd/nand/spi/macronix.c +++ b/drivers/mtd/nand/spi/macronix.c @@ -499,7 +499,7 @@ static int macronix_spinand_init(struct spinand_device *spinand) { struct macronix_priv *priv; - priv = kzalloc_obj(*priv, GFP_KERNEL); + priv = kzalloc_obj(*priv); if (!priv) return -ENOMEM; diff --git a/drivers/mtd/nftlcore.c b/drivers/mtd/nftlcore.c index 9f3c193fb0c4..6b29b9c7a6a6 100644 --- a/drivers/mtd/nftlcore.c +++ b/drivers/mtd/nftlcore.c @@ -45,7 +45,7 @@ static void nftl_add_mtd(struct mtd_blktrans_ops *tr, struct mtd_info *mtd) pr_debug("NFTL: add_mtd for %s\n", mtd->name); - nftl = kzalloc_obj(struct NFTLrecord, GFP_KERNEL); + nftl = kzalloc_obj(struct NFTLrecord); if (!nftl) return; diff --git a/drivers/mtd/parsers/brcm_u-boot.c b/drivers/mtd/parsers/brcm_u-boot.c index 168cd629c277..cd78e432f1de 100644 --- a/drivers/mtd/parsers/brcm_u-boot.c +++ b/drivers/mtd/parsers/brcm_u-boot.c @@ -37,7 +37,7 @@ static int brcm_u_boot_parse(struct mtd_info *mtd, int err; int i = 0; - parts = kzalloc_objs(*parts, BRCM_U_BOOT_MAX_PARTS, GFP_KERNEL); + parts = kzalloc_objs(*parts, BRCM_U_BOOT_MAX_PARTS); if (!parts) return -ENOMEM; diff --git a/drivers/mtd/parsers/ofpart_core.c b/drivers/mtd/parsers/ofpart_core.c index 02cf6a539e3f..0029bda165bd 100644 --- a/drivers/mtd/parsers/ofpart_core.c +++ b/drivers/mtd/parsers/ofpart_core.c @@ -102,7 +102,7 @@ static int parse_fixed_partitions(struct mtd_info *master, return 0; } - parts = kzalloc_objs(*parts, nr_parts, GFP_KERNEL); + parts = kzalloc_objs(*parts, nr_parts); if (!parts) { if (dedicated) of_node_put(ofpart_node); @@ -249,7 +249,7 @@ static int parse_ofoldpart_partitions(struct mtd_info *master, nr_parts = plen / sizeof(part[0]); - parts = kzalloc_objs(*parts, nr_parts, GFP_KERNEL); + parts = kzalloc_objs(*parts, nr_parts); if (!parts) return -ENOMEM; diff --git a/drivers/mtd/parsers/qcomsmempart.c b/drivers/mtd/parsers/qcomsmempart.c index dd595387946b..d4fdc46a0073 100644 --- a/drivers/mtd/parsers/qcomsmempart.c +++ b/drivers/mtd/parsers/qcomsmempart.c @@ -123,7 +123,7 @@ static int parse_qcomsmem_part(struct mtd_info *mtd, numparts++; } - parts = kzalloc_objs(*parts, numparts, GFP_KERNEL); + parts = kzalloc_objs(*parts, numparts); if (!parts) return -ENOMEM; diff --git a/drivers/mtd/parsers/redboot.c b/drivers/mtd/parsers/redboot.c index 4f3f5145ea83..558905160ddb 100644 --- a/drivers/mtd/parsers/redboot.c +++ b/drivers/mtd/parsers/redboot.c @@ -203,7 +203,7 @@ nogood: if (!redboot_checksum(&buf[i])) break; - new_fl = kmalloc_obj(struct fis_list, GFP_KERNEL); + new_fl = kmalloc_obj(struct fis_list); namelen += strlen(buf[i].name) + 1; if (!new_fl) { ret = -ENOMEM; diff --git a/drivers/mtd/parsers/scpart.c b/drivers/mtd/parsers/scpart.c index 84b89499b200..87432dc99265 100644 --- a/drivers/mtd/parsers/scpart.c +++ b/drivers/mtd/parsers/scpart.c @@ -80,7 +80,7 @@ static int scpart_scan_partmap(struct mtd_info *master, loff_t partmap_offs, if (cnt > 0) { int bytes = cnt * sizeof(*pdesc); - pdesc = kzalloc_objs(*pdesc, cnt, GFP_KERNEL); + pdesc = kzalloc_objs(*pdesc, cnt); if (!pdesc) { res = -ENOMEM; goto free; diff --git a/drivers/mtd/parsers/tplink_safeloader.c b/drivers/mtd/parsers/tplink_safeloader.c index 3a4e9b84277f..b770f41ef874 100644 --- a/drivers/mtd/parsers/tplink_safeloader.c +++ b/drivers/mtd/parsers/tplink_safeloader.c @@ -82,7 +82,7 @@ static int mtd_parser_tplink_safeloader_parse(struct mtd_info *mtd, int idx; int err; - parts = kzalloc_objs(*parts, TPLINK_SAFELOADER_MAX_PARTS, GFP_KERNEL); + parts = kzalloc_objs(*parts, TPLINK_SAFELOADER_MAX_PARTS); if (!parts) { err = -ENOMEM; goto err_out; diff --git a/drivers/mtd/rfd_ftl.c b/drivers/mtd/rfd_ftl.c index f7d5591e8858..3199453b3bc9 100644 --- a/drivers/mtd/rfd_ftl.c +++ b/drivers/mtd/rfd_ftl.c @@ -270,7 +270,7 @@ static int erase_block(struct partition *part, int block) struct erase_info *erase; int rc; - erase = kmalloc_obj(struct erase_info, GFP_KERNEL); + erase = kmalloc_obj(struct erase_info); if (!erase) return -ENOMEM; @@ -752,7 +752,7 @@ static void rfd_ftl_add_mtd(struct mtd_blktrans_ops *tr, struct mtd_info *mtd) mtd->size > UINT_MAX) return; - part = kzalloc_obj(struct partition, GFP_KERNEL); + part = kzalloc_obj(struct partition); if (!part) return; diff --git a/drivers/mtd/sm_ftl.c b/drivers/mtd/sm_ftl.c index 5da82a4612b6..512012fd39f8 100644 --- a/drivers/mtd/sm_ftl.c +++ b/drivers/mtd/sm_ftl.c @@ -64,7 +64,7 @@ static struct attribute_group *sm_create_sysfs_attributes(struct sm_ftl *ftl) /* Initialize sysfs attributes */ vendor_attribute = - kzalloc_obj(struct sm_sysfs_attribute, GFP_KERNEL); + kzalloc_obj(struct sm_sysfs_attribute); if (!vendor_attribute) goto error2; @@ -85,7 +85,7 @@ static struct attribute_group *sm_create_sysfs_attributes(struct sm_ftl *ftl) attributes[0] = &vendor_attribute->dev_attr.attr; /* Finally create the attribute group */ - attr_group = kzalloc_obj(struct attribute_group, GFP_KERNEL); + attr_group = kzalloc_obj(struct attribute_group); if (!attr_group) goto error4; attr_group->attrs = attributes; @@ -1134,7 +1134,7 @@ static void sm_add_mtd(struct mtd_blktrans_ops *tr, struct mtd_info *mtd) struct sm_ftl *ftl; /* Allocate & initialize our private structure */ - ftl = kzalloc_obj(struct sm_ftl, GFP_KERNEL); + ftl = kzalloc_obj(struct sm_ftl); if (!ftl) goto error1; @@ -1156,7 +1156,7 @@ static void sm_add_mtd(struct mtd_blktrans_ops *tr, struct mtd_info *mtd) goto error2; /* Allocate zone array, it will be initialized on demand */ - ftl->zones = kzalloc_objs(struct ftl_zone, ftl->zone_count, GFP_KERNEL); + ftl->zones = kzalloc_objs(struct ftl_zone, ftl->zone_count); if (!ftl->zones) goto error3; @@ -1170,7 +1170,7 @@ static void sm_add_mtd(struct mtd_blktrans_ops *tr, struct mtd_info *mtd) /* Allocate upper layer structure and initialize it */ - trans = kzalloc_obj(struct mtd_blktrans_dev, GFP_KERNEL); + trans = kzalloc_obj(struct mtd_blktrans_dev); if (!trans) goto error5; diff --git a/drivers/mtd/spi-nor/core.c b/drivers/mtd/spi-nor/core.c index d48170eceec6..8ffeb41c3e08 100644 --- a/drivers/mtd/spi-nor/core.c +++ b/drivers/mtd/spi-nor/core.c @@ -1553,7 +1553,7 @@ spi_nor_init_erase_cmd(const struct spi_nor_erase_region *region, { struct spi_nor_erase_command *cmd; - cmd = kmalloc_obj(*cmd, GFP_KERNEL); + cmd = kmalloc_obj(*cmd); if (!cmd) return ERR_PTR(-ENOMEM); diff --git a/drivers/mtd/spi-nor/sfdp.c b/drivers/mtd/spi-nor/sfdp.c index 1514f21c8557..4600983cb579 100644 --- a/drivers/mtd/spi-nor/sfdp.c +++ b/drivers/mtd/spi-nor/sfdp.c @@ -760,7 +760,7 @@ static const u32 *spi_nor_get_map_in_use(struct spi_nor *nor, const u32 *smpt, u8 read_data_mask, map_id; /* Use a kmalloc'ed bounce buffer to guarantee it is DMA-able. */ - buf = kmalloc_obj(*buf, GFP_KERNEL); + buf = kmalloc_obj(*buf); if (!buf) return ERR_PTR(-ENOMEM); diff --git a/drivers/mtd/ssfdc.c b/drivers/mtd/ssfdc.c index b4e9a1c11c54..4a5225699a54 100644 --- a/drivers/mtd/ssfdc.c +++ b/drivers/mtd/ssfdc.c @@ -295,7 +295,7 @@ static void ssfdcr_add_mtd(struct mtd_blktrans_ops *tr, struct mtd_info *mtd) if (cis_sector == -1) return; - ssfdc = kzalloc_obj(*ssfdc, GFP_KERNEL); + ssfdc = kzalloc_obj(*ssfdc); if (!ssfdc) return; diff --git a/drivers/mtd/tests/stresstest.c b/drivers/mtd/tests/stresstest.c index ec5d7bd93b77..944f960a4bbf 100644 --- a/drivers/mtd/tests/stresstest.c +++ b/drivers/mtd/tests/stresstest.c @@ -178,7 +178,7 @@ static int __init mtd_stresstest_init(void) err = -ENOMEM; readbuf = vmalloc(bufsize); writebuf = vmalloc(bufsize); - offsets = kmalloc_objs(int, ebcnt, GFP_KERNEL); + offsets = kmalloc_objs(int, ebcnt); if (!readbuf || !writebuf || !offsets) goto out; for (i = 0; i < ebcnt; i++) diff --git a/drivers/mtd/ubi/attach.c b/drivers/mtd/ubi/attach.c index 9823e0bd7a51..0fa115cbf3ad 100644 --- a/drivers/mtd/ubi/attach.c +++ b/drivers/mtd/ubi/attach.c @@ -131,7 +131,7 @@ static struct ubi_ainf_volume *find_or_add_av(struct ubi_attach_info *ai, return NULL; /* The volume is absent - add it */ - av = kzalloc_obj(*av, GFP_KERNEL); + av = kzalloc_obj(*av); if (!av) return ERR_PTR(-ENOMEM); @@ -1451,7 +1451,7 @@ static struct ubi_attach_info *alloc_ai(const char *slab_name) { struct ubi_attach_info *ai; - ai = kzalloc_obj(struct ubi_attach_info, GFP_KERNEL); + ai = kzalloc_obj(struct ubi_attach_info); if (!ai) return ai; diff --git a/drivers/mtd/ubi/block.c b/drivers/mtd/ubi/block.c index 4428486fb287..8880a783c3bc 100644 --- a/drivers/mtd/ubi/block.c +++ b/drivers/mtd/ubi/block.c @@ -368,7 +368,7 @@ int ubiblock_create(struct ubi_volume_info *vi) goto out_unlock; } - dev = kzalloc_obj(struct ubiblock, GFP_KERNEL); + dev = kzalloc_obj(struct ubiblock); if (!dev) { ret = -ENOMEM; goto out_unlock; diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi/build.c index d7493b61bee4..674ad87809df 100644 --- a/drivers/mtd/ubi/build.c +++ b/drivers/mtd/ubi/build.c @@ -930,7 +930,7 @@ int ubi_attach_mtd_dev(struct mtd_info *mtd, int ubi_num, } } - ubi = kzalloc_obj(struct ubi_device, GFP_KERNEL); + ubi = kzalloc_obj(struct ubi_device); if (!ubi) return -ENOMEM; diff --git a/drivers/mtd/ubi/cdev.c b/drivers/mtd/ubi/cdev.c index 0b233b6a2d9c..fd39030dbf89 100644 --- a/drivers/mtd/ubi/cdev.c +++ b/drivers/mtd/ubi/cdev.c @@ -727,7 +727,7 @@ static int rename_volumes(struct ubi_device *ubi, int name_len = req->ents[i].name_len; const char *name = req->ents[i].name; - re = kzalloc_obj(struct ubi_rename_entry, GFP_KERNEL); + re = kzalloc_obj(struct ubi_rename_entry); if (!re) { err = -ENOMEM; goto out_free; @@ -801,7 +801,7 @@ static int rename_volumes(struct ubi_device *ubi, goto out_free; } - re1 = kzalloc_obj(struct ubi_rename_entry, GFP_KERNEL); + re1 = kzalloc_obj(struct ubi_rename_entry); if (!re1) { err = -ENOMEM; ubi_close_volume(desc); @@ -1007,7 +1007,7 @@ static long ubi_cdev_ioctl(struct file *file, unsigned int cmd, struct ubi_rnvol_req *req; dbg_gen("re-name volumes"); - req = kmalloc_obj(struct ubi_rnvol_req, GFP_KERNEL); + req = kmalloc_obj(struct ubi_rnvol_req); if (!req) { err = -ENOMEM; break; diff --git a/drivers/mtd/ubi/eba.c b/drivers/mtd/ubi/eba.c index dbc448e2b7a6..35e047392d4a 100644 --- a/drivers/mtd/ubi/eba.c +++ b/drivers/mtd/ubi/eba.c @@ -124,11 +124,11 @@ struct ubi_eba_table *ubi_eba_create_table(struct ubi_volume *vol, int err = -ENOMEM; int i; - tbl = kzalloc_obj(*tbl, GFP_KERNEL); + tbl = kzalloc_obj(*tbl); if (!tbl) return ERR_PTR(-ENOMEM); - tbl->entries = kmalloc_objs(*tbl->entries, nentries, GFP_KERNEL); + tbl->entries = kmalloc_objs(*tbl->entries, nentries); if (!tbl->entries) goto err; @@ -1535,11 +1535,11 @@ int self_check_eba(struct ubi_device *ubi, struct ubi_attach_info *ai_fastmap, num_volumes = ubi->vtbl_slots + UBI_INT_VOL_COUNT; - scan_eba = kmalloc_objs(*scan_eba, num_volumes, GFP_KERNEL); + scan_eba = kmalloc_objs(*scan_eba, num_volumes); if (!scan_eba) return -ENOMEM; - fm_eba = kmalloc_objs(*fm_eba, num_volumes, GFP_KERNEL); + fm_eba = kmalloc_objs(*fm_eba, num_volumes); if (!fm_eba) { kfree(scan_eba); return -ENOMEM; diff --git a/drivers/mtd/ubi/fastmap.c b/drivers/mtd/ubi/fastmap.c index 30953ff2ff52..3bce1b4d8464 100644 --- a/drivers/mtd/ubi/fastmap.c +++ b/drivers/mtd/ubi/fastmap.c @@ -889,13 +889,13 @@ int ubi_scan_fastmap(struct ubi_device *ubi, struct ubi_attach_info *ai, down_write(&ubi->fm_protect); memset(ubi->fm_buf, 0, ubi->fm_size); - fmsb = kmalloc_obj(*fmsb, GFP_KERNEL); + fmsb = kmalloc_obj(*fmsb); if (!fmsb) { ret = -ENOMEM; goto out; } - fm = kzalloc_obj(*fm, GFP_KERNEL); + fm = kzalloc_obj(*fm); if (!fm) { ret = -ENOMEM; kfree(fmsb); diff --git a/drivers/mtd/ubi/gluebi.c b/drivers/mtd/ubi/gluebi.c index e56b4172264c..e3891ae82dfa 100644 --- a/drivers/mtd/ubi/gluebi.c +++ b/drivers/mtd/ubi/gluebi.c @@ -281,7 +281,7 @@ static int gluebi_create(struct ubi_device_info *di, struct gluebi_device *gluebi, *g; struct mtd_info *mtd; - gluebi = kzalloc_obj(struct gluebi_device, GFP_KERNEL); + gluebi = kzalloc_obj(struct gluebi_device); if (!gluebi) return -ENOMEM; diff --git a/drivers/mtd/ubi/kapi.c b/drivers/mtd/ubi/kapi.c index 7cc239245e42..9626990f67cb 100644 --- a/drivers/mtd/ubi/kapi.c +++ b/drivers/mtd/ubi/kapi.c @@ -140,7 +140,7 @@ struct ubi_volume_desc *ubi_open_volume(int ubi_num, int vol_id, int mode) goto out_put_ubi; } - desc = kmalloc_obj(struct ubi_volume_desc, GFP_KERNEL); + desc = kmalloc_obj(struct ubi_volume_desc); if (!desc) { err = -ENOMEM; goto out_put_ubi; diff --git a/drivers/mtd/ubi/nvmem.c b/drivers/mtd/ubi/nvmem.c index bc2cfb355d5c..2dade9727cf2 100644 --- a/drivers/mtd/ubi/nvmem.c +++ b/drivers/mtd/ubi/nvmem.c @@ -75,7 +75,7 @@ static int ubi_nvmem_add(struct ubi_volume_info *vi) WARN_ON_ONCE(vi->size <= 0)) return -EINVAL; - unv = kzalloc_obj(struct ubi_nvmem, GFP_KERNEL); + unv = kzalloc_obj(struct ubi_nvmem); if (!unv) return -ENOMEM; diff --git a/drivers/mtd/ubi/vmt.c b/drivers/mtd/ubi/vmt.c index ffec2c649698..50192b95b6e4 100644 --- a/drivers/mtd/ubi/vmt.c +++ b/drivers/mtd/ubi/vmt.c @@ -172,7 +172,7 @@ int ubi_create_volume(struct ubi_device *ubi, struct ubi_mkvol_req *req) if (ubi->ro_mode) return -EROFS; - vol = kzalloc_obj(struct ubi_volume, GFP_KERNEL); + vol = kzalloc_obj(struct ubi_volume); if (!vol) return -ENOMEM; diff --git a/drivers/mtd/ubi/vtbl.c b/drivers/mtd/ubi/vtbl.c index 74427a03e896..06d87a3013a5 100644 --- a/drivers/mtd/ubi/vtbl.c +++ b/drivers/mtd/ubi/vtbl.c @@ -531,7 +531,7 @@ static int init_volumes(struct ubi_device *ubi, if (be32_to_cpu(vtbl[i].reserved_pebs) == 0) continue; /* Empty record */ - vol = kzalloc_obj(struct ubi_volume, GFP_KERNEL); + vol = kzalloc_obj(struct ubi_volume); if (!vol) return -ENOMEM; @@ -623,7 +623,7 @@ static int init_volumes(struct ubi_device *ubi, } /* And add the layout volume */ - vol = kzalloc_obj(struct ubi_volume, GFP_KERNEL); + vol = kzalloc_obj(struct ubi_volume); if (!vol) return -ENOMEM; |
