summaryrefslogtreecommitdiff
path: root/drivers/scsi
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2026-02-21 16:37:42 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2026-02-21 17:09:51 -0800
commitbf4afc53b77aeaa48b5409da5c8da6bb4eff7f43 (patch)
tree01fdd9d27f1b272bef0127966e08eac44d134d0a /drivers/scsi
parente19e1b480ac73c3e62ffebbca1174f0f511f43e7 (diff)
downloadlwn-bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43.tar.gz
lwn-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/scsi')
-rw-r--r--drivers/scsi/3w-9xxx.c2
-rw-r--r--drivers/scsi/3w-sas.c2
-rw-r--r--drivers/scsi/BusLogic.c2
-rw-r--r--drivers/scsi/a4000t.c2
-rw-r--r--drivers/scsi/aacraid/aachba.c2
-rw-r--r--drivers/scsi/aacraid/commctrl.c2
-rw-r--r--drivers/scsi/aacraid/comminit.c2
-rw-r--r--drivers/scsi/aacraid/commsup.c8
-rw-r--r--drivers/scsi/advansys.c2
-rw-r--r--drivers/scsi/aic94xx/aic94xx_init.c6
-rw-r--r--drivers/scsi/aic94xx/aic94xx_sds.c6
-rw-r--r--drivers/scsi/am53c974.c2
-rw-r--r--drivers/scsi/arm/queue.c2
-rw-r--r--drivers/scsi/be2iscsi/be_main.c4
-rw-r--r--drivers/scsi/bfa/bfa_fcs_lport.c2
-rw-r--r--drivers/scsi/bfa/bfad.c6
-rw-r--r--drivers/scsi/bfa/bfad_attr.c2
-rw-r--r--drivers/scsi/bfa/bfad_bsg.c2
-rw-r--r--drivers/scsi/bfa/bfad_debugfs.c8
-rw-r--r--drivers/scsi/bfa/bfad_im.c4
-rw-r--r--drivers/scsi/bnx2fc/bnx2fc_fcoe.c6
-rw-r--r--drivers/scsi/bnx2fc/bnx2fc_io.c4
-rw-r--r--drivers/scsi/bvme6000_scsi.c2
-rw-r--r--drivers/scsi/ch.c4
-rw-r--r--drivers/scsi/csiostor/csio_hw.c4
-rw-r--r--drivers/scsi/csiostor/csio_init.c2
-rw-r--r--drivers/scsi/csiostor/csio_lnode.c4
-rw-r--r--drivers/scsi/csiostor/csio_scsi.c4
-rw-r--r--drivers/scsi/csiostor/csio_wr.c4
-rw-r--r--drivers/scsi/device_handler/scsi_dh_alua.c6
-rw-r--r--drivers/scsi/device_handler/scsi_dh_emc.c2
-rw-r--r--drivers/scsi/device_handler/scsi_dh_hp_sw.c2
-rw-r--r--drivers/scsi/device_handler/scsi_dh_rdac.c4
-rw-r--r--drivers/scsi/elx/efct/efct_driver.c2
-rw-r--r--drivers/scsi/elx/efct/efct_hw.c16
-rw-r--r--drivers/scsi/elx/efct/efct_hw_queues.c12
-rw-r--r--drivers/scsi/elx/efct/efct_io.c4
-rw-r--r--drivers/scsi/elx/efct/efct_lio.c12
-rw-r--r--drivers/scsi/elx/efct/efct_xport.c2
-rw-r--r--drivers/scsi/esas2r/esas2r_init.c2
-rw-r--r--drivers/scsi/esas2r/esas2r_main.c2
-rw-r--r--drivers/scsi/esp_scsi.c2
-rw-r--r--drivers/scsi/fcoe/fcoe.c2
-rw-r--r--drivers/scsi/fcoe/fcoe_ctlr.c2
-rw-r--r--drivers/scsi/fcoe/fcoe_transport.c2
-rw-r--r--drivers/scsi/fnic/fdls_disc.c2
-rw-r--r--drivers/scsi/fnic/fip.c2
-rw-r--r--drivers/scsi/fnic/fnic_debugfs.c6
-rw-r--r--drivers/scsi/fnic/fnic_main.c2
-rw-r--r--drivers/scsi/fnic/vnic_dev.c2
-rw-r--r--drivers/scsi/hpsa.c52
-rw-r--r--drivers/scsi/ibmvscsi/ibmvfc.c2
-rw-r--r--drivers/scsi/ibmvscsi/ibmvscsi.c2
-rw-r--r--drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c4
-rw-r--r--drivers/scsi/ibmvscsi_tgt/libsrp.c8
-rw-r--r--drivers/scsi/imm.c2
-rw-r--r--drivers/scsi/ipr.c4
-rw-r--r--drivers/scsi/ips.c8
-rw-r--r--drivers/scsi/iscsi_boot_sysfs.c4
-rw-r--r--drivers/scsi/lasi700.c2
-rw-r--r--drivers/scsi/libfc/fc_disc.c2
-rw-r--r--drivers/scsi/libfc/fc_fcp.c2
-rw-r--r--drivers/scsi/libfc/fc_lport.c4
-rw-r--r--drivers/scsi/libsas/sas_ata.c2
-rw-r--r--drivers/scsi/libsas/sas_expander.c2
-rw-r--r--drivers/scsi/libsas/sas_init.c2
-rw-r--r--drivers/scsi/libsas/sas_internal.h2
-rw-r--r--drivers/scsi/lpfc/lpfc_attr.c2
-rw-r--r--drivers/scsi/lpfc/lpfc_bsg.c36
-rw-r--r--drivers/scsi/lpfc/lpfc_ct.c18
-rw-r--r--drivers/scsi/lpfc/lpfc_debugfs.c34
-rw-r--r--drivers/scsi/lpfc/lpfc_els.c16
-rw-r--r--drivers/scsi/lpfc/lpfc_hbadisc.c6
-rw-r--r--drivers/scsi/lpfc/lpfc_init.c26
-rw-r--r--drivers/scsi/lpfc/lpfc_mbox.c2
-rw-r--r--drivers/scsi/lpfc/lpfc_mem.c6
-rw-r--r--drivers/scsi/lpfc/lpfc_nportdisc.c4
-rw-r--r--drivers/scsi/lpfc/lpfc_nvme.c4
-rw-r--r--drivers/scsi/lpfc/lpfc_nvmet.c4
-rw-r--r--drivers/scsi/lpfc/lpfc_scsi.c2
-rw-r--r--drivers/scsi/lpfc/lpfc_sli.c16
-rw-r--r--drivers/scsi/mac_esp.c2
-rw-r--r--drivers/scsi/megaraid.c2
-rw-r--r--drivers/scsi/megaraid/megaraid_mbox.c12
-rw-r--r--drivers/scsi/megaraid/megaraid_mm.c2
-rw-r--r--drivers/scsi/megaraid/megaraid_sas_base.c6
-rw-r--r--drivers/scsi/megaraid/megaraid_sas_debugfs.c2
-rw-r--r--drivers/scsi/megaraid/megaraid_sas_fusion.c4
-rw-r--r--drivers/scsi/mpi3mr/mpi3mr_fw.c2
-rw-r--r--drivers/scsi/mpi3mr/mpi3mr_os.c6
-rw-r--r--drivers/scsi/mpi3mr/mpi3mr_transport.c8
-rw-r--r--drivers/scsi/mpt3sas/mpt3sas_base.c2
-rw-r--r--drivers/scsi/mpt3sas/mpt3sas_ctl.c4
-rw-r--r--drivers/scsi/mpt3sas/mpt3sas_debugfs.c2
-rw-r--r--drivers/scsi/mpt3sas/mpt3sas_scsih.c34
-rw-r--r--drivers/scsi/mpt3sas/mpt3sas_transport.c2
-rw-r--r--drivers/scsi/mvme16x_scsi.c2
-rw-r--r--drivers/scsi/mvsas/mv_init.c4
-rw-r--r--drivers/scsi/mvumi.c8
-rw-r--r--drivers/scsi/myrb.c4
-rw-r--r--drivers/scsi/myrs.c8
-rw-r--r--drivers/scsi/pcmcia/aha152x_stub.c2
-rw-r--r--drivers/scsi/pcmcia/nsp_cs.c2
-rw-r--r--drivers/scsi/pcmcia/qlogic_stub.c2
-rw-r--r--drivers/scsi/pcmcia/sym53c500_cs.c2
-rw-r--r--drivers/scsi/pm8001/pm8001_hwi.c6
-rw-r--r--drivers/scsi/pm8001/pm8001_init.c6
-rw-r--r--drivers/scsi/pm8001/pm80xx_hwi.c2
-rw-r--r--drivers/scsi/pmcraid.c2
-rw-r--r--drivers/scsi/ppa.c2
-rw-r--r--drivers/scsi/qedf/qedf_debugfs.c2
-rw-r--r--drivers/scsi/qedf/qedf_io.c4
-rw-r--r--drivers/scsi/qedf/qedf_main.c6
-rw-r--r--drivers/scsi/qedi/qedi_iscsi.c4
-rw-r--r--drivers/scsi/qedi/qedi_main.c8
-rw-r--r--drivers/scsi/qla2xxx/qla_bsg.c12
-rw-r--r--drivers/scsi/qla2xxx/qla_edif.c6
-rw-r--r--drivers/scsi/qla2xxx/qla_init.c4
-rw-r--r--drivers/scsi/qla2xxx/qla_mid.c4
-rw-r--r--drivers/scsi/qla2xxx/qla_nx.c2
-rw-r--r--drivers/scsi/qla2xxx/qla_os.c10
-rw-r--r--drivers/scsi/qla2xxx/qla_target.c2
-rw-r--r--drivers/scsi/qla2xxx/tcm_qla2xxx.c8
-rw-r--r--drivers/scsi/qla4xxx/ql4_iocb.c2
-rw-r--r--drivers/scsi/qla4xxx/ql4_nx.c2
-rw-r--r--drivers/scsi/raid_class.c4
-rw-r--r--drivers/scsi/scsi_debug.c8
-rw-r--r--drivers/scsi/scsi_devinfo.c6
-rw-r--r--drivers/scsi/scsi_proc.c2
-rw-r--r--drivers/scsi/scsi_scan.c2
-rw-r--r--drivers/scsi/scsi_transport_fc.c2
-rw-r--r--drivers/scsi/scsi_transport_iscsi.c2
-rw-r--r--drivers/scsi/scsi_transport_sas.c10
-rw-r--r--drivers/scsi/scsi_transport_spi.c2
-rw-r--r--drivers/scsi/scsi_transport_srp.c4
-rw-r--r--drivers/scsi/sd.c4
-rw-r--r--drivers/scsi/ses.c2
-rw-r--r--drivers/scsi/sg.c4
-rw-r--r--drivers/scsi/sim710.c2
-rw-r--r--drivers/scsi/smartpqi/smartpqi_init.c22
-rw-r--r--drivers/scsi/smartpqi/smartpqi_sas_transport.c8
-rw-r--r--drivers/scsi/sni_53c710.c2
-rw-r--r--drivers/scsi/snic/snic_disc.c2
-rw-r--r--drivers/scsi/snic/snic_main.c2
-rw-r--r--drivers/scsi/sr.c2
-rw-r--r--drivers/scsi/st.c12
-rw-r--r--drivers/scsi/stex.c2
-rw-r--r--drivers/scsi/storvsc_drv.c2
-rw-r--r--drivers/scsi/sym53c8xx_2/sym_hipd.c2
-rw-r--r--drivers/scsi/virtio_scsi.c4
-rw-r--r--drivers/scsi/zorro7xx.c2
-rw-r--r--drivers/scsi/zorro_esp.c2
152 files changed, 403 insertions, 403 deletions
diff --git a/drivers/scsi/3w-9xxx.c b/drivers/scsi/3w-9xxx.c
index 35bc55f8195d..9b93a2440af8 100644
--- a/drivers/scsi/3w-9xxx.c
+++ b/drivers/scsi/3w-9xxx.c
@@ -1184,7 +1184,7 @@ static int twa_initialize_device_extension(TW_Device_Extension *tw_dev)
}
/* Allocate event info space */
- tw_dev->event_queue[0] = kzalloc_objs(TW_Event, TW_Q_LENGTH, GFP_KERNEL);
+ tw_dev->event_queue[0] = kzalloc_objs(TW_Event, TW_Q_LENGTH);
if (!tw_dev->event_queue[0]) {
TW_PRINTK(tw_dev->host, TW_DRIVER, 0x18, "Event info memory allocation failed");
goto out;
diff --git a/drivers/scsi/3w-sas.c b/drivers/scsi/3w-sas.c
index cbc3af2694cb..52dc1aa639f7 100644
--- a/drivers/scsi/3w-sas.c
+++ b/drivers/scsi/3w-sas.c
@@ -1052,7 +1052,7 @@ static int twl_initialize_device_extension(TW_Device_Extension *tw_dev)
}
/* Allocate event info space */
- tw_dev->event_queue[0] = kzalloc_objs(TW_Event, TW_Q_LENGTH, GFP_KERNEL);
+ tw_dev->event_queue[0] = kzalloc_objs(TW_Event, TW_Q_LENGTH);
if (!tw_dev->event_queue[0]) {
TW_PRINTK(tw_dev->host, TW_DRIVER, 0xc, "Event info memory allocation failed");
goto out;
diff --git a/drivers/scsi/BusLogic.c b/drivers/scsi/BusLogic.c
index 1152a0151545..6545ef855bd1 100644
--- a/drivers/scsi/BusLogic.c
+++ b/drivers/scsi/BusLogic.c
@@ -2222,7 +2222,7 @@ static int __init blogic_init(void)
return -ENOMEM;
}
- adapter = kzalloc_obj(struct blogic_adapter, GFP_KERNEL);
+ adapter = kzalloc_obj(struct blogic_adapter);
if (adapter == NULL) {
kfree(blogic_probeinfo_list);
blogic_err("BusLogic: Unable to allocate Prototype Host Adapter\n", NULL);
diff --git a/drivers/scsi/a4000t.c b/drivers/scsi/a4000t.c
index cf7d1f867081..a02638b477de 100644
--- a/drivers/scsi/a4000t.c
+++ b/drivers/scsi/a4000t.c
@@ -47,7 +47,7 @@ static int __init amiga_a4000t_scsi_probe(struct platform_device *pdev)
"A4000T builtin SCSI"))
return -EBUSY;
- hostdata = kzalloc_obj(struct NCR_700_Host_Parameters, GFP_KERNEL);
+ hostdata = kzalloc_obj(struct NCR_700_Host_Parameters);
if (!hostdata) {
dev_err(&pdev->dev, "Failed to allocate host data\n");
goto out_release;
diff --git a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c
index 6df882e264f6..2e8119ce4411 100644
--- a/drivers/scsi/aacraid/aachba.c
+++ b/drivers/scsi/aacraid/aachba.c
@@ -820,7 +820,7 @@ int aac_probe_container(struct aac_dev *dev, int cid)
{
struct aac_cmd_priv *cmd_priv;
struct scsi_cmnd *scsicmd = kzalloc(sizeof(*scsicmd) + sizeof(*cmd_priv), GFP_KERNEL);
- struct scsi_device *scsidev = kzalloc_obj(*scsidev, GFP_KERNEL);
+ struct scsi_device *scsidev = kzalloc_obj(*scsidev);
int status;
if (!scsicmd || !scsidev) {
diff --git a/drivers/scsi/aacraid/commctrl.c b/drivers/scsi/aacraid/commctrl.c
index f7dca5ab3f6d..bd82aeb679ae 100644
--- a/drivers/scsi/aacraid/commctrl.c
+++ b/drivers/scsi/aacraid/commctrl.c
@@ -169,7 +169,7 @@ static int open_getadapter_fib(struct aac_dev * dev, void __user *arg)
struct aac_fib_context * fibctx;
int status;
- fibctx = kmalloc_obj(struct aac_fib_context, GFP_KERNEL);
+ fibctx = kmalloc_obj(struct aac_fib_context);
if (fibctx == NULL) {
status = -ENOMEM;
} else {
diff --git a/drivers/scsi/aacraid/comminit.c b/drivers/scsi/aacraid/comminit.c
index e425dee827a3..9bd3f5b868bc 100644
--- a/drivers/scsi/aacraid/comminit.c
+++ b/drivers/scsi/aacraid/comminit.c
@@ -632,7 +632,7 @@ struct aac_dev *aac_init_adapter(struct aac_dev *dev)
* Ok now init the communication subsystem
*/
- dev->queues = kzalloc_obj(struct aac_queue_block, GFP_KERNEL);
+ dev->queues = kzalloc_obj(struct aac_queue_block);
if (dev->queues == NULL) {
printk(KERN_ERR "Error could not allocate comm region.\n");
return NULL;
diff --git a/drivers/scsi/aacraid/commsup.c b/drivers/scsi/aacraid/commsup.c
index 3502e5e47539..c4485629f792 100644
--- a/drivers/scsi/aacraid/commsup.c
+++ b/drivers/scsi/aacraid/commsup.c
@@ -1907,13 +1907,13 @@ static int fillup_pools(struct aac_dev *dev, struct hw_fib **hw_fib_pool,
hw_fib_p = hw_fib_pool;
fib_p = fib_pool;
while (hw_fib_p < &hw_fib_pool[num]) {
- *(hw_fib_p) = kmalloc_obj(struct hw_fib, GFP_KERNEL);
+ *(hw_fib_p) = kmalloc_obj(struct hw_fib);
if (!(*(hw_fib_p++))) {
--hw_fib_p;
break;
}
- *(fib_p) = kmalloc_obj(struct fib, GFP_KERNEL);
+ *(fib_p) = kmalloc_obj(struct fib);
if (!(*(fib_p++))) {
kfree(*(--hw_fib_p));
break;
@@ -2101,11 +2101,11 @@ static void aac_process_events(struct aac_dev *dev)
if (!num)
goto free_fib;
- hw_fib_pool = kmalloc_objs(struct hw_fib *, num, GFP_KERNEL);
+ hw_fib_pool = kmalloc_objs(struct hw_fib *, num);
if (!hw_fib_pool)
goto free_fib;
- fib_pool = kmalloc_objs(struct fib *, num, GFP_KERNEL);
+ fib_pool = kmalloc_objs(struct fib *, num);
if (!fib_pool)
goto free_hw_fib_pool;
diff --git a/drivers/scsi/advansys.c b/drivers/scsi/advansys.c
index f78448254f99..fcf059bf41e8 100644
--- a/drivers/scsi/advansys.c
+++ b/drivers/scsi/advansys.c
@@ -11314,7 +11314,7 @@ static int advansys_eisa_probe(struct device *dev)
struct eisa_scsi_data *data;
err = -ENOMEM;
- data = kzalloc_obj(*data, GFP_KERNEL);
+ data = kzalloc_obj(*data);
if (!data)
goto fail;
ioport = edev->base_addr + 0xc30;
diff --git a/drivers/scsi/aic94xx/aic94xx_init.c b/drivers/scsi/aic94xx/aic94xx_init.c
index 243f8d6166a5..4400a3661d90 100644
--- a/drivers/scsi/aic94xx/aic94xx_init.c
+++ b/drivers/scsi/aic94xx/aic94xx_init.c
@@ -642,9 +642,9 @@ static int asd_register_sas_ha(struct asd_ha_struct *asd_ha)
{
int i;
struct asd_sas_phy **sas_phys =
- kzalloc_objs(*sas_phys, ASD_MAX_PHYS, GFP_KERNEL);
+ kzalloc_objs(*sas_phys, ASD_MAX_PHYS);
struct asd_sas_port **sas_ports =
- kzalloc_objs(*sas_ports, ASD_MAX_PHYS, GFP_KERNEL);
+ kzalloc_objs(*sas_ports, ASD_MAX_PHYS);
if (!sas_phys || !sas_ports) {
kfree(sas_phys);
@@ -710,7 +710,7 @@ static int asd_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
asd_dev = &asd_pcidev_data[asd_id];
- asd_ha = kzalloc_obj(*asd_ha, GFP_KERNEL);
+ asd_ha = kzalloc_obj(*asd_ha);
if (!asd_ha) {
asd_printk("out of memory\n");
goto Err_put;
diff --git a/drivers/scsi/aic94xx/aic94xx_sds.c b/drivers/scsi/aic94xx/aic94xx_sds.c
index 89d1e385af69..57818393f9f0 100644
--- a/drivers/scsi/aic94xx/aic94xx_sds.c
+++ b/drivers/scsi/aic94xx/aic94xx_sds.c
@@ -207,7 +207,7 @@ static int asd_get_bios_chim(struct asd_ha_struct *asd_ha,
goto out;
}
err = -ENOMEM;
- bc_struct = kmalloc_obj(*bc_struct, GFP_KERNEL);
+ bc_struct = kmalloc_obj(*bc_struct);
if (!bc_struct) {
asd_printk("no memory for bios_chim struct\n");
goto out;
@@ -341,7 +341,7 @@ int asd_read_ocm(struct asd_ha_struct *asd_ha)
if (asd_hwi_check_ocm_access(asd_ha))
return -1;
- dir = kmalloc_obj(*dir, GFP_KERNEL);
+ dir = kmalloc_obj(*dir);
if (!dir) {
asd_printk("no memory for ocm dir\n");
return -ENOMEM;
@@ -1040,7 +1040,7 @@ int asd_read_flash(struct asd_ha_struct *asd_ha)
if (err)
return err;
- flash_dir = kmalloc_obj(*flash_dir, GFP_KERNEL);
+ flash_dir = kmalloc_obj(*flash_dir);
if (!flash_dir)
return -ENOMEM;
diff --git a/drivers/scsi/am53c974.c b/drivers/scsi/am53c974.c
index 734b5a9dcf5e..f972a3c90a2f 100644
--- a/drivers/scsi/am53c974.c
+++ b/drivers/scsi/am53c974.c
@@ -396,7 +396,7 @@ static int pci_esp_probe_one(struct pci_dev *pdev,
goto fail_disable_device;
}
- pep = kzalloc_obj(struct pci_esp_priv, GFP_KERNEL);
+ pep = kzalloc_obj(struct pci_esp_priv);
if (!pep) {
dev_printk(KERN_INFO, &pdev->dev,
"failed to allocate esp_priv\n");
diff --git a/drivers/scsi/arm/queue.c b/drivers/scsi/arm/queue.c
index 2849f59b6015..797cf4971f5d 100644
--- a/drivers/scsi/arm/queue.c
+++ b/drivers/scsi/arm/queue.c
@@ -71,7 +71,7 @@ int queue_initialise (Queue_t *queue)
* need to keep free lists or allocate this
* memory.
*/
- queue->alloc = q = kmalloc_objs(QE_t, nqueues, GFP_KERNEL);
+ queue->alloc = q = kmalloc_objs(QE_t, nqueues);
if (q) {
for (; nqueues; q++, nqueues--) {
SET_MAGIC(q, QUEUE_MAGIC_FREE);
diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c
index 1242ae2694c1..6c264def9911 100644
--- a/drivers/scsi/be2iscsi/be_main.c
+++ b/drivers/scsi/be2iscsi/be_main.c
@@ -2484,7 +2484,7 @@ static int beiscsi_alloc_mem(struct beiscsi_hba *phba)
return -ENOMEM;
}
- phba->init_mem = kzalloc_objs(*mem_descr, SE_MEM_MAX, GFP_KERNEL);
+ phba->init_mem = kzalloc_objs(*mem_descr, SE_MEM_MAX);
if (!phba->init_mem) {
kfree(phwi_ctrlr->wrb_context);
kfree(phba->phwi_ctrlr);
@@ -2540,7 +2540,7 @@ static int beiscsi_alloc_mem(struct beiscsi_hba *phba)
} while (alloc_size);
mem_descr->num_elements = j;
mem_descr->size_in_bytes = phba->mem_req[i];
- mem_descr->mem_array = kmalloc_objs(*mem_arr, j, GFP_KERNEL);
+ mem_descr->mem_array = kmalloc_objs(*mem_arr, j);
if (!mem_descr->mem_array)
goto free_mem;
diff --git a/drivers/scsi/bfa/bfa_fcs_lport.c b/drivers/scsi/bfa/bfa_fcs_lport.c
index 9285e9922ea8..2df399c537c1 100644
--- a/drivers/scsi/bfa/bfa_fcs_lport.c
+++ b/drivers/scsi/bfa/bfa_fcs_lport.c
@@ -1863,7 +1863,7 @@ bfa_fcs_lport_fdmi_build_rhba_pyld(struct bfa_fcs_lport_fdmi_s *fdmi, u8 *pyld)
u8 *curr_ptr;
u16 templen, count;
- fcs_hba_attr = kzalloc_obj(*fcs_hba_attr, GFP_KERNEL);
+ fcs_hba_attr = kzalloc_obj(*fcs_hba_attr);
if (!fcs_hba_attr)
return -ENOMEM;
diff --git a/drivers/scsi/bfa/bfad.c b/drivers/scsi/bfa/bfad.c
index 629942abc5ca..448f736457f0 100644
--- a/drivers/scsi/bfa/bfad.c
+++ b/drivers/scsi/bfa/bfad.c
@@ -640,7 +640,7 @@ bfad_vport_create(struct bfad_s *bfad, u16 vf_id,
unsigned long flags;
struct completion fcomp;
- vport = kzalloc_obj(struct bfad_vport_s, GFP_KERNEL);
+ vport = kzalloc_obj(struct bfad_vport_s);
if (!vport) {
rc = BFA_STATUS_ENOMEM;
goto ext;
@@ -1271,13 +1271,13 @@ bfad_pci_probe(struct pci_dev *pdev, const struct pci_device_id *pid)
(PCI_FUNC(pdev->devfn) != 0))
return -ENODEV;
- bfad = kzalloc_obj(struct bfad_s, GFP_KERNEL);
+ bfad = kzalloc_obj(struct bfad_s);
if (!bfad) {
error = -ENOMEM;
goto out;
}
- bfad->trcmod = kzalloc_obj(struct bfa_trc_mod_s, GFP_KERNEL);
+ bfad->trcmod = kzalloc_obj(struct bfa_trc_mod_s);
if (!bfad->trcmod) {
printk(KERN_WARNING "Error alloc trace buffer!\n");
error = -ENOMEM;
diff --git a/drivers/scsi/bfa/bfad_attr.c b/drivers/scsi/bfa/bfad_attr.c
index 50f975d63c07..9751beff817d 100644
--- a/drivers/scsi/bfa/bfad_attr.c
+++ b/drivers/scsi/bfa/bfad_attr.c
@@ -264,7 +264,7 @@ bfad_im_get_stats(struct Scsi_Host *shost)
bfa_status_t rc;
unsigned long flags;
- fcstats = kzalloc_obj(union bfa_port_stats_u, GFP_KERNEL);
+ fcstats = kzalloc_obj(union bfa_port_stats_u);
if (fcstats == NULL)
return NULL;
diff --git a/drivers/scsi/bfa/bfad_bsg.c b/drivers/scsi/bfa/bfad_bsg.c
index 0a33657e67d5..292bc9aa43f1 100644
--- a/drivers/scsi/bfa/bfad_bsg.c
+++ b/drivers/scsi/bfa/bfad_bsg.c
@@ -3410,7 +3410,7 @@ bfad_im_bsg_els_ct_request(struct bsg_job *job)
goto out;
}
- drv_fcxp = kzalloc_obj(struct bfad_fcxp, GFP_KERNEL);
+ drv_fcxp = kzalloc_obj(struct bfad_fcxp);
if (drv_fcxp == NULL) {
kfree(bsg_fcpt);
rc = -ENOMEM;
diff --git a/drivers/scsi/bfa/bfad_debugfs.c b/drivers/scsi/bfa/bfad_debugfs.c
index 335f5f6a96fa..2f9bb8fa7fa7 100644
--- a/drivers/scsi/bfa/bfad_debugfs.c
+++ b/drivers/scsi/bfa/bfad_debugfs.c
@@ -46,7 +46,7 @@ bfad_debugfs_open_drvtrc(struct inode *inode, struct file *file)
struct bfad_s *bfad = port->bfad;
struct bfad_debug_info *debug;
- debug = kzalloc_obj(struct bfad_debug_info, GFP_KERNEL);
+ debug = kzalloc_obj(struct bfad_debug_info);
if (!debug)
return -ENOMEM;
@@ -67,7 +67,7 @@ bfad_debugfs_open_fwtrc(struct inode *inode, struct file *file)
unsigned long flags;
int rc;
- fw_debug = kzalloc_obj(struct bfad_debug_info, GFP_KERNEL);
+ fw_debug = kzalloc_obj(struct bfad_debug_info);
if (!fw_debug)
return -ENOMEM;
@@ -109,7 +109,7 @@ bfad_debugfs_open_fwsave(struct inode *inode, struct file *file)
unsigned long flags;
int rc;
- fw_debug = kzalloc_obj(struct bfad_debug_info, GFP_KERNEL);
+ fw_debug = kzalloc_obj(struct bfad_debug_info);
if (!fw_debug)
return -ENOMEM;
@@ -147,7 +147,7 @@ bfad_debugfs_open_reg(struct inode *inode, struct file *file)
{
struct bfad_debug_info *reg_debug;
- reg_debug = kzalloc_obj(struct bfad_debug_info, GFP_KERNEL);
+ reg_debug = kzalloc_obj(struct bfad_debug_info);
if (!reg_debug)
return -ENOMEM;
diff --git a/drivers/scsi/bfa/bfad_im.c b/drivers/scsi/bfa/bfad_im.c
index 1feb2a9517c7..97990b285e17 100644
--- a/drivers/scsi/bfa/bfad_im.c
+++ b/drivers/scsi/bfa/bfad_im.c
@@ -698,7 +698,7 @@ bfad_im_probe(struct bfad_s *bfad)
{
struct bfad_im_s *im;
- im = kzalloc_obj(struct bfad_im_s, GFP_KERNEL);
+ im = kzalloc_obj(struct bfad_im_s);
if (im == NULL)
return BFA_STATUS_ENOMEM;
@@ -994,7 +994,7 @@ bfad_im_supported_speeds(struct bfa_s *bfa)
struct bfa_ioc_attr_s *ioc_attr;
u32 supported_speed = 0;
- ioc_attr = kzalloc_obj(struct bfa_ioc_attr_s, GFP_KERNEL);
+ ioc_attr = kzalloc_obj(struct bfa_ioc_attr_s);
if (!ioc_attr)
return 0;
diff --git a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
index 84f7f7ef75b3..c2f2c383b1f4 100644
--- a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
+++ b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
@@ -1356,7 +1356,7 @@ static struct bnx2fc_hba *bnx2fc_hba_create(struct cnic_dev *cnic)
struct fcoe_capabilities *fcoe_cap;
int rc;
- hba = kzalloc_obj(*hba, GFP_KERNEL);
+ hba = kzalloc_obj(*hba);
if (!hba) {
printk(KERN_ERR PFX "Unable to allocate hba structure\n");
return NULL;
@@ -1492,7 +1492,7 @@ static struct fc_lport *bnx2fc_if_create(struct bnx2fc_interface *interface,
struct bnx2fc_hba *hba = interface->hba;
int rc = 0;
- blport = kzalloc_obj(struct bnx2fc_lport, GFP_KERNEL);
+ blport = kzalloc_obj(struct bnx2fc_lport);
if (!blport) {
BNX2FC_HBA_DBG(ctlr->lp, "Unable to alloc blport\n");
return NULL;
@@ -2200,7 +2200,7 @@ static int __bnx2fc_enable(struct fcoe_ctlr *ctlr)
if (!hba->cnic->get_fc_npiv_tbl)
goto done;
- npiv_tbl = kzalloc_obj(struct cnic_fc_npiv_tbl, GFP_KERNEL);
+ npiv_tbl = kzalloc_obj(struct cnic_fc_npiv_tbl);
if (!npiv_tbl)
goto done;
diff --git a/drivers/scsi/bnx2fc/bnx2fc_io.c b/drivers/scsi/bnx2fc/bnx2fc_io.c
index ba299196dee9..d8d6afed1575 100644
--- a/drivers/scsi/bnx2fc/bnx2fc_io.c
+++ b/drivers/scsi/bnx2fc/bnx2fc_io.c
@@ -241,7 +241,7 @@ struct bnx2fc_cmd_mgr *bnx2fc_cmd_mgr_alloc(struct bnx2fc_hba *hba)
}
cmgr->hba = hba;
- cmgr->free_list = kzalloc_objs(*cmgr->free_list, arr_sz, GFP_KERNEL);
+ cmgr->free_list = kzalloc_objs(*cmgr->free_list, arr_sz);
if (!cmgr->free_list) {
printk(KERN_ERR PFX "failed to alloc free_list\n");
goto mem_err;
@@ -271,7 +271,7 @@ struct bnx2fc_cmd_mgr *bnx2fc_cmd_mgr_alloc(struct bnx2fc_hba *hba)
xid = BNX2FC_MIN_XID;
num_pri_ios = num_ios - hba->elstm_xids;
for (i = 0; i < num_ios; i++) {
- io_req = kzalloc_obj(*io_req, GFP_KERNEL);
+ io_req = kzalloc_obj(*io_req);
if (!io_req) {
printk(KERN_ERR PFX "failed to alloc io_req\n");
diff --git a/drivers/scsi/bvme6000_scsi.c b/drivers/scsi/bvme6000_scsi.c
index f276f4f4eadf..23301edf100d 100644
--- a/drivers/scsi/bvme6000_scsi.c
+++ b/drivers/scsi/bvme6000_scsi.c
@@ -44,7 +44,7 @@ bvme6000_probe(struct platform_device *dev)
if (!MACH_IS_BVME6000)
goto out;
- hostdata = kzalloc_obj(struct NCR_700_Host_Parameters, GFP_KERNEL);
+ hostdata = kzalloc_obj(struct NCR_700_Host_Parameters);
if (!hostdata) {
printk(KERN_ERR "bvme6000-scsi: "
"Failed to allocate host data\n");
diff --git a/drivers/scsi/ch.c b/drivers/scsi/ch.c
index 3a6ab2d09ded..4010fdbf813c 100644
--- a/drivers/scsi/ch.c
+++ b/drivers/scsi/ch.c
@@ -364,7 +364,7 @@ ch_readconfig(scsi_changer *ch)
}
/* look up the devices of the data transfer elements */
- ch->dt = kzalloc_objs(*ch->dt, ch->counts[CHET_DT], GFP_KERNEL);
+ ch->dt = kzalloc_objs(*ch->dt, ch->counts[CHET_DT]);
if (!ch->dt) {
kfree(buffer);
@@ -903,7 +903,7 @@ static int ch_probe(struct scsi_device *sd)
if (sd->type != TYPE_MEDIUM_CHANGER)
return -ENODEV;
- ch = kzalloc_obj(*ch, GFP_KERNEL);
+ ch = kzalloc_obj(*ch);
if (NULL == ch)
return -ENOMEM;
diff --git a/drivers/scsi/csiostor/csio_hw.c b/drivers/scsi/csiostor/csio_hw.c
index 03299d5e523a..df9f81f29950 100644
--- a/drivers/scsi/csiostor/csio_hw.c
+++ b/drivers/scsi/csiostor/csio_hw.c
@@ -2429,7 +2429,7 @@ csio_hw_flash_fw(struct csio_hw *hw, int *reset)
/* allocate memory to read the header of the firmware on the
* card
*/
- card_fw = kmalloc_obj(*card_fw, GFP_KERNEL);
+ card_fw = kmalloc_obj(*card_fw);
if (!card_fw)
return -ENOMEM;
@@ -4389,7 +4389,7 @@ csio_hw_init(struct csio_hw *hw)
INIT_LIST_HEAD(&hw->evt_free_q);
for (i = 0; i < csio_evtq_sz; i++) {
- evt_entry = kzalloc_obj(struct csio_evt_msg, GFP_KERNEL);
+ evt_entry = kzalloc_obj(struct csio_evt_msg);
if (!evt_entry) {
rv = -ENOMEM;
csio_err(hw, "Failed to initialize eventq");
diff --git a/drivers/scsi/csiostor/csio_init.c b/drivers/scsi/csiostor/csio_init.c
index 1d2fcccb46c2..238431524801 100644
--- a/drivers/scsi/csiostor/csio_init.c
+++ b/drivers/scsi/csiostor/csio_init.c
@@ -516,7 +516,7 @@ static struct csio_hw *csio_hw_alloc(struct pci_dev *pdev)
{
struct csio_hw *hw;
- hw = kzalloc_obj(struct csio_hw, GFP_KERNEL);
+ hw = kzalloc_obj(struct csio_hw);
if (!hw)
goto err;
diff --git a/drivers/scsi/csiostor/csio_lnode.c b/drivers/scsi/csiostor/csio_lnode.c
index cdd61b990c64..3e201f2c56da 100644
--- a/drivers/scsi/csiostor/csio_lnode.c
+++ b/drivers/scsi/csiostor/csio_lnode.c
@@ -1837,7 +1837,7 @@ csio_ln_fdmi_init(struct csio_lnode *ln)
struct csio_dma_buf *dma_buf;
/* Allocate MGMT request required for FDMI */
- ln->mgmt_req = kzalloc_obj(struct csio_ioreq, GFP_KERNEL);
+ ln->mgmt_req = kzalloc_obj(struct csio_ioreq);
if (!ln->mgmt_req) {
csio_ln_err(ln, "Failed to alloc ioreq for FDMI\n");
CSIO_INC_STATS(hw, n_err_nomem);
@@ -2002,7 +2002,7 @@ csio_ln_init(struct csio_lnode *ln)
/* This is the lnode used during initialization */
- ln->fcfinfo = kzalloc_obj(struct csio_fcf_info, GFP_KERNEL);
+ ln->fcfinfo = kzalloc_obj(struct csio_fcf_info);
if (!ln->fcfinfo) {
csio_ln_err(ln, "Failed to alloc FCF record\n");
CSIO_INC_STATS(hw, n_err_nomem);
diff --git a/drivers/scsi/csiostor/csio_scsi.c b/drivers/scsi/csiostor/csio_scsi.c
index 2c75c2663f73..b1de615cf316 100644
--- a/drivers/scsi/csiostor/csio_scsi.c
+++ b/drivers/scsi/csiostor/csio_scsi.c
@@ -2341,7 +2341,7 @@ csio_scsi_alloc_ddp_bufs(struct csio_scsim *scm, struct csio_hw *hw,
for (n = 0; n < num_buf; n++) {
/* Set unit size to request size */
unit_size = buf_size;
- ddp_desc = kzalloc_obj(struct csio_dma_buf, GFP_KERNEL);
+ ddp_desc = kzalloc_obj(struct csio_dma_buf);
if (!ddp_desc) {
csio_err(hw,
"Failed to allocate ddp descriptors,"
@@ -2435,7 +2435,7 @@ csio_scsim_init(struct csio_scsim *scm, struct csio_hw *hw)
INIT_LIST_HEAD(&scm->ioreq_freelist);
for (i = 0; i < csio_scsi_ioreqs; i++) {
- ioreq = kzalloc_obj(struct csio_ioreq, GFP_KERNEL);
+ ioreq = kzalloc_obj(struct csio_ioreq);
if (!ioreq) {
csio_err(hw,
"I/O request element allocation failed, "
diff --git a/drivers/scsi/csiostor/csio_wr.c b/drivers/scsi/csiostor/csio_wr.c
index 0310fa71ab07..4769e39a8b64 100644
--- a/drivers/scsi/csiostor/csio_wr.c
+++ b/drivers/scsi/csiostor/csio_wr.c
@@ -1650,12 +1650,12 @@ csio_wrm_init(struct csio_wrm *wrm, struct csio_hw *hw)
return -EINVAL;
}
- wrm->q_arr = kzalloc_objs(struct csio_q *, wrm->num_q, GFP_KERNEL);
+ wrm->q_arr = kzalloc_objs(struct csio_q *, wrm->num_q);
if (!wrm->q_arr)
goto err;
for (i = 0; i < wrm->num_q; i++) {
- wrm->q_arr[i] = kzalloc_obj(struct csio_q, GFP_KERNEL);
+ wrm->q_arr[i] = kzalloc_obj(struct csio_q);
if (!wrm->q_arr[i]) {
while (--i >= 0)
kfree(wrm->q_arr[i]);
diff --git a/drivers/scsi/device_handler/scsi_dh_alua.c b/drivers/scsi/device_handler/scsi_dh_alua.c
index 842476f131fd..efb08b9b145a 100644
--- a/drivers/scsi/device_handler/scsi_dh_alua.c
+++ b/drivers/scsi/device_handler/scsi_dh_alua.c
@@ -219,7 +219,7 @@ static struct alua_port_group *alua_alloc_pg(struct scsi_device *sdev,
{
struct alua_port_group *pg, *tmp_pg;
- pg = kzalloc_obj(struct alua_port_group, GFP_KERNEL);
+ pg = kzalloc_obj(struct alua_port_group);
if (!pg)
return ERR_PTR(-ENOMEM);
@@ -1137,7 +1137,7 @@ static int alua_activate(struct scsi_device *sdev,
struct alua_queue_data *qdata;
struct alua_port_group *pg;
- qdata = kzalloc_obj(*qdata, GFP_KERNEL);
+ qdata = kzalloc_obj(*qdata);
if (!qdata) {
err = SCSI_DH_RES_TEMP_UNAVAIL;
goto out;
@@ -1239,7 +1239,7 @@ static int alua_bus_attach(struct scsi_device *sdev)
struct alua_dh_data *h;
int err;
- h = kzalloc_obj(*h, GFP_KERNEL);
+ h = kzalloc_obj(*h);
if (!h)
return SCSI_DH_NOMEM;
spin_lock_init(&h->pg_lock);
diff --git a/drivers/scsi/device_handler/scsi_dh_emc.c b/drivers/scsi/device_handler/scsi_dh_emc.c
index 5a2f6f09de07..ff41b51ef462 100644
--- a/drivers/scsi/device_handler/scsi_dh_emc.c
+++ b/drivers/scsi/device_handler/scsi_dh_emc.c
@@ -478,7 +478,7 @@ static int clariion_bus_attach(struct scsi_device *sdev)
struct clariion_dh_data *h;
int err;
- h = kzalloc_obj(*h, GFP_KERNEL);
+ h = kzalloc_obj(*h);
if (!h)
return SCSI_DH_NOMEM;
h->lun_state = CLARIION_LUN_UNINITIALIZED;
diff --git a/drivers/scsi/device_handler/scsi_dh_hp_sw.c b/drivers/scsi/device_handler/scsi_dh_hp_sw.c
index 36d877afff4b..6e8849d7f0a3 100644
--- a/drivers/scsi/device_handler/scsi_dh_hp_sw.c
+++ b/drivers/scsi/device_handler/scsi_dh_hp_sw.c
@@ -226,7 +226,7 @@ static int hp_sw_bus_attach(struct scsi_device *sdev)
struct hp_sw_dh_data *h;
int ret;
- h = kzalloc_obj(*h, GFP_KERNEL);
+ h = kzalloc_obj(*h);
if (!h)
return SCSI_DH_NOMEM;
h->path_state = HP_SW_PATH_UNINITIALIZED;
diff --git a/drivers/scsi/device_handler/scsi_dh_rdac.c b/drivers/scsi/device_handler/scsi_dh_rdac.c
index 088dc509d505..88c8e36b221e 100644
--- a/drivers/scsi/device_handler/scsi_dh_rdac.c
+++ b/drivers/scsi/device_handler/scsi_dh_rdac.c
@@ -601,7 +601,7 @@ static int queue_mode_select(struct scsi_device *sdev,
struct rdac_queue_data *qdata;
struct rdac_controller *ctlr;
- qdata = kzalloc_obj(*qdata, GFP_KERNEL);
+ qdata = kzalloc_obj(*qdata);
if (!qdata)
return SCSI_DH_RETRY;
@@ -741,7 +741,7 @@ static int rdac_bus_attach(struct scsi_device *sdev)
char array_name[ARRAY_LABEL_LEN];
char array_id[UNIQUE_ID_LEN];
- h = kzalloc_obj(*h, GFP_KERNEL);
+ h = kzalloc_obj(*h);
if (!h)
return SCSI_DH_NOMEM;
h->lun = UNINITIALIZED_LUN;
diff --git a/drivers/scsi/elx/efct/efct_driver.c b/drivers/scsi/elx/efct/efct_driver.c
index 03c0dbee779f..07c2f453459e 100644
--- a/drivers/scsi/elx/efct/efct_driver.c
+++ b/drivers/scsi/elx/efct/efct_driver.c
@@ -93,7 +93,7 @@ efct_efclib_config(struct efct *efct, struct libefc_function_template *tt)
struct sli4 *sli;
int rc = 0;
- efc = kzalloc_obj(*efc, GFP_KERNEL);
+ efc = kzalloc_obj(*efc);
if (!efc)
return -ENOMEM;
diff --git a/drivers/scsi/elx/efct/efct_hw.c b/drivers/scsi/elx/efct/efct_hw.c
index aba82cb69459..fd9a980ef502 100644
--- a/drivers/scsi/elx/efct/efct_hw.c
+++ b/drivers/scsi/elx/efct/efct_hw.c
@@ -487,14 +487,14 @@ efct_hw_setup_io(struct efct_hw *hw)
struct efct *efct = hw->os;
if (!hw->io) {
- hw->io = kmalloc_objs(io, hw->config.n_io, GFP_KERNEL);
+ hw->io = kmalloc_objs(io, hw->config.n_io);
if (!hw->io)
return -ENOMEM;
memset(hw->io, 0, hw->config.n_io * sizeof(io));
for (i = 0; i < hw->config.n_io; i++) {
- hw->io[i] = kzalloc_obj(*io, GFP_KERNEL);
+ hw->io[i] = kzalloc_obj(*io);
if (!hw->io[i])
goto error;
}
@@ -611,7 +611,7 @@ efct_hw_init_prereg_io(struct efct_hw *hw)
struct efc_dma req;
struct efct *efct = hw->os;
- sgls = kmalloc_objs(*sgls, sgls_per_request, GFP_KERNEL);
+ sgls = kmalloc_objs(*sgls, sgls_per_request);
if (!sgls)
return -ENOMEM;
@@ -1182,7 +1182,7 @@ efct_hw_rx_buffer_alloc(struct efct_hw *hw, u32 rqindex, u32 count,
if (!count)
return NULL;
- rq_buf = kmalloc_objs(*rq_buf, count, GFP_KERNEL);
+ rq_buf = kmalloc_objs(*rq_buf, count);
if (!rq_buf)
return NULL;
memset(rq_buf, 0, sizeof(*rq_buf) * count);
@@ -2064,7 +2064,7 @@ efct_hw_reqtag_pool_alloc(struct efct_hw *hw)
struct reqtag_pool *reqtag_pool;
struct hw_wq_callback *wqcb;
- reqtag_pool = kzalloc_obj(*reqtag_pool, GFP_KERNEL);
+ reqtag_pool = kzalloc_obj(*reqtag_pool);
if (!reqtag_pool)
return NULL;
@@ -2072,7 +2072,7 @@ efct_hw_reqtag_pool_alloc(struct efct_hw *hw)
/* initialize reqtag pool lock */
spin_lock_init(&reqtag_pool->lock);
for (i = 0; i < U16_MAX; i++) {
- wqcb = kmalloc_obj(*wqcb, GFP_KERNEL);
+ wqcb = kmalloc_obj(*wqcb);
if (!wqcb)
break;
@@ -3239,7 +3239,7 @@ efct_hw_async_call(struct efct_hw *hw, efct_hw_async_cb_t callback, void *arg)
* we need this to be persistent as the mbox cmd submission may be
* queued and executed later execution.
*/
- ctx = kzalloc_obj(*ctx, GFP_KERNEL);
+ ctx = kzalloc_obj(*ctx);
if (!ctx)
return -ENOMEM;
@@ -3307,7 +3307,7 @@ efct_hw_firmware_write(struct efct_hw *hw, struct efc_dma *dma, u32 size,
struct efct_hw_fw_wr_cb_arg *cb_arg;
int noc = 0;
- cb_arg = kzalloc_obj(*cb_arg, GFP_KERNEL);
+ cb_arg = kzalloc_obj(*cb_arg);
if (!cb_arg)
return -ENOMEM;
diff --git a/drivers/scsi/elx/efct/efct_hw_queues.c b/drivers/scsi/elx/efct/efct_hw_queues.c
index 83d8f2c37569..3c27f927f96c 100644
--- a/drivers/scsi/elx/efct/efct_hw_queues.c
+++ b/drivers/scsi/elx/efct/efct_hw_queues.c
@@ -127,7 +127,7 @@ efct_hw_map_wq_cpu(struct efct_hw *hw)
struct hw_eq *
efct_hw_new_eq(struct efct_hw *hw, u32 entry_count)
{
- struct hw_eq *eq = kzalloc_obj(*eq, GFP_KERNEL);
+ struct hw_eq *eq = kzalloc_obj(*eq);
if (!eq)
return NULL;
@@ -159,7 +159,7 @@ struct hw_cq *
efct_hw_new_cq(struct hw_eq *eq, u32 entry_count)
{
struct efct_hw *hw = eq->hw;
- struct hw_cq *cq = kzalloc_obj(*cq, GFP_KERNEL);
+ struct hw_cq *cq = kzalloc_obj(*cq);
if (!cq)
return NULL;
@@ -204,7 +204,7 @@ efct_hw_new_cq_set(struct hw_eq *eqs[], struct hw_cq *cqs[],
cqs[i] = NULL;
for (i = 0; i < num_cqs; i++) {
- cq = kzalloc_obj(*cq, GFP_KERNEL);
+ cq = kzalloc_obj(*cq);
if (!cq)
goto error;
@@ -244,7 +244,7 @@ struct hw_mq *
efct_hw_new_mq(struct hw_cq *cq, u32 entry_count)
{
struct efct_hw *hw = cq->eq->hw;
- struct hw_mq *mq = kzalloc_obj(*mq, GFP_KERNEL);
+ struct hw_mq *mq = kzalloc_obj(*mq);
if (!mq)
return NULL;
@@ -275,7 +275,7 @@ struct hw_wq *
efct_hw_new_wq(struct hw_cq *cq, u32 entry_count)
{
struct efct_hw *hw = cq->eq->hw;
- struct hw_wq *wq = kzalloc_obj(*wq, GFP_KERNEL);
+ struct hw_wq *wq = kzalloc_obj(*wq);
if (!wq)
return NULL;
@@ -324,7 +324,7 @@ efct_hw_new_rq_set(struct hw_cq *cqs[], struct hw_rq *rqs[],
* encapsulates 2 SLI queues (for rq pair)
*/
for (i = 0, q_count = 0; i < num_rq_pairs; i++, q_count += 2) {
- rq = kzalloc_obj(*rq, GFP_KERNEL);
+ rq = kzalloc_obj(*rq);
if (!rq)
goto error;
diff --git a/drivers/scsi/elx/efct/efct_io.c b/drivers/scsi/elx/efct/efct_io.c
index dabbe996ab7c..91ab64ce9f97 100644
--- a/drivers/scsi/elx/efct/efct_io.c
+++ b/drivers/scsi/elx/efct/efct_io.c
@@ -25,7 +25,7 @@ efct_io_pool_create(struct efct *efct, u32 num_sgl)
struct efct_io *io;
/* Allocate the IO pool */
- io_pool = kzalloc_obj(*io_pool, GFP_KERNEL);
+ io_pool = kzalloc_obj(*io_pool);
if (!io_pool)
return NULL;
@@ -35,7 +35,7 @@ efct_io_pool_create(struct efct *efct, u32 num_sgl)
spin_lock_init(&io_pool->lock);
for (i = 0; i < EFCT_NUM_SCSI_IOS; i++) {
- io = kzalloc_obj(*io, GFP_KERNEL);
+ io = kzalloc_obj(*io);
if (!io)
break;
diff --git a/drivers/scsi/elx/efct/efct_lio.c b/drivers/scsi/elx/efct/efct_lio.c
index a6ad6b84fc7a..d6e35ee8fee0 100644
--- a/drivers/scsi/elx/efct/efct_lio.c
+++ b/drivers/scsi/elx/efct/efct_lio.c
@@ -744,7 +744,7 @@ efct_lio_make_nport(struct target_fabric_configfs *tf,
return ERR_PTR(-ENXIO);
}
- lio_nport = kzalloc_obj(*lio_nport, GFP_KERNEL);
+ lio_nport = kzalloc_obj(*lio_nport);
if (!lio_nport)
return ERR_PTR(-ENOMEM);
@@ -796,7 +796,7 @@ efct_lio_npiv_make_nport(struct target_fabric_configfs *tf,
return ERR_PTR(-ENXIO);
}
- lio_vport = kzalloc_obj(*lio_vport, GFP_KERNEL);
+ lio_vport = kzalloc_obj(*lio_vport);
if (!lio_vport)
return ERR_PTR(-ENOMEM);
@@ -808,7 +808,7 @@ efct_lio_npiv_make_nport(struct target_fabric_configfs *tf,
efct_format_wwn(lio_vport->wwpn_str, sizeof(lio_vport->wwpn_str),
"naa.", npiv_wwpn);
- vport_list = kzalloc_obj(*vport_list, GFP_KERNEL);
+ vport_list = kzalloc_obj(*vport_list);
if (!vport_list) {
kfree(lio_vport);
return ERR_PTR(-ENOMEM);
@@ -895,7 +895,7 @@ efct_lio_make_tpg(struct se_wwn *wwn, const char *name)
if (kstrtoul(name + 5, 10, &n) || n > USHRT_MAX)
return ERR_PTR(-EINVAL);
- tpg = kzalloc_obj(*tpg, GFP_KERNEL);
+ tpg = kzalloc_obj(*tpg);
if (!tpg)
return ERR_PTR(-ENOMEM);
@@ -958,7 +958,7 @@ efct_lio_npiv_make_tpg(struct se_wwn *wwn, const char *name)
return ERR_PTR(-EINVAL);
}
- tpg = kzalloc_obj(*tpg, GFP_KERNEL);
+ tpg = kzalloc_obj(*tpg);
if (!tpg)
return ERR_PTR(-ENOMEM);
@@ -1069,7 +1069,7 @@ static int efct_session_cb(struct se_portal_group *se_tpg,
struct efct_node *tgt_node;
struct efct *efct = node->efc->base;
- tgt_node = kzalloc_obj(*tgt_node, GFP_KERNEL);
+ tgt_node = kzalloc_obj(*tgt_node);
if (!tgt_node)
return -ENOMEM;
diff --git a/drivers/scsi/elx/efct/efct_xport.c b/drivers/scsi/elx/efct/efct_xport.c
index 66574b8c9f9e..9dcaef6fc188 100644
--- a/drivers/scsi/elx/efct/efct_xport.c
+++ b/drivers/scsi/elx/efct/efct_xport.c
@@ -28,7 +28,7 @@ efct_xport_alloc(struct efct *efct)
{
struct efct_xport *xport;
- xport = kzalloc_obj(*xport, GFP_KERNEL);
+ xport = kzalloc_obj(*xport);
if (!xport)
return xport;
diff --git a/drivers/scsi/esas2r/esas2r_init.c b/drivers/scsi/esas2r/esas2r_init.c
index fd72946ec41f..290d29bc9682 100644
--- a/drivers/scsi/esas2r/esas2r_init.c
+++ b/drivers/scsi/esas2r/esas2r_init.c
@@ -783,7 +783,7 @@ bool esas2r_init_adapter_struct(struct esas2r_adapter *a,
/* allocate requests for asynchronous events */
a->first_ae_req =
- kzalloc_objs(struct esas2r_request, num_ae_requests, GFP_KERNEL);
+ kzalloc_objs(struct esas2r_request, num_ae_requests);
if (a->first_ae_req == NULL) {
esas2r_log(ESAS2R_LOG_CRIT,
diff --git a/drivers/scsi/esas2r/esas2r_main.c b/drivers/scsi/esas2r/esas2r_main.c
index 454807522250..ada278c24c51 100644
--- a/drivers/scsi/esas2r/esas2r_main.c
+++ b/drivers/scsi/esas2r/esas2r_main.c
@@ -194,7 +194,7 @@ static ssize_t write_hw(struct file *file, struct kobject *kobj,
int length = min(sizeof(struct atto_ioctl), count);
if (!a->local_atto_ioctl) {
- a->local_atto_ioctl = kmalloc_obj(struct atto_ioctl, GFP_KERNEL);
+ a->local_atto_ioctl = kmalloc_obj(struct atto_ioctl);
if (a->local_atto_ioctl == NULL) {
esas2r_log(ESAS2R_LOG_WARN,
"write_hw kzalloc failed for %zu bytes",
diff --git a/drivers/scsi/esp_scsi.c b/drivers/scsi/esp_scsi.c
index af46112b4fb0..897a01d3e303 100644
--- a/drivers/scsi/esp_scsi.c
+++ b/drivers/scsi/esp_scsi.c
@@ -2447,7 +2447,7 @@ static int esp_sdev_init(struct scsi_device *dev)
struct esp_target_data *tp = &esp->target[dev->id];
struct esp_lun_data *lp;
- lp = kzalloc_obj(*lp, GFP_KERNEL);
+ lp = kzalloc_obj(*lp);
if (!lp)
return -ENOMEM;
dev->hostdata = lp;
diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c
index bc0064da561c..534596c6d76c 100644
--- a/drivers/scsi/fcoe/fcoe.c
+++ b/drivers/scsi/fcoe/fcoe.c
@@ -820,7 +820,7 @@ static void fcoe_fdmi_info(struct fc_lport *lport, struct net_device *netdev)
if (realdev->netdev_ops->ndo_fcoe_get_hbainfo) {
struct netdev_fcoe_hbainfo *fdmi;
- fdmi = kzalloc_obj(*fdmi, GFP_KERNEL);
+ fdmi = kzalloc_obj(*fdmi);
if (!fdmi)
return;
diff --git a/drivers/scsi/fcoe/fcoe_ctlr.c b/drivers/scsi/fcoe/fcoe_ctlr.c
index a356cf072bf1..02cd4410efca 100644
--- a/drivers/scsi/fcoe/fcoe_ctlr.c
+++ b/drivers/scsi/fcoe/fcoe_ctlr.c
@@ -168,7 +168,7 @@ static int fcoe_sysfs_fcf_add(struct fcoe_fcf *new)
LIBFCOE_FIP_DBG(fip, "New FCF fab %16.16llx mac %pM\n",
new->fabric_name, new->fcf_mac);
- temp = kzalloc_obj(*temp, GFP_KERNEL);
+ temp = kzalloc_obj(*temp);
if (!temp)
goto out;
diff --git a/drivers/scsi/fcoe/fcoe_transport.c b/drivers/scsi/fcoe/fcoe_transport.c
index e1615cc5c092..88d85fc9a52a 100644
--- a/drivers/scsi/fcoe/fcoe_transport.c
+++ b/drivers/scsi/fcoe/fcoe_transport.c
@@ -638,7 +638,7 @@ static int fcoe_add_netdev_mapping(struct net_device *netdev,
{
struct fcoe_netdev_mapping *nm;
- nm = kmalloc_obj(*nm, GFP_KERNEL);
+ nm = kmalloc_obj(*nm);
if (!nm) {
printk(KERN_ERR "Unable to allocate netdev_mapping");
return -ENOMEM;
diff --git a/drivers/scsi/fnic/fdls_disc.c b/drivers/scsi/fnic/fdls_disc.c
index 69ffc492ec9d..455426564ca0 100644
--- a/drivers/scsi/fnic/fdls_disc.c
+++ b/drivers/scsi/fnic/fdls_disc.c
@@ -316,7 +316,7 @@ void fdls_schedule_oxid_free_retry_work(struct work_struct *work)
FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Schedule oxid free. oxid idx: %d\n", idx);
- reclaim_entry = kzalloc_obj(*reclaim_entry, GFP_KERNEL);
+ reclaim_entry = kzalloc_obj(*reclaim_entry);
if (!reclaim_entry) {
schedule_delayed_work(&oxid_pool->schedule_oxid_free_retry,
msecs_to_jiffies(SCHEDULE_OXID_FREE_RETRY_TIME));
diff --git a/drivers/scsi/fnic/fip.c b/drivers/scsi/fnic/fip.c
index 5072c08e75ad..ccd0da7d490f 100644
--- a/drivers/scsi/fnic/fip.c
+++ b/drivers/scsi/fnic/fip.c
@@ -139,7 +139,7 @@ void fnic_fcoe_process_vlan_resp(struct fnic *fnic, struct fip_header *fiph)
FNIC_FIP_DBG(KERN_INFO, fnic->host,
fnic->fnic_num,
"process_vlan_resp: FIP VLAN %d\n", vid);
- vlan = kzalloc_obj(*vlan, GFP_KERNEL);
+ vlan = kzalloc_obj(*vlan);
if (!vlan) {
/* retry from timer */
diff --git a/drivers/scsi/fnic/fnic_debugfs.c b/drivers/scsi/fnic/fnic_debugfs.c
index ef5298685054..ba86964fb45e 100644
--- a/drivers/scsi/fnic/fnic_debugfs.c
+++ b/drivers/scsi/fnic/fnic_debugfs.c
@@ -200,7 +200,7 @@ static int fnic_trace_debugfs_open(struct inode *inode,
fnic_dbgfs_t *fnic_dbg_prt;
u8 *rdata_ptr;
rdata_ptr = (u8 *)inode->i_private;
- fnic_dbg_prt = kzalloc_obj(fnic_dbgfs_t, GFP_KERNEL);
+ fnic_dbg_prt = kzalloc_obj(fnic_dbgfs_t);
if (!fnic_dbg_prt)
return -ENOMEM;
@@ -436,7 +436,7 @@ static int fnic_reset_stats_open(struct inode *inode, struct file *file)
{
struct stats_debug_info *debug;
- debug = kzalloc_obj(struct stats_debug_info, GFP_KERNEL);
+ debug = kzalloc_obj(struct stats_debug_info);
if (!debug)
return -ENOMEM;
@@ -583,7 +583,7 @@ static int fnic_stats_debugfs_open(struct inode *inode,
struct stats_debug_info *debug;
int buf_size = 2 * PAGE_SIZE;
- debug = kzalloc_obj(struct stats_debug_info, GFP_KERNEL);
+ debug = kzalloc_obj(struct stats_debug_info);
if (!debug)
return -ENOMEM;
diff --git a/drivers/scsi/fnic/fnic_main.c b/drivers/scsi/fnic/fnic_main.c
index 8a8c008ea2c7..8b551b79e087 100644
--- a/drivers/scsi/fnic/fnic_main.c
+++ b/drivers/scsi/fnic/fnic_main.c
@@ -715,7 +715,7 @@ static int fnic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
/*
* Allocate fnic
*/
- fnic = kzalloc_obj(struct fnic, GFP_KERNEL);
+ fnic = kzalloc_obj(struct fnic);
if (!fnic) {
err = -ENOMEM;
goto err_out_fnic_alloc;
diff --git a/drivers/scsi/fnic/vnic_dev.c b/drivers/scsi/fnic/vnic_dev.c
index 590effeb21e6..991c86eb5aff 100644
--- a/drivers/scsi/fnic/vnic_dev.c
+++ b/drivers/scsi/fnic/vnic_dev.c
@@ -911,7 +911,7 @@ struct vnic_dev *vnic_dev_register(struct vnic_dev *vdev,
void *priv, struct pci_dev *pdev, struct vnic_dev_bar *bar)
{
if (!vdev) {
- vdev = kzalloc_obj(struct vnic_dev, GFP_KERNEL);
+ vdev = kzalloc_obj(struct vnic_dev);
if (!vdev)
return NULL;
}
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index ce20f8906ac7..adb3b7d8c6fb 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -1597,7 +1597,7 @@ static void hpsa_monitor_offline_device(struct ctlr_info *h,
spin_unlock_irqrestore(&h->offline_device_lock, flags);
/* Device is not on the list, add it. */
- device = kmalloc_obj(*device, GFP_KERNEL);
+ device = kmalloc_obj(*device);
if (!device)
return;
@@ -1936,8 +1936,8 @@ static void adjust_hpsa_scsi_table(struct ctlr_info *h,
}
spin_unlock_irqrestore(&h->reset_lock, flags);
- added = kzalloc_objs(*added, HPSA_MAX_DEVICES, GFP_KERNEL);
- removed = kzalloc_objs(*removed, HPSA_MAX_DEVICES, GFP_KERNEL);
+ added = kzalloc_objs(*added, HPSA_MAX_DEVICES);
+ removed = kzalloc_objs(*removed, HPSA_MAX_DEVICES);
if (!added || !removed) {
dev_warn(&h->pdev->dev, "out of memory in "
@@ -2200,7 +2200,7 @@ static int hpsa_allocate_ioaccel2_sg_chain_blocks(struct ctlr_info *h)
return 0;
h->ioaccel2_cmd_sg_list =
- kzalloc_objs(*h->ioaccel2_cmd_sg_list, h->nr_cmds, GFP_KERNEL);
+ kzalloc_objs(*h->ioaccel2_cmd_sg_list, h->nr_cmds);
if (!h->ioaccel2_cmd_sg_list)
return -ENOMEM;
for (i = 0; i < h->nr_cmds; i++) {
@@ -2238,7 +2238,7 @@ static int hpsa_alloc_sg_chain_blocks(struct ctlr_info *h)
if (h->chainsize <= 0)
return 0;
- h->cmd_sg_list = kzalloc_objs(*h->cmd_sg_list, h->nr_cmds, GFP_KERNEL);
+ h->cmd_sg_list = kzalloc_objs(*h->cmd_sg_list, h->nr_cmds);
if (!h->cmd_sg_list)
return -ENOMEM;
@@ -3465,11 +3465,11 @@ static void hpsa_get_enclosure_info(struct ctlr_info *h,
goto out;
}
- bssbp = kzalloc_obj(*bssbp, GFP_KERNEL);
+ bssbp = kzalloc_obj(*bssbp);
if (!bssbp)
goto out;
- id_phys = kzalloc_obj(*id_phys, GFP_KERNEL);
+ id_phys = kzalloc_obj(*id_phys);
if (!id_phys)
goto out;
@@ -3530,7 +3530,7 @@ static u64 hpsa_get_sas_address_from_report_physical(struct ctlr_info *h,
u64 sa = 0;
int i;
- physdev = kzalloc_obj(*physdev, GFP_KERNEL);
+ physdev = kzalloc_obj(*physdev);
if (!physdev)
return 0;
@@ -3561,7 +3561,7 @@ static void hpsa_get_sas_address(struct ctlr_info *h, unsigned char *scsi3addr,
if (is_hba_lunid(scsi3addr)) {
struct bmic_sense_subsystem_info *ssi;
- ssi = kzalloc_obj(*ssi, GFP_KERNEL);
+ ssi = kzalloc_obj(*ssi);
if (!ssi)
return;
@@ -3785,7 +3785,7 @@ static inline int hpsa_scsi_do_report_phys_luns(struct ctlr_info *h,
return rc;
/* REPORT PHYS EXTENDED is not supported */
- lbuf = kzalloc_obj(*lbuf, GFP_KERNEL);
+ lbuf = kzalloc_obj(*lbuf);
if (!lbuf)
return -ENOMEM;
@@ -4256,7 +4256,7 @@ static bool hpsa_is_disk_spare(struct ctlr_info *h, u8 *lunaddrbytes)
bool is_spare = false;
int rc;
- id_phys = kzalloc_obj(*id_phys, GFP_KERNEL);
+ id_phys = kzalloc_obj(*id_phys);
if (!id_phys)
return false;
@@ -4341,12 +4341,12 @@ static void hpsa_update_scsi_devices(struct ctlr_info *h)
int raid_ctlr_position;
bool physical_device;
- currentsd = kzalloc_objs(*currentsd, HPSA_MAX_DEVICES, GFP_KERNEL);
- physdev_list = kzalloc_obj(*physdev_list, GFP_KERNEL);
- logdev_list = kzalloc_obj(*logdev_list, GFP_KERNEL);
- tmpdevice = kzalloc_obj(*tmpdevice, GFP_KERNEL);
- id_phys = kzalloc_obj(*id_phys, GFP_KERNEL);
- id_ctlr = kzalloc_obj(*id_ctlr, GFP_KERNEL);
+ currentsd = kzalloc_objs(*currentsd, HPSA_MAX_DEVICES);
+ physdev_list = kzalloc_obj(*physdev_list);
+ logdev_list = kzalloc_obj(*logdev_list);
+ tmpdevice = kzalloc_obj(*tmpdevice);
+ id_phys = kzalloc_obj(*id_phys);
+ id_ctlr = kzalloc_obj(*id_ctlr);
if (!currentsd || !physdev_list || !logdev_list ||
!tmpdevice || !id_phys || !id_ctlr) {
@@ -4386,7 +4386,7 @@ static void hpsa_update_scsi_devices(struct ctlr_info *h)
break;
}
- currentsd[i] = kzalloc_obj(*currentsd[i], GFP_KERNEL);
+ currentsd[i] = kzalloc_obj(*currentsd[i]);
if (!currentsd[i]) {
h->drv_req_rescan = 1;
goto out;
@@ -6500,7 +6500,7 @@ static int hpsa_big_passthru_ioctl(struct ctlr_info *h,
status = -ENOMEM;
goto cleanup1;
}
- buff_size = kmalloc_objs(int, SG_ENTRIES_IN_CMD, GFP_KERNEL);
+ buff_size = kmalloc_objs(int, SG_ENTRIES_IN_CMD);
if (!buff_size) {
status = -ENOMEM;
goto cleanup1;
@@ -8490,7 +8490,7 @@ static int hpsa_luns_changed(struct ctlr_info *h)
if (!h->lastlogicals)
return rc;
- logdev = kzalloc_obj(*logdev, GFP_KERNEL);
+ logdev = kzalloc_obj(*logdev);
if (!logdev)
return rc;
@@ -8631,7 +8631,7 @@ static struct ctlr_info *hpda_alloc_ctlr_info(void)
{
struct ctlr_info *h;
- h = kzalloc_obj(*h, GFP_KERNEL);
+ h = kzalloc_obj(*h);
if (!h)
return NULL;
@@ -8852,7 +8852,7 @@ reinit_after_soft_reset:
hpsa_hba_inquiry(h);
- h->lastlogicals = kzalloc_obj(*(h->lastlogicals), GFP_KERNEL);
+ h->lastlogicals = kzalloc_obj(*(h->lastlogicals));
if (!h->lastlogicals)
dev_info(&h->pdev->dev,
"Can't track change to report lun data\n");
@@ -8956,7 +8956,7 @@ static void hpsa_disable_rld_caching(struct ctlr_info *h)
if (unlikely(h->lockup_detected))
return;
- options = kzalloc_obj(*options, GFP_KERNEL);
+ options = kzalloc_obj(*options);
if (!options)
return;
@@ -9553,7 +9553,7 @@ static struct hpsa_sas_phy *hpsa_alloc_sas_phy(
struct hpsa_sas_phy *hpsa_sas_phy;
struct sas_phy *phy;
- hpsa_sas_phy = kzalloc_obj(*hpsa_sas_phy, GFP_KERNEL);
+ hpsa_sas_phy = kzalloc_obj(*hpsa_sas_phy);
if (!hpsa_sas_phy)
return NULL;
@@ -9638,7 +9638,7 @@ static struct hpsa_sas_port
struct hpsa_sas_port *hpsa_sas_port;
struct sas_port *port;
- hpsa_sas_port = kzalloc_obj(*hpsa_sas_port, GFP_KERNEL);
+ hpsa_sas_port = kzalloc_obj(*hpsa_sas_port);
if (!hpsa_sas_port)
return NULL;
@@ -9686,7 +9686,7 @@ static struct hpsa_sas_node *hpsa_alloc_sas_node(struct device *parent_dev)
{
struct hpsa_sas_node *hpsa_sas_node;
- hpsa_sas_node = kzalloc_obj(*hpsa_sas_node, GFP_KERNEL);
+ hpsa_sas_node = kzalloc_obj(*hpsa_sas_node);
if (hpsa_sas_node) {
hpsa_sas_node->parent_dev = parent_dev;
INIT_LIST_HEAD(&hpsa_sas_node->port_list_head);
diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c
index 2973395badab..e47a954acd43 100644
--- a/drivers/scsi/ibmvscsi/ibmvfc.c
+++ b/drivers/scsi/ibmvscsi/ibmvfc.c
@@ -797,7 +797,7 @@ static int ibmvfc_init_event_pool(struct ibmvfc_host *vhost,
return 0;
pool->size = queue->total_depth;
- pool->events = kzalloc_objs(*pool->events, pool->size, GFP_KERNEL);
+ pool->events = kzalloc_objs(*pool->events, pool->size);
if (!pool->events)
return -ENOMEM;
diff --git a/drivers/scsi/ibmvscsi/ibmvscsi.c b/drivers/scsi/ibmvscsi/ibmvscsi.c
index da88b6b125d6..609bda730b3a 100644
--- a/drivers/scsi/ibmvscsi/ibmvscsi.c
+++ b/drivers/scsi/ibmvscsi/ibmvscsi.c
@@ -447,7 +447,7 @@ static int initialize_event_pool(struct event_pool *pool,
pool->size = size;
pool->next = 0;
- pool->events = kzalloc_objs(*pool->events, pool->size, GFP_KERNEL);
+ pool->events = kzalloc_objs(*pool->events, pool->size);
if (!pool->events)
return -ENOMEM;
diff --git a/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c b/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c
index a3a6953ba1c7..b395a9d7c640 100644
--- a/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c
+++ b/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c
@@ -2214,7 +2214,7 @@ static int ibmvscsis_make_nexus(struct ibmvscsis_tport *tport)
return 0;
}
- nexus = kzalloc_obj(*nexus, GFP_KERNEL);
+ nexus = kzalloc_obj(*nexus);
if (!nexus) {
dev_err(&vscsi->dev, "Unable to allocate struct ibmvscsis_nexus\n");
return -ENOMEM;
@@ -3424,7 +3424,7 @@ static int ibmvscsis_probe(struct vio_dev *vdev,
int rc = 0;
long hrc = 0;
- vscsi = kzalloc_obj(*vscsi, GFP_KERNEL);
+ vscsi = kzalloc_obj(*vscsi);
if (!vscsi) {
rc = -ENOMEM;
dev_err(&vdev->dev, "probe: allocation of adapter failed\n");
diff --git a/drivers/scsi/ibmvscsi_tgt/libsrp.c b/drivers/scsi/ibmvscsi_tgt/libsrp.c
index 8fd0bc7cb429..eef9e452ece5 100644
--- a/drivers/scsi/ibmvscsi_tgt/libsrp.c
+++ b/drivers/scsi/ibmvscsi_tgt/libsrp.c
@@ -27,10 +27,10 @@ static int srp_iu_pool_alloc(struct srp_queue *q, size_t max,
struct iu_entry *iue;
int i;
- q->pool = kzalloc_objs(struct iu_entry *, max, GFP_KERNEL);
+ q->pool = kzalloc_objs(struct iu_entry *, max);
if (!q->pool)
return -ENOMEM;
- q->items = kzalloc_objs(struct iu_entry, max, GFP_KERNEL);
+ q->items = kzalloc_objs(struct iu_entry, max);
if (!q->items)
goto free_pool;
@@ -61,12 +61,12 @@ static struct srp_buf **srp_ring_alloc(struct device *dev,
struct srp_buf **ring;
int i;
- ring = kzalloc_objs(struct srp_buf *, max, GFP_KERNEL);
+ ring = kzalloc_objs(struct srp_buf *, max);
if (!ring)
return NULL;
for (i = 0; i < max; i++) {
- ring[i] = kzalloc_obj(*ring[i], GFP_KERNEL);
+ ring[i] = kzalloc_obj(*ring[i]);
if (!ring[i])
goto out;
ring[i]->buf = dma_alloc_coherent(dev, size, &ring[i]->dma,
diff --git a/drivers/scsi/imm.c b/drivers/scsi/imm.c
index 2ed57ea13884..0535252e77e3 100644
--- a/drivers/scsi/imm.c
+++ b/drivers/scsi/imm.c
@@ -1158,7 +1158,7 @@ static int __imm_attach(struct parport *pb)
init_waitqueue_head(&waiting);
- dev = kzalloc_obj(imm_struct, GFP_KERNEL);
+ dev = kzalloc_obj(imm_struct);
if (!dev)
return -ENOMEM;
diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c
index 3b3f40eb32f4..c93dc8b4fe59 100644
--- a/drivers/scsi/ipr.c
+++ b/drivers/scsi/ipr.c
@@ -3776,7 +3776,7 @@ static struct ipr_sglist *ipr_alloc_ucode_buffer(int buf_len)
order = get_order(sg_size);
/* Allocate a scatter/gather list for the DMA */
- sglist = kzalloc_obj(struct ipr_sglist, GFP_KERNEL);
+ sglist = kzalloc_obj(struct ipr_sglist);
if (sglist == NULL) {
ipr_trace;
return NULL;
@@ -4273,7 +4273,7 @@ static int ipr_alloc_dump(struct ipr_ioa_cfg *ioa_cfg)
__be32 **ioa_data;
unsigned long lock_flags = 0;
- dump = kzalloc_obj(struct ipr_dump, GFP_KERNEL);
+ dump = kzalloc_obj(struct ipr_dump);
if (!dump) {
ipr_err("Dump memory allocation failed\n");
diff --git a/drivers/scsi/ips.c b/drivers/scsi/ips.c
index 6bb87f02b746..41ed73966a48 100644
--- a/drivers/scsi/ips.c
+++ b/drivers/scsi/ips.c
@@ -6874,7 +6874,7 @@ ips_init_phase1(struct pci_dev *pci_dev, int *indexPtr)
}
/* found a controller */
- ha = kzalloc_obj(ips_ha_t, GFP_KERNEL);
+ ha = kzalloc_obj(ips_ha_t);
if (ha == NULL) {
IPS_PRINTK(KERN_WARNING, pci_dev,
"Unable to allocate temporary ha struct\n");
@@ -6947,7 +6947,7 @@ ips_init_phase1(struct pci_dev *pci_dev, int *indexPtr)
ha->logical_drive_info_dma_addr = dma_address;
- ha->conf = kmalloc_obj(IPS_CONF, GFP_KERNEL);
+ ha->conf = kmalloc_obj(IPS_CONF);
if (!ha->conf) {
IPS_PRINTK(KERN_WARNING, pci_dev,
@@ -6955,7 +6955,7 @@ ips_init_phase1(struct pci_dev *pci_dev, int *indexPtr)
return ips_abort_init(ha, index);
}
- ha->nvram = kmalloc_obj(IPS_NVRAM_P5, GFP_KERNEL);
+ ha->nvram = kmalloc_obj(IPS_NVRAM_P5);
if (!ha->nvram) {
IPS_PRINTK(KERN_WARNING, pci_dev,
@@ -6963,7 +6963,7 @@ ips_init_phase1(struct pci_dev *pci_dev, int *indexPtr)
return ips_abort_init(ha, index);
}
- ha->subsys = kmalloc_obj(IPS_SUBSYS, GFP_KERNEL);
+ ha->subsys = kmalloc_obj(IPS_SUBSYS);
if (!ha->subsys) {
IPS_PRINTK(KERN_WARNING, pci_dev,
diff --git a/drivers/scsi/iscsi_boot_sysfs.c b/drivers/scsi/iscsi_boot_sysfs.c
index 09fa63fc18f5..0b22197bf8f5 100644
--- a/drivers/scsi/iscsi_boot_sysfs.c
+++ b/drivers/scsi/iscsi_boot_sysfs.c
@@ -344,7 +344,7 @@ iscsi_boot_create_kobj(struct iscsi_boot_kset *boot_kset,
{
struct iscsi_boot_kobj *boot_kobj;
- boot_kobj = kzalloc_obj(*boot_kobj, GFP_KERNEL);
+ boot_kobj = kzalloc_obj(*boot_kobj);
if (!boot_kobj)
return NULL;
INIT_LIST_HEAD(&boot_kobj->list);
@@ -497,7 +497,7 @@ struct iscsi_boot_kset *iscsi_boot_create_kset(const char *set_name)
{
struct iscsi_boot_kset *boot_kset;
- boot_kset = kzalloc_obj(*boot_kset, GFP_KERNEL);
+ boot_kset = kzalloc_obj(*boot_kset);
if (!boot_kset)
return NULL;
diff --git a/drivers/scsi/lasi700.c b/drivers/scsi/lasi700.c
index 4663927255ba..6d1fb55cc3ad 100644
--- a/drivers/scsi/lasi700.c
+++ b/drivers/scsi/lasi700.c
@@ -88,7 +88,7 @@ lasi700_probe(struct parisc_device *dev)
struct NCR_700_Host_Parameters *hostdata;
struct Scsi_Host *host;
- hostdata = kzalloc_obj(*hostdata, GFP_KERNEL);
+ hostdata = kzalloc_obj(*hostdata);
if (!hostdata) {
dev_printk(KERN_ERR, &dev->dev, "Failed to allocate host data\n");
return -ENOMEM;
diff --git a/drivers/scsi/libfc/fc_disc.c b/drivers/scsi/libfc/fc_disc.c
index 5cc10b70b772..7792724d5b97 100644
--- a/drivers/scsi/libfc/fc_disc.c
+++ b/drivers/scsi/libfc/fc_disc.c
@@ -116,7 +116,7 @@ static void fc_disc_recv_rscn_req(struct fc_disc *disc, struct fc_frame *fp)
case ELS_ADDR_FMT_PORT:
FC_DISC_DBG(disc, "Port address format for port "
"(%6.6x)\n", ntoh24(pp->rscn_fid));
- dp = kzalloc_obj(*dp, GFP_KERNEL);
+ dp = kzalloc_obj(*dp);
if (!dp) {
redisc = 1;
break;
diff --git a/drivers/scsi/libfc/fc_fcp.c b/drivers/scsi/libfc/fc_fcp.c
index 414bd2e45fec..a5139e43ca4c 100644
--- a/drivers/scsi/libfc/fc_fcp.c
+++ b/drivers/scsi/libfc/fc_fcp.c
@@ -2298,7 +2298,7 @@ int fc_fcp_init(struct fc_lport *lport)
if (!lport->tt.fcp_abort_io)
lport->tt.fcp_abort_io = fc_fcp_abort_io;
- si = kzalloc_obj(struct fc_fcp_internal, GFP_KERNEL);
+ si = kzalloc_obj(struct fc_fcp_internal);
if (!si)
return -ENOMEM;
lport->scsi_priv = si;
diff --git a/drivers/scsi/libfc/fc_lport.c b/drivers/scsi/libfc/fc_lport.c
index 67583e44ad5b..32683ea6953c 100644
--- a/drivers/scsi/libfc/fc_lport.c
+++ b/drivers/scsi/libfc/fc_lport.c
@@ -2049,7 +2049,7 @@ static int fc_lport_els_request(struct bsg_job *job,
fh->fh_df_ctl = 0;
fh->fh_parm_offset = 0;
- info = kzalloc_obj(struct fc_bsg_info, GFP_KERNEL);
+ info = kzalloc_obj(struct fc_bsg_info);
if (!info) {
fc_frame_free(fp);
return -ENOMEM;
@@ -2109,7 +2109,7 @@ static int fc_lport_ct_request(struct bsg_job *job,
fh->fh_df_ctl = 0;
fh->fh_parm_offset = 0;
- info = kzalloc_obj(struct fc_bsg_info, GFP_KERNEL);
+ info = kzalloc_obj(struct fc_bsg_info);
if (!info) {
fc_frame_free(fp);
return -ENOMEM;
diff --git a/drivers/scsi/libsas/sas_ata.c b/drivers/scsi/libsas/sas_ata.c
index 0d24d6cc2dd8..61368e55bf86 100644
--- a/drivers/scsi/libsas/sas_ata.c
+++ b/drivers/scsi/libsas/sas_ata.c
@@ -579,7 +579,7 @@ int sas_ata_init(struct domain_device *found_dev)
struct ata_port *ap;
int rc;
- ata_host = kzalloc_obj(*ata_host, GFP_KERNEL);
+ ata_host = kzalloc_obj(*ata_host);
if (!ata_host) {
pr_err("ata host alloc failed.\n");
return -ENOMEM;
diff --git a/drivers/scsi/libsas/sas_expander.c b/drivers/scsi/libsas/sas_expander.c
index e48b5233c2e9..f471ab464a78 100644
--- a/drivers/scsi/libsas/sas_expander.c
+++ b/drivers/scsi/libsas/sas_expander.c
@@ -433,7 +433,7 @@ static int sas_expander_discover(struct domain_device *dev)
struct expander_device *ex = &dev->ex_dev;
int res;
- ex->ex_phy = kzalloc_objs(*ex->ex_phy, ex->num_phys, GFP_KERNEL);
+ ex->ex_phy = kzalloc_objs(*ex->ex_phy, ex->num_phys);
if (!ex->ex_phy)
return -ENOMEM;
diff --git a/drivers/scsi/libsas/sas_init.c b/drivers/scsi/libsas/sas_init.c
index 08e641374c85..0bec236f0fb5 100644
--- a/drivers/scsi/libsas/sas_init.c
+++ b/drivers/scsi/libsas/sas_init.c
@@ -505,7 +505,7 @@ static void phy_enable_work(struct work_struct *work)
static int sas_phy_setup(struct sas_phy *phy)
{
- struct sas_phy_data *d = kzalloc_obj(*d, GFP_KERNEL);
+ struct sas_phy_data *d = kzalloc_obj(*d);
if (!d)
return -ENOMEM;
diff --git a/drivers/scsi/libsas/sas_internal.h b/drivers/scsi/libsas/sas_internal.h
index fafcefcf722a..7dce0f587149 100644
--- a/drivers/scsi/libsas/sas_internal.h
+++ b/drivers/scsi/libsas/sas_internal.h
@@ -192,7 +192,7 @@ static inline void sas_phy_set_target(struct asd_sas_phy *p, struct domain_devic
static inline struct domain_device *sas_alloc_device(void)
{
- struct domain_device *dev = kzalloc_obj(*dev, GFP_KERNEL);
+ struct domain_device *dev = kzalloc_obj(*dev);
if (dev) {
INIT_LIST_HEAD(&dev->siblings);
diff --git a/drivers/scsi/lpfc/lpfc_attr.c b/drivers/scsi/lpfc/lpfc_attr.c
index fef3f283cfa7..53f41d68e0d8 100644
--- a/drivers/scsi/lpfc/lpfc_attr.c
+++ b/drivers/scsi/lpfc/lpfc_attr.c
@@ -2041,7 +2041,7 @@ lpfc_xcvr_data_show(struct device *dev, struct device_attribute *attr,
struct sff_trasnceiver_codes_byte7 *trasn_code_byte7;
/* Get transceiver information */
- rdp_context = kmalloc_obj(*rdp_context, GFP_KERNEL);
+ rdp_context = kmalloc_obj(*rdp_context);
if (!rdp_context) {
len = scnprintf(buf, PAGE_SIZE - len,
"SPF info NA: alloc failure\n");
diff --git a/drivers/scsi/lpfc/lpfc_bsg.c b/drivers/scsi/lpfc/lpfc_bsg.c
index 8c2b303ff144..7406dfa60016 100644
--- a/drivers/scsi/lpfc/lpfc_bsg.c
+++ b/drivers/scsi/lpfc/lpfc_bsg.c
@@ -174,7 +174,7 @@ lpfc_alloc_bsg_buffers(struct lpfc_hba *phba, unsigned int size,
/* Allocate dma buffer and place in BPL passed */
while (bytes_left) {
/* Allocate dma buffer */
- mp = kmalloc_obj(struct lpfc_dmabuf, GFP_KERNEL);
+ mp = kmalloc_obj(struct lpfc_dmabuf);
if (!mp) {
if (mlist)
lpfc_free_bsg_buffers(phba, mlist);
@@ -416,7 +416,7 @@ lpfc_bsg_send_mgmt_cmd(struct bsg_job *job)
return -ENODEV;
/* allocate our bsg tracking structure */
- dd_data = kmalloc_obj(struct bsg_job_data, GFP_KERNEL);
+ dd_data = kmalloc_obj(struct bsg_job_data);
if (!dd_data) {
lpfc_printf_log(phba, KERN_WARNING, LOG_LIBDFC,
"2733 Failed allocation of dd_data\n");
@@ -430,7 +430,7 @@ lpfc_bsg_send_mgmt_cmd(struct bsg_job *job)
goto free_dd;
}
- bmp = kmalloc_obj(struct lpfc_dmabuf, GFP_KERNEL);
+ bmp = kmalloc_obj(struct lpfc_dmabuf);
if (!bmp) {
rc = -ENOMEM;
goto free_cmdiocbq;
@@ -683,7 +683,7 @@ lpfc_bsg_rport_els(struct bsg_job *job)
}
/* allocate our bsg tracking structure */
- dd_data = kmalloc_obj(struct bsg_job_data, GFP_KERNEL);
+ dd_data = kmalloc_obj(struct bsg_job_data);
if (!dd_data) {
lpfc_printf_log(phba, KERN_WARNING, LOG_LIBDFC,
"2735 Failed allocation of dd_data\n");
@@ -843,7 +843,7 @@ lpfc_bsg_event_unref(struct lpfc_bsg_event *evt)
static struct lpfc_bsg_event *
lpfc_bsg_event_new(uint32_t ev_mask, int ev_reg_id, uint32_t ev_req_id)
{
- struct lpfc_bsg_event *evt = kzalloc_obj(*evt, GFP_KERNEL);
+ struct lpfc_bsg_event *evt = kzalloc_obj(*evt);
if (!evt)
return NULL;
@@ -939,7 +939,7 @@ lpfc_bsg_ct_unsol_event(struct lpfc_hba *phba, struct lpfc_sli_ring *pring,
lpfc_bsg_event_ref(evt);
spin_unlock_irqrestore(&phba->ct_ev_lock, flags);
- evt_dat = kzalloc_obj(*evt_dat, GFP_KERNEL);
+ evt_dat = kzalloc_obj(*evt_dat);
if (evt_dat == NULL) {
spin_lock_irqsave(&phba->ct_ev_lock, flags);
lpfc_bsg_event_unref(evt);
@@ -1215,7 +1215,7 @@ lpfc_bsg_hba_set_event(struct bsg_job *job)
if (&evt->node == &phba->ct_ev_waiters) {
/* no event waiting struct yet - first call */
- dd_data = kmalloc_obj(struct bsg_job_data, GFP_KERNEL);
+ dd_data = kmalloc_obj(struct bsg_job_data);
if (dd_data == NULL) {
lpfc_printf_log(phba, KERN_WARNING, LOG_LIBDFC,
"2734 Failed allocation of dd_data\n");
@@ -1477,7 +1477,7 @@ lpfc_issue_ct_rsp(struct lpfc_hba *phba, struct bsg_job *job, uint32_t tag,
}
/* allocate our bsg tracking structure */
- dd_data = kmalloc_obj(struct bsg_job_data, GFP_KERNEL);
+ dd_data = kmalloc_obj(struct bsg_job_data);
if (!dd_data) {
lpfc_printf_log(phba, KERN_WARNING, LOG_LIBDFC,
"2736 Failed allocation of dd_data\n");
@@ -1605,7 +1605,7 @@ lpfc_bsg_send_mgmt_rsp(struct bsg_job *job)
goto send_mgmt_rsp_exit;
}
- bmp = kmalloc_obj(struct lpfc_dmabuf, GFP_KERNEL);
+ bmp = kmalloc_obj(struct lpfc_dmabuf);
if (!bmp) {
rc = -ENOMEM;
goto send_mgmt_rsp_exit;
@@ -2628,7 +2628,7 @@ static int lpfcdiag_loop_get_xri(struct lpfc_hba *phba, uint16_t rpi,
cmdiocbq = lpfc_sli_get_iocbq(phba);
rspiocbq = lpfc_sli_get_iocbq(phba);
- dmabuf = kmalloc_obj(struct lpfc_dmabuf, GFP_KERNEL);
+ dmabuf = kmalloc_obj(struct lpfc_dmabuf);
if (dmabuf) {
dmabuf->virt = lpfc_mbuf_alloc(phba, 0, &dmabuf->phys);
if (dmabuf->virt) {
@@ -2733,7 +2733,7 @@ lpfc_bsg_dma_page_alloc(struct lpfc_hba *phba)
struct pci_dev *pcidev = phba->pcidev;
/* allocate dma buffer struct */
- dmabuf = kmalloc_obj(struct lpfc_dmabuf, GFP_KERNEL);
+ dmabuf = kmalloc_obj(struct lpfc_dmabuf);
if (!dmabuf)
return NULL;
@@ -2829,7 +2829,7 @@ diag_cmd_data_alloc(struct lpfc_hba *phba,
cnt = size;
/* allocate struct lpfc_dmabufext buffer header */
- dmp = kmalloc_obj(struct lpfc_dmabufext, GFP_KERNEL);
+ dmp = kmalloc_obj(struct lpfc_dmabufext);
if (!dmp)
goto out;
@@ -2909,7 +2909,7 @@ static int lpfcdiag_sli3_loop_post_rxbufs(struct lpfc_hba *phba, uint16_t rxxri,
pring = lpfc_phba_elsring(phba);
cmdiocbq = lpfc_sli_get_iocbq(phba);
- rxbmp = kmalloc_obj(struct lpfc_dmabuf, GFP_KERNEL);
+ rxbmp = kmalloc_obj(struct lpfc_dmabuf);
if (rxbmp != NULL) {
rxbmp->virt = lpfc_mbuf_alloc(phba, 0, &rxbmp->phys);
if (rxbmp->virt) {
@@ -3160,7 +3160,7 @@ lpfc_bsg_diag_loopback_run(struct bsg_job *job)
cmdiocbq = lpfc_sli_get_iocbq(phba);
if (phba->sli_rev < LPFC_SLI_REV4)
rspiocbq = lpfc_sli_get_iocbq(phba);
- txbmp = kmalloc_obj(struct lpfc_dmabuf, GFP_KERNEL);
+ txbmp = kmalloc_obj(struct lpfc_dmabuf);
if (txbmp) {
txbmp->virt = lpfc_mbuf_alloc(phba, 0, &txbmp->phys);
@@ -4074,7 +4074,7 @@ lpfc_bsg_sli_cfg_read_cmd_ext(struct lpfc_hba *phba, struct bsg_job *job,
}
/* bsg tracking structure */
- dd_data = kmalloc_obj(struct bsg_job_data, GFP_KERNEL);
+ dd_data = kmalloc_obj(struct bsg_job_data);
if (!dd_data) {
rc = -ENOMEM;
goto job_error;
@@ -4275,7 +4275,7 @@ lpfc_bsg_sli_cfg_write_cmd_ext(struct lpfc_hba *phba, struct bsg_job *job,
if (ext_buf_cnt == 1) {
/* bsg tracking structure */
- dd_data = kmalloc_obj(struct bsg_job_data, GFP_KERNEL);
+ dd_data = kmalloc_obj(struct bsg_job_data);
if (!dd_data) {
rc = -ENOMEM;
goto job_error;
@@ -4624,7 +4624,7 @@ lpfc_bsg_write_ebuf_set(struct lpfc_hba *phba, struct bsg_job *job,
"ebuffers received\n",
phba->mbox_ext_buf_ctx.numBuf);
- dd_data = kmalloc_obj(struct bsg_job_data, GFP_KERNEL);
+ dd_data = kmalloc_obj(struct bsg_job_data);
if (!dd_data) {
rc = -ENOMEM;
goto job_error;
@@ -4896,7 +4896,7 @@ lpfc_bsg_issue_mbox(struct lpfc_hba *phba, struct bsg_job *job,
goto job_done; /* must be negative */
/* allocate our bsg tracking structure */
- dd_data = kmalloc_obj(struct bsg_job_data, GFP_KERNEL);
+ dd_data = kmalloc_obj(struct bsg_job_data);
if (!dd_data) {
lpfc_printf_log(phba, KERN_WARNING, LOG_LIBDFC,
"2727 Failed allocation of dd_data\n");
diff --git a/drivers/scsi/lpfc/lpfc_ct.c b/drivers/scsi/lpfc/lpfc_ct.c
index a6ae7b7cf99c..d64f4acfcdae 100644
--- a/drivers/scsi/lpfc/lpfc_ct.c
+++ b/drivers/scsi/lpfc/lpfc_ct.c
@@ -165,7 +165,7 @@ lpfc_ct_reject_event(struct lpfc_nodelist *ndlp,
u32 tmo;
/* fill in BDEs for command */
- mp = kmalloc_obj(*mp, GFP_KERNEL);
+ mp = kmalloc_obj(*mp);
if (!mp) {
rc = 1;
goto ct_exit;
@@ -178,7 +178,7 @@ lpfc_ct_reject_event(struct lpfc_nodelist *ndlp,
}
/* Allocate buffer for Buffer ptr list */
- bmp = kmalloc_obj(*bmp, GFP_KERNEL);
+ bmp = kmalloc_obj(*bmp);
if (!bmp) {
rc = 3;
goto ct_free_mpvirt;
@@ -498,7 +498,7 @@ lpfc_alloc_ct_rsp(struct lpfc_hba *phba, __be16 cmdcode, struct ulp_bde64 *bpl,
while (size) {
/* Allocate buffer for rsp payload */
- mp = kmalloc_obj(struct lpfc_dmabuf, GFP_KERNEL);
+ mp = kmalloc_obj(struct lpfc_dmabuf);
if (!mp) {
if (mlist)
lpfc_free_ct_rsp(phba, mlist);
@@ -1924,7 +1924,7 @@ lpfc_ns_cmd(struct lpfc_vport *vport, int cmdcode,
/* fill in BDEs for command */
/* Allocate buffer for command payload */
- mp = kmalloc_obj(struct lpfc_dmabuf, GFP_KERNEL);
+ mp = kmalloc_obj(struct lpfc_dmabuf);
if (!mp) {
rc=2;
goto ns_cmd_exit;
@@ -1938,7 +1938,7 @@ lpfc_ns_cmd(struct lpfc_vport *vport, int cmdcode,
}
/* Allocate buffer for Buffer ptr list */
- bmp = kmalloc_obj(struct lpfc_dmabuf, GFP_KERNEL);
+ bmp = kmalloc_obj(struct lpfc_dmabuf);
if (!bmp) {
rc=4;
goto ns_cmd_free_mpvirt;
@@ -3220,7 +3220,7 @@ lpfc_fdmi_cmd(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
/* fill in BDEs for command */
/* Allocate buffer for command payload */
- rq = kmalloc_obj(*rq, GFP_KERNEL);
+ rq = kmalloc_obj(*rq);
if (!rq)
goto fdmi_cmd_exit;
@@ -3229,7 +3229,7 @@ lpfc_fdmi_cmd(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
goto fdmi_cmd_free_rq;
/* Allocate buffer for Buffer ptr list */
- rsp = kmalloc_obj(*rsp, GFP_KERNEL);
+ rsp = kmalloc_obj(*rsp);
if (!rsp)
goto fdmi_cmd_free_rqvirt;
@@ -3716,7 +3716,7 @@ lpfc_vmid_cmd(struct lpfc_vport *vport,
/* fill in BDEs for command */
/* Allocate buffer for command payload */
- mp = kmalloc_obj(*mp, GFP_KERNEL);
+ mp = kmalloc_obj(*mp);
if (!mp)
goto vmid_free_mp_exit;
@@ -3725,7 +3725,7 @@ lpfc_vmid_cmd(struct lpfc_vport *vport,
goto vmid_free_mp_virt_exit;
/* Allocate buffer for Buffer ptr list */
- bmp = kmalloc_obj(*bmp, GFP_KERNEL);
+ bmp = kmalloc_obj(*bmp);
if (!bmp)
goto vmid_free_bmp_exit;
diff --git a/drivers/scsi/lpfc/lpfc_debugfs.c b/drivers/scsi/lpfc/lpfc_debugfs.c
index f9f46119f341..1d9b3fcaa27e 100644
--- a/drivers/scsi/lpfc/lpfc_debugfs.c
+++ b/drivers/scsi/lpfc/lpfc_debugfs.c
@@ -1951,7 +1951,7 @@ lpfc_debugfs_disc_trc_open(struct inode *inode, struct file *file)
goto out;
}
- debug = kmalloc_obj(*debug, GFP_KERNEL);
+ debug = kmalloc_obj(*debug);
if (!debug)
goto out;
@@ -2001,7 +2001,7 @@ lpfc_debugfs_slow_ring_trc_open(struct inode *inode, struct file *file)
goto out;
}
- debug = kmalloc_obj(*debug, GFP_KERNEL);
+ debug = kmalloc_obj(*debug);
if (!debug)
goto out;
@@ -2045,7 +2045,7 @@ lpfc_debugfs_hbqinfo_open(struct inode *inode, struct file *file)
struct lpfc_debug *debug;
int rc = -ENOMEM;
- debug = kmalloc_obj(*debug, GFP_KERNEL);
+ debug = kmalloc_obj(*debug);
if (!debug)
goto out;
@@ -2087,7 +2087,7 @@ lpfc_debugfs_multixripools_open(struct inode *inode, struct file *file)
struct lpfc_debug *debug;
int rc = -ENOMEM;
- debug = kmalloc_obj(*debug, GFP_KERNEL);
+ debug = kmalloc_obj(*debug);
if (!debug)
goto out;
@@ -2132,7 +2132,7 @@ lpfc_debugfs_lockstat_open(struct inode *inode, struct file *file)
struct lpfc_debug *debug;
int rc = -ENOMEM;
- debug = kmalloc_obj(*debug, GFP_KERNEL);
+ debug = kmalloc_obj(*debug);
if (!debug)
goto out;
@@ -2269,7 +2269,7 @@ lpfc_debugfs_ras_log_open(struct inode *inode, struct file *file)
phba->cfg_ras_fwlog_buffsize, &size))
goto out;
- debug = kzalloc_obj(*debug, GFP_KERNEL);
+ debug = kzalloc_obj(*debug);
if (!debug)
goto out;
@@ -2316,7 +2316,7 @@ lpfc_debugfs_dumpHBASlim_open(struct inode *inode, struct file *file)
struct lpfc_debug *debug;
int rc = -ENOMEM;
- debug = kmalloc_obj(*debug, GFP_KERNEL);
+ debug = kmalloc_obj(*debug);
if (!debug)
goto out;
@@ -2358,7 +2358,7 @@ lpfc_debugfs_dumpHostSlim_open(struct inode *inode, struct file *file)
struct lpfc_debug *debug;
int rc = -ENOMEM;
- debug = kmalloc_obj(*debug, GFP_KERNEL);
+ debug = kmalloc_obj(*debug);
if (!debug)
goto out;
@@ -2522,7 +2522,7 @@ lpfc_debugfs_nodelist_open(struct inode *inode, struct file *file)
struct lpfc_debug *debug;
int rc = -ENOMEM;
- debug = kmalloc_obj(*debug, GFP_KERNEL);
+ debug = kmalloc_obj(*debug);
if (!debug)
goto out;
@@ -2688,7 +2688,7 @@ lpfc_debugfs_nvmestat_open(struct inode *inode, struct file *file)
struct lpfc_debug *debug;
int rc = -ENOMEM;
- debug = kmalloc_obj(*debug, GFP_KERNEL);
+ debug = kmalloc_obj(*debug);
if (!debug)
goto out;
@@ -2776,7 +2776,7 @@ lpfc_debugfs_scsistat_open(struct inode *inode, struct file *file)
struct lpfc_debug *debug;
int rc = -ENOMEM;
- debug = kmalloc_obj(*debug, GFP_KERNEL);
+ debug = kmalloc_obj(*debug);
if (!debug)
goto out;
@@ -2830,7 +2830,7 @@ lpfc_debugfs_ioktime_open(struct inode *inode, struct file *file)
struct lpfc_debug *debug;
int rc = -ENOMEM;
- debug = kmalloc_obj(*debug, GFP_KERNEL);
+ debug = kmalloc_obj(*debug);
if (!debug)
goto out;
@@ -2957,7 +2957,7 @@ lpfc_debugfs_nvmeio_trc_open(struct inode *inode, struct file *file)
struct lpfc_debug *debug;
int rc = -ENOMEM;
- debug = kmalloc_obj(*debug, GFP_KERNEL);
+ debug = kmalloc_obj(*debug);
if (!debug)
goto out;
@@ -3062,7 +3062,7 @@ lpfc_debugfs_hdwqstat_open(struct inode *inode, struct file *file)
struct lpfc_debug *debug;
int rc = -ENOMEM;
- debug = kmalloc_obj(*debug, GFP_KERNEL);
+ debug = kmalloc_obj(*debug);
if (!debug)
goto out;
@@ -3226,7 +3226,7 @@ lpfc_idiag_open(struct inode *inode, struct file *file)
{
struct lpfc_debug *debug;
- debug = kmalloc_obj(*debug, GFP_KERNEL);
+ debug = kmalloc_obj(*debug);
if (!debug)
return -ENOMEM;
@@ -5471,7 +5471,7 @@ lpfc_cgn_buffer_open(struct inode *inode, struct file *file)
struct lpfc_debug *debug;
int rc = -ENOMEM;
- debug = kmalloc_obj(*debug, GFP_KERNEL);
+ debug = kmalloc_obj(*debug);
if (!debug)
goto out;
@@ -5563,7 +5563,7 @@ lpfc_rx_monitor_open(struct inode *inode, struct file *file)
struct lpfc_rx_monitor_debug *debug;
int rc = -ENOMEM;
- debug = kmalloc_obj(*debug, GFP_KERNEL);
+ debug = kmalloc_obj(*debug);
if (!debug)
goto out;
diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c
index 5177f0a80670..a6d936150b31 100644
--- a/drivers/scsi/lpfc/lpfc_els.c
+++ b/drivers/scsi/lpfc/lpfc_els.c
@@ -216,7 +216,7 @@ lpfc_prep_els_iocb(struct lpfc_vport *vport, u8 expect_rsp,
/* fill in BDEs for command */
/* Allocate buffer for command payload */
- pcmd = kmalloc_obj(*pcmd, GFP_KERNEL);
+ pcmd = kmalloc_obj(*pcmd);
if (pcmd)
pcmd->virt = lpfc_mbuf_alloc(phba, MEM_PRI, &pcmd->phys);
if (!pcmd || !pcmd->virt)
@@ -226,7 +226,7 @@ lpfc_prep_els_iocb(struct lpfc_vport *vport, u8 expect_rsp,
/* Allocate buffer for response payload */
if (expect_rsp) {
- prsp = kmalloc_obj(*prsp, GFP_KERNEL);
+ prsp = kmalloc_obj(*prsp);
if (prsp)
prsp->virt = lpfc_mbuf_alloc(phba, MEM_PRI,
&prsp->phys);
@@ -238,7 +238,7 @@ lpfc_prep_els_iocb(struct lpfc_vport *vport, u8 expect_rsp,
}
/* Allocate buffer for Buffer ptr list */
- pbuflist = kmalloc_obj(*pbuflist, GFP_KERNEL);
+ pbuflist = kmalloc_obj(*pbuflist);
if (pbuflist)
pbuflist->virt = lpfc_mbuf_alloc(phba, MEM_PRI,
&pbuflist->phys);
@@ -7537,7 +7537,7 @@ lpfc_els_rcv_rdp(struct lpfc_vport *vport, struct lpfc_iocbq *cmdiocb,
if (RDP_NPORT_ID_SIZE !=
be32_to_cpu(rdp_req->nport_id_desc.length))
goto rjt_logerr;
- rdp_context = kzalloc_obj(struct lpfc_rdp_context, GFP_KERNEL);
+ rdp_context = kzalloc_obj(struct lpfc_rdp_context);
if (!rdp_context) {
rjt_err = LSRJT_UNABLE_TPC;
goto error;
@@ -7842,7 +7842,7 @@ lpfc_els_rcv_lcb(struct lpfc_vport *vport, struct lpfc_iocbq *cmdiocb,
goto rjt;
}
- lcb_context = kmalloc_obj(*lcb_context, GFP_KERNEL);
+ lcb_context = kmalloc_obj(*lcb_context);
if (!lcb_context) {
rjt_err = LSRJT_UNABLE_TPC;
goto rjt;
@@ -9965,7 +9965,7 @@ lpfc_send_els_event(struct lpfc_vport *vport,
struct Scsi_Host *shost = lpfc_shost_from_vport(vport);
if (*payload == ELS_CMD_LOGO) {
- logo_data = kmalloc_obj(struct lpfc_logo_event, GFP_KERNEL);
+ logo_data = kmalloc_obj(struct lpfc_logo_event);
if (!logo_data) {
lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT,
"0148 Failed to allocate memory "
@@ -9974,7 +9974,7 @@ lpfc_send_els_event(struct lpfc_vport *vport,
}
els_data = &logo_data->header;
} else {
- els_data = kmalloc_obj(struct lpfc_els_event_header, GFP_KERNEL);
+ els_data = kmalloc_obj(struct lpfc_els_event_header);
if (!els_data) {
lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT,
"0149 Failed to allocate memory "
@@ -12437,7 +12437,7 @@ lpfc_vmid_uvem(struct lpfc_vport *vport,
if (!ndlp || ndlp->nlp_state != NLP_STE_UNMAPPED_NODE)
return -ENXIO;
- vmid_context = kmalloc_obj(*vmid_context, GFP_KERNEL);
+ vmid_context = kmalloc_obj(*vmid_context);
if (!vmid_context)
return -ENOMEM;
elsiocb = lpfc_prep_els_iocb(vport, 1, LPFC_UVEM_SIZE, 2,
diff --git a/drivers/scsi/lpfc/lpfc_hbadisc.c b/drivers/scsi/lpfc/lpfc_hbadisc.c
index 0e6cc42c61c9..8aaf05d7bb0a 100644
--- a/drivers/scsi/lpfc/lpfc_hbadisc.c
+++ b/drivers/scsi/lpfc/lpfc_hbadisc.c
@@ -3643,7 +3643,7 @@ lpfc_mbx_process_link_up(struct lpfc_hba *phba, struct lpfc_mbx_read_top *la)
* defaults.
*/
if (!test_bit(HBA_FIP_SUPPORT, &phba->hba_flag)) {
- fcf_record = kzalloc_obj(struct fcf_record, GFP_KERNEL);
+ fcf_record = kzalloc_obj(struct fcf_record);
if (unlikely(!fcf_record)) {
lpfc_printf_log(phba, KERN_ERR,
LOG_TRACE_EVENT,
@@ -4054,7 +4054,7 @@ lpfc_create_static_vport(struct lpfc_hba *phba)
memset(pmb, 0, sizeof(LPFC_MBOXQ_t));
mb = &pmb->u.mb;
- vport_info = kzalloc_obj(struct static_vport_info, GFP_KERNEL);
+ vport_info = kzalloc_obj(struct static_vport_info);
if (!vport_info) {
lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT,
"0543 lpfc_create_static_vport failed to"
@@ -7010,7 +7010,7 @@ lpfc_read_fcf_conn_tbl(struct lpfc_hba *phba,
for (i = 0; i < record_count; i++) {
if (!(conn_rec[i].flags & FCFCNCT_VALID))
continue;
- conn_entry = kzalloc_obj(struct lpfc_fcf_conn_entry, GFP_KERNEL);
+ conn_entry = kzalloc_obj(struct lpfc_fcf_conn_entry);
if (!conn_entry) {
lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT,
"2566 Failed to allocate connection"
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
index 1139fb7dc0fb..ab7e871b679d 100644
--- a/drivers/scsi/lpfc/lpfc_init.c
+++ b/drivers/scsi/lpfc/lpfc_init.c
@@ -2820,7 +2820,7 @@ lpfc_sli3_post_buffer(struct lpfc_hba *phba, struct lpfc_sli_ring *pring, int cn
/* 2 buffers can be posted per command */
/* Allocate buffer to post */
- mp1 = kmalloc_obj(struct lpfc_dmabuf, GFP_KERNEL);
+ mp1 = kmalloc_obj(struct lpfc_dmabuf);
if (mp1)
mp1->virt = lpfc_mbuf_alloc(phba, MEM_PRI, &mp1->phys);
if (!mp1 || !mp1->virt) {
@@ -2833,7 +2833,7 @@ lpfc_sli3_post_buffer(struct lpfc_hba *phba, struct lpfc_sli_ring *pring, int cn
INIT_LIST_HEAD(&mp1->list);
/* Allocate buffer to post */
if (cnt > 1) {
- mp2 = kmalloc_obj(struct lpfc_dmabuf, GFP_KERNEL);
+ mp2 = kmalloc_obj(struct lpfc_dmabuf);
if (mp2)
mp2->virt = lpfc_mbuf_alloc(phba, MEM_PRI,
&mp2->phys);
@@ -3539,7 +3539,7 @@ void lpfc_create_multixri_pools(struct lpfc_hba *phba)
count_per_hwq = phba->sli4_hba.io_xri_cnt / hwq_count;
for (i = 0; i < hwq_count; i++) {
- multixri_pool = kzalloc_obj(*multixri_pool, GFP_KERNEL);
+ multixri_pool = kzalloc_obj(*multixri_pool);
if (!multixri_pool) {
lpfc_printf_log(phba, KERN_INFO, LOG_INIT,
@@ -4064,7 +4064,7 @@ lpfc_sli4_els_sgl_update(struct lpfc_hba *phba)
els_xri_cnt);
/* allocate the additional els sgls */
for (i = 0; i < xri_cnt; i++) {
- sglq_entry = kzalloc_obj(struct lpfc_sglq, GFP_KERNEL);
+ sglq_entry = kzalloc_obj(struct lpfc_sglq);
if (sglq_entry == NULL) {
lpfc_printf_log(phba, KERN_ERR,
LOG_TRACE_EVENT,
@@ -4183,7 +4183,7 @@ lpfc_sli4_nvmet_sgl_update(struct lpfc_hba *phba)
phba->sli4_hba.nvmet_xri_cnt, nvmet_xri_cnt);
/* allocate the additional nvmet sgls */
for (i = 0; i < xri_cnt; i++) {
- sglq_entry = kzalloc_obj(struct lpfc_sglq, GFP_KERNEL);
+ sglq_entry = kzalloc_obj(struct lpfc_sglq);
if (sglq_entry == NULL) {
lpfc_printf_log(phba, KERN_ERR,
LOG_TRACE_EVENT,
@@ -4476,7 +4476,7 @@ lpfc_new_io_buf(struct lpfc_hba *phba, int num_to_alloc)
phba->sli4_hba.io_xri_cnt = 0;
for (bcnt = 0; bcnt < num_to_alloc; bcnt++) {
- lpfc_ncmd = kzalloc_obj(*lpfc_ncmd, GFP_KERNEL);
+ lpfc_ncmd = kzalloc_obj(*lpfc_ncmd);
if (!lpfc_ncmd)
break;
/*
@@ -8661,7 +8661,7 @@ lpfc_init_iocb_list(struct lpfc_hba *phba, int iocb_count)
/* Initialize and populate the iocb list per host. */
INIT_LIST_HEAD(&phba->lpfc_iocb_list);
for (i = 0; i < iocb_count; i++) {
- iocbq_entry = kzalloc_obj(struct lpfc_iocbq, GFP_KERNEL);
+ iocbq_entry = kzalloc_obj(struct lpfc_iocbq);
if (iocbq_entry == NULL) {
printk(KERN_ERR "%s: only allocated %d iocbs of "
"expected %d count. Unloading driver.\n",
@@ -8911,7 +8911,7 @@ lpfc_sli4_create_rpi_hdr(struct lpfc_hba *phba)
* First allocate the protocol header region for the port. The
* port expects a 4KB DMA-mapped memory region that is 4K aligned.
*/
- dmabuf = kzalloc_obj(struct lpfc_dmabuf, GFP_KERNEL);
+ dmabuf = kzalloc_obj(struct lpfc_dmabuf);
if (!dmabuf)
return NULL;
@@ -8929,7 +8929,7 @@ lpfc_sli4_create_rpi_hdr(struct lpfc_hba *phba)
}
/* Save the rpi header data for cleanup later. */
- rpi_hdr = kzalloc_obj(struct lpfc_rpi_hdr, GFP_KERNEL);
+ rpi_hdr = kzalloc_obj(struct lpfc_rpi_hdr);
if (!rpi_hdr)
goto err_free_coherent;
@@ -9002,7 +9002,7 @@ lpfc_hba_alloc(struct pci_dev *pdev)
struct lpfc_hba *phba;
/* Allocate memory for HBA structure */
- phba = kzalloc_obj(struct lpfc_hba, GFP_KERNEL);
+ phba = kzalloc_obj(struct lpfc_hba);
if (!phba) {
dev_err(&pdev->dev, "failed to allocate hba struct\n");
return NULL;
@@ -9720,7 +9720,7 @@ lpfc_create_bootstrap_mbox(struct lpfc_hba *phba)
uint32_t pa_addr;
uint64_t phys_addr;
- dmabuf = kzalloc_obj(struct lpfc_dmabuf, GFP_KERNEL);
+ dmabuf = kzalloc_obj(struct lpfc_dmabuf);
if (!dmabuf)
return -ENOMEM;
@@ -11507,7 +11507,7 @@ lpfc_sli4_cq_event_pool_create(struct lpfc_hba *phba)
int i;
for (i = 0; i < (4 * phba->sli4_hba.cq_ecount); i++) {
- cq_event = kmalloc_obj(struct lpfc_cq_event, GFP_KERNEL);
+ cq_event = kmalloc_obj(struct lpfc_cq_event);
if (!cq_event)
goto out_pool_create_fail;
list_add_tail(&cq_event->list,
@@ -14612,7 +14612,7 @@ lpfc_write_firmware(const struct firmware *fw, void *context)
"New Version:%s\n",
fwrev, image->revision);
for (i = 0; i < LPFC_MBX_WR_CONFIG_MAX_BDE; i++) {
- dmabuf = kzalloc_obj(struct lpfc_dmabuf, GFP_KERNEL);
+ dmabuf = kzalloc_obj(struct lpfc_dmabuf);
if (!dmabuf) {
rc = -ENOMEM;
goto release_out;
diff --git a/drivers/scsi/lpfc/lpfc_mbox.c b/drivers/scsi/lpfc/lpfc_mbox.c
index 5f7249e6bda8..e13abb6f925c 100644
--- a/drivers/scsi/lpfc/lpfc_mbox.c
+++ b/drivers/scsi/lpfc/lpfc_mbox.c
@@ -64,7 +64,7 @@ lpfc_mbox_rsrc_prep(struct lpfc_hba *phba, LPFC_MBOXQ_t *mbox)
{
struct lpfc_dmabuf *mp;
- mp = kmalloc_obj(*mp, GFP_KERNEL);
+ mp = kmalloc_obj(*mp);
if (!mp)
return -ENOMEM;
diff --git a/drivers/scsi/lpfc/lpfc_mem.c b/drivers/scsi/lpfc/lpfc_mem.c
index c067d6762ae3..6f5e5d1311e5 100644
--- a/drivers/scsi/lpfc/lpfc_mem.c
+++ b/drivers/scsi/lpfc/lpfc_mem.c
@@ -510,7 +510,7 @@ lpfc_els_hbq_alloc(struct lpfc_hba *phba)
{
struct hbq_dmabuf *hbqbp;
- hbqbp = kzalloc_obj(struct hbq_dmabuf, GFP_KERNEL);
+ hbqbp = kzalloc_obj(struct hbq_dmabuf);
if (!hbqbp)
return NULL;
@@ -562,7 +562,7 @@ lpfc_sli4_rb_alloc(struct lpfc_hba *phba)
{
struct hbq_dmabuf *dma_buf;
- dma_buf = kzalloc_obj(struct hbq_dmabuf, GFP_KERNEL);
+ dma_buf = kzalloc_obj(struct hbq_dmabuf);
if (!dma_buf)
return NULL;
@@ -620,7 +620,7 @@ lpfc_sli4_nvmet_alloc(struct lpfc_hba *phba)
{
struct rqb_dmabuf *dma_buf;
- dma_buf = kzalloc_obj(*dma_buf, GFP_KERNEL);
+ dma_buf = kzalloc_obj(*dma_buf);
if (!dma_buf)
return NULL;
diff --git a/drivers/scsi/lpfc/lpfc_nportdisc.c b/drivers/scsi/lpfc/lpfc_nportdisc.c
index 9e61021edfe1..5e431928de0b 100644
--- a/drivers/scsi/lpfc/lpfc_nportdisc.c
+++ b/drivers/scsi/lpfc/lpfc_nportdisc.c
@@ -564,7 +564,7 @@ lpfc_rcv_plogi(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
if (!login_mbox)
goto out;
- save_iocb = kzalloc_obj(*save_iocb, GFP_KERNEL);
+ save_iocb = kzalloc_obj(*save_iocb);
if (!save_iocb)
goto out;
@@ -764,7 +764,7 @@ lpfc_rcv_padisc(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
* registered.
*/
if (test_bit(NLP_RPI_REGISTERED, &ndlp->nlp_flag)) {
- elsiocb = kmalloc_obj(*elsiocb, GFP_KERNEL);
+ elsiocb = kmalloc_obj(*elsiocb);
if (elsiocb) {
/* Save info from cmd IOCB used in
* rsp
diff --git a/drivers/scsi/lpfc/lpfc_nvme.c b/drivers/scsi/lpfc/lpfc_nvme.c
index edddb1e9a353..a6b3b16f870d 100644
--- a/drivers/scsi/lpfc/lpfc_nvme.c
+++ b/drivers/scsi/lpfc/lpfc_nvme.c
@@ -98,7 +98,7 @@ lpfc_nvme_create_queue(struct nvme_fc_local_port *pnvme_lport,
test_bit(HBA_IOQ_FLUSH, &vport->phba->hba_flag))
return -ENODEV;
- qhandle = kzalloc_obj(struct lpfc_nvme_qhandle, GFP_KERNEL);
+ qhandle = kzalloc_obj(struct lpfc_nvme_qhandle);
if (qhandle == NULL)
return -ENOMEM;
@@ -587,7 +587,7 @@ __lpfc_nvme_ls_req(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
* in the nvme-fc layer.
*/
- bmp = kmalloc_obj(*bmp, GFP_KERNEL);
+ bmp = kmalloc_obj(*bmp);
if (!bmp) {
lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT,
"6044 NVMEx LS REQ: Could not alloc LS buf "
diff --git a/drivers/scsi/lpfc/lpfc_nvmet.c b/drivers/scsi/lpfc/lpfc_nvmet.c
index 48642f01f2c9..ea5f24e28ef0 100644
--- a/drivers/scsi/lpfc/lpfc_nvmet.c
+++ b/drivers/scsi/lpfc/lpfc_nvmet.c
@@ -1567,14 +1567,14 @@ lpfc_nvmet_setup_io_context(struct lpfc_hba *phba)
idx = 0;
cpu = cpumask_first(cpu_present_mask);
for (i = 0; i < phba->sli4_hba.nvmet_xri_cnt; i++) {
- ctx_buf = kzalloc_obj(*ctx_buf, GFP_KERNEL);
+ ctx_buf = kzalloc_obj(*ctx_buf);
if (!ctx_buf) {
lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT,
"6404 Ran out of memory for NVMET\n");
return -ENOMEM;
}
- ctx_buf->context = kzalloc_obj(*ctx_buf->context, GFP_KERNEL);
+ ctx_buf->context = kzalloc_obj(*ctx_buf->context);
if (!ctx_buf->context) {
kfree(ctx_buf);
lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT,
diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c
index ca2bd782608d..69bf1ac6f846 100644
--- a/drivers/scsi/lpfc/lpfc_scsi.c
+++ b/drivers/scsi/lpfc/lpfc_scsi.c
@@ -265,7 +265,7 @@ lpfc_new_scsi_buf_s3(struct lpfc_vport *vport, int num_to_alloc)
(int)sizeof(struct fcp_rsp), bpl_size);
for (bcnt = 0; bcnt < num_to_alloc; bcnt++) {
- psb = kzalloc_obj(struct lpfc_io_buf, GFP_KERNEL);
+ psb = kzalloc_obj(struct lpfc_io_buf);
if (!psb)
break;
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
index b328fc772bd8..dab6b288db51 100644
--- a/drivers/scsi/lpfc/lpfc_sli.c
+++ b/drivers/scsi/lpfc/lpfc_sli.c
@@ -2135,7 +2135,7 @@ lpfc_sli_next_iotag(struct lpfc_hba *phba, struct lpfc_iocbq *iocbq)
- LPFC_IOCBQ_LOOKUP_INCREMENT)) {
new_len = psli->iocbq_lookup_len + LPFC_IOCBQ_LOOKUP_INCREMENT;
spin_unlock_irq(&phba->hbalock);
- new_arr = kzalloc_objs(struct lpfc_iocbq *, new_len, GFP_KERNEL);
+ new_arr = kzalloc_objs(struct lpfc_iocbq *, new_len);
if (new_arr) {
spin_lock_irq(&phba->hbalock);
old_arr = psli->iocbq_lookup;
@@ -5893,7 +5893,7 @@ lpfc_sli4_read_rev(struct lpfc_hba *phba, LPFC_MBOXQ_t *mboxq,
struct lpfc_dmabuf *dmabuf;
struct lpfc_mqe *mqe;
- dmabuf = kzalloc_obj(struct lpfc_dmabuf, GFP_KERNEL);
+ dmabuf = kzalloc_obj(struct lpfc_dmabuf);
if (!dmabuf)
return -ENOMEM;
@@ -6943,7 +6943,7 @@ lpfc_sli4_ras_dma_alloc(struct lpfc_hba *phba,
ras_fwlog->fw_buffcount = fwlog_buff_count;
for (i = 0; i < ras_fwlog->fw_buffcount; i++) {
- dmabuf = kzalloc_obj(struct lpfc_dmabuf, GFP_KERNEL);
+ dmabuf = kzalloc_obj(struct lpfc_dmabuf);
if (!dmabuf) {
rc = -ENOMEM;
lpfc_printf_log(phba, KERN_WARNING, LOG_INIT,
@@ -8294,7 +8294,7 @@ lpfc_cmf_setup(struct lpfc_hba *phba)
/* Allocate Congestion Information Buffer */
if (!phba->cgn_i) {
- mp = kmalloc_obj(*mp, GFP_KERNEL);
+ mp = kmalloc_obj(*mp);
if (mp)
mp->virt = dma_alloc_coherent
(&phba->pcidev->dev,
@@ -8376,7 +8376,7 @@ no_cmf:
/* Allocate RX Monitor Buffer */
if (!phba->rx_monitor) {
- phba->rx_monitor = kzalloc_obj(*phba->rx_monitor, GFP_KERNEL);
+ phba->rx_monitor = kzalloc_obj(*phba->rx_monitor);
if (!phba->rx_monitor) {
lpfc_printf_log(phba, KERN_ERR, LOG_INIT,
@@ -17144,7 +17144,7 @@ lpfc_wq_create(struct lpfc_hba *phba, struct lpfc_queue *wq,
} else
wq->db_regaddr = phba->sli4_hba.WQDBregaddr;
}
- wq->pring = kzalloc_obj(struct lpfc_sli_ring, GFP_KERNEL);
+ wq->pring = kzalloc_obj(struct lpfc_sli_ring);
if (wq->pring == NULL) {
status = -ENOMEM;
goto out;
@@ -19463,7 +19463,7 @@ lpfc_sli4_handle_mds_loopback(struct lpfc_vport *vport,
}
/* Allocate buffer for command payload */
- pcmd = kmalloc_obj(struct lpfc_dmabuf, GFP_KERNEL);
+ pcmd = kmalloc_obj(struct lpfc_dmabuf);
if (pcmd)
pcmd->virt = dma_pool_alloc(phba->lpfc_drb_pool, GFP_KERNEL,
&pcmd->phys);
@@ -22294,7 +22294,7 @@ lpfc_read_object(struct lpfc_hba *phba, char *rdobject, uint32_t *datap,
read_object->u.request.rd_object_name[j] =
cpu_to_le32(rd_object_name[j]);
- pcmd = kmalloc_obj(*pcmd, GFP_KERNEL);
+ pcmd = kmalloc_obj(*pcmd);
if (pcmd)
pcmd->virt = lpfc_mbuf_alloc(phba, MEM_PRI, &pcmd->phys);
if (!pcmd || !pcmd->virt) {
diff --git a/drivers/scsi/mac_esp.c b/drivers/scsi/mac_esp.c
index 68923dafee42..a0ceaa2428c2 100644
--- a/drivers/scsi/mac_esp.c
+++ b/drivers/scsi/mac_esp.c
@@ -323,7 +323,7 @@ static int esp_mac_probe(struct platform_device *dev)
host->this_id = esp->scsi_id;
esp->scsi_id_mask = 1 << esp->scsi_id;
- mep = kzalloc_obj(struct mac_esp_priv, GFP_KERNEL);
+ mep = kzalloc_obj(struct mac_esp_priv);
if (!mep)
goto fail_free_command_block;
mep->esp = esp;
diff --git a/drivers/scsi/megaraid.c b/drivers/scsi/megaraid.c
index de40a791ed3d..9476a0d2c72d 100644
--- a/drivers/scsi/megaraid.c
+++ b/drivers/scsi/megaraid.c
@@ -4254,7 +4254,7 @@ megaraid_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
goto out_host_put;
}
- adapter->scb_list = kmalloc_objs(scb_t, MAX_COMMANDS, GFP_KERNEL);
+ adapter->scb_list = kmalloc_objs(scb_t, MAX_COMMANDS);
if (!adapter->scb_list) {
dev_warn(&pdev->dev, "out of RAM\n");
goto out_free_cmd_buffer;
diff --git a/drivers/scsi/megaraid/megaraid_mbox.c b/drivers/scsi/megaraid/megaraid_mbox.c
index fa10a89d7563..06cf94ee4e36 100644
--- a/drivers/scsi/megaraid/megaraid_mbox.c
+++ b/drivers/scsi/megaraid/megaraid_mbox.c
@@ -429,7 +429,7 @@ megaraid_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
pci_set_master(pdev);
// Allocate the per driver initialization structure
- adapter = kzalloc_obj(adapter_t, GFP_KERNEL);
+ adapter = kzalloc_obj(adapter_t);
if (adapter == NULL) {
con_log(CL_ANN, (KERN_WARNING
@@ -713,7 +713,7 @@ megaraid_init_mbox(adapter_t *adapter)
* Allocate and initialize the init data structure for mailbox
* controllers
*/
- raid_dev = kzalloc_obj(mraid_device_t, GFP_KERNEL);
+ raid_dev = kzalloc_obj(mraid_device_t);
if (raid_dev == NULL) return -1;
@@ -1017,7 +1017,7 @@ megaraid_alloc_cmd_packets(adapter_t *adapter)
* since the calling routine does not yet know the number of available
* commands.
*/
- adapter->kscb_list = kzalloc_objs(scb_t, MBOX_MAX_SCSI_CMDS, GFP_KERNEL);
+ adapter->kscb_list = kzalloc_objs(scb_t, MBOX_MAX_SCSI_CMDS);
if (adapter->kscb_list == NULL) {
con_log(CL_ANN, (KERN_WARNING
@@ -3403,7 +3403,7 @@ megaraid_cmm_register(adapter_t *adapter)
int i;
// Allocate memory for the base list of scb for management module.
- adapter->uscb_list = kzalloc_objs(scb_t, MBOX_MAX_USER_CMDS, GFP_KERNEL);
+ adapter->uscb_list = kzalloc_objs(scb_t, MBOX_MAX_USER_CMDS);
if (adapter->uscb_list == NULL) {
con_log(CL_ANN, (KERN_WARNING
@@ -3763,9 +3763,9 @@ megaraid_sysfs_alloc_resources(adapter_t *adapter)
mraid_device_t *raid_dev = ADAP2RAIDDEV(adapter);
int rval = 0;
- raid_dev->sysfs_uioc = kmalloc_obj(uioc_t, GFP_KERNEL);
+ raid_dev->sysfs_uioc = kmalloc_obj(uioc_t);
- raid_dev->sysfs_mbox64 = kmalloc_obj(mbox64_t, GFP_KERNEL);
+ raid_dev->sysfs_mbox64 = kmalloc_obj(mbox64_t);
raid_dev->sysfs_buffer = dma_alloc_coherent(&adapter->pdev->dev,
PAGE_SIZE, &raid_dev->sysfs_buffer_dma, GFP_KERNEL);
diff --git a/drivers/scsi/megaraid/megaraid_mm.c b/drivers/scsi/megaraid/megaraid_mm.c
index 0b457f691b1e..1532183897ab 100644
--- a/drivers/scsi/megaraid/megaraid_mm.c
+++ b/drivers/scsi/megaraid/megaraid_mm.c
@@ -913,7 +913,7 @@ mraid_mm_register_adp(mraid_mmadp_t *lld_adp)
if (lld_adp->drvr_type != DRVRTYPE_MBOX)
return (-EINVAL);
- adapter = kzalloc_obj(mraid_mmadp_t, GFP_KERNEL);
+ adapter = kzalloc_obj(mraid_mmadp_t);
if (!adapter)
return -ENOMEM;
diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c
index 074ace2c9790..5b18c7ac6aa2 100644
--- a/drivers/scsi/megaraid/megaraid_sas_base.c
+++ b/drivers/scsi/megaraid/megaraid_sas_base.c
@@ -2137,7 +2137,7 @@ static int megasas_sdev_init(struct scsi_device *sdev)
}
scan_target:
- mr_device_priv_data = kzalloc_obj(*mr_device_priv_data, GFP_KERNEL);
+ mr_device_priv_data = kzalloc_obj(*mr_device_priv_data);
if (!mr_device_priv_data)
return -ENOMEM;
@@ -6386,7 +6386,7 @@ static int megasas_init_fw(struct megasas_instance *instance)
}
for (i = 0; i < MAX_LOGICAL_DRIVES_EXT; ++i) {
fusion->stream_detect_by_ld[i] =
- kzalloc_obj(struct LD_STREAM_DETECT, GFP_KERNEL);
+ kzalloc_obj(struct LD_STREAM_DETECT);
if (!fusion->stream_detect_by_ld[i]) {
dev_err(&instance->pdev->dev,
"unable to allocate stream detect by LD\n");
@@ -8494,7 +8494,7 @@ megasas_compat_iocpacket_get_user(void __user *arg)
int err = -EFAULT;
int i;
- ioc = kzalloc_obj(*ioc, GFP_KERNEL);
+ ioc = kzalloc_obj(*ioc);
if (!ioc)
return ERR_PTR(-ENOMEM);
size = offsetof(struct megasas_iocpacket, frame) + sizeof(ioc->frame);
diff --git a/drivers/scsi/megaraid/megaraid_sas_debugfs.c b/drivers/scsi/megaraid/megaraid_sas_debugfs.c
index 43bb218dea13..81698cd83f5a 100644
--- a/drivers/scsi/megaraid/megaraid_sas_debugfs.c
+++ b/drivers/scsi/megaraid/megaraid_sas_debugfs.c
@@ -65,7 +65,7 @@ megasas_debugfs_raidmap_open(struct inode *inode, struct file *file)
fusion = instance->ctrl_context;
- debug = kzalloc_obj(struct megasas_debugfs_buffer, GFP_KERNEL);
+ debug = kzalloc_obj(struct megasas_debugfs_buffer);
if (!debug)
return -ENOMEM;
diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.c b/drivers/scsi/megaraid/megaraid_sas_fusion.c
index e3de9c95bf4f..f02c93d6a2c9 100644
--- a/drivers/scsi/megaraid/megaraid_sas_fusion.c
+++ b/drivers/scsi/megaraid/megaraid_sas_fusion.c
@@ -1744,7 +1744,7 @@ static int megasas_alloc_ioc_init_frame(struct megasas_instance *instance)
fusion = instance->ctrl_context;
- cmd = kzalloc_obj(struct megasas_cmd, GFP_KERNEL);
+ cmd = kzalloc_obj(struct megasas_cmd);
if (!cmd) {
dev_err(&instance->pdev->dev, "Failed from func: %s line: %d\n",
@@ -5298,7 +5298,7 @@ megasas_alloc_fusion_context(struct megasas_instance *instance)
{
struct fusion_context *fusion;
- instance->ctrl_context = kzalloc_obj(struct fusion_context, GFP_KERNEL);
+ instance->ctrl_context = kzalloc_obj(struct fusion_context);
if (!instance->ctrl_context) {
dev_err(&instance->pdev->dev, "Failed from %s %d\n",
__func__, __LINE__);
diff --git a/drivers/scsi/mpi3mr/mpi3mr_fw.c b/drivers/scsi/mpi3mr/mpi3mr_fw.c
index b42c14f1442b..1b938359df08 100644
--- a/drivers/scsi/mpi3mr/mpi3mr_fw.c
+++ b/drivers/scsi/mpi3mr/mpi3mr_fw.c
@@ -1288,7 +1288,7 @@ static void mpi3mr_fault_uevent_emit(struct mpi3mr_ioc *mrioc)
struct kobj_uevent_env *env;
int ret;
- env = kzalloc_obj(*env, GFP_KERNEL);
+ env = kzalloc_obj(*env);
if (!env)
return;
diff --git a/drivers/scsi/mpi3mr/mpi3mr_os.c b/drivers/scsi/mpi3mr/mpi3mr_os.c
index 5e53b200c19b..90f8b9d1c2ac 100644
--- a/drivers/scsi/mpi3mr/mpi3mr_os.c
+++ b/drivers/scsi/mpi3mr/mpi3mr_os.c
@@ -1710,7 +1710,7 @@ static void mpi3mr_encldev_add_chg_evt_bh(struct mpi3mr_ioc *mrioc,
encl_handle);
if (!enclosure_dev && present) {
enclosure_dev =
- kzalloc_obj(struct mpi3mr_enclosure_node, GFP_KERNEL);
+ kzalloc_obj(struct mpi3mr_enclosure_node);
if (!enclosure_dev)
return;
list_add_tail(&enclosure_dev->list,
@@ -4897,7 +4897,7 @@ static int mpi3mr_sdev_init(struct scsi_device *sdev)
spin_unlock_irqrestore(&mrioc->tgtdev_lock, flags);
- scsi_dev_priv_data = kzalloc_obj(*scsi_dev_priv_data, GFP_KERNEL);
+ scsi_dev_priv_data = kzalloc_obj(*scsi_dev_priv_data);
if (!scsi_dev_priv_data)
return -ENOMEM;
@@ -4928,7 +4928,7 @@ static int mpi3mr_target_alloc(struct scsi_target *starget)
int retval = 0;
struct sas_rphy *rphy = NULL;
- scsi_tgt_priv_data = kzalloc_obj(*scsi_tgt_priv_data, GFP_KERNEL);
+ scsi_tgt_priv_data = kzalloc_obj(*scsi_tgt_priv_data);
if (!scsi_tgt_priv_data)
return -ENOMEM;
diff --git a/drivers/scsi/mpi3mr/mpi3mr_transport.c b/drivers/scsi/mpi3mr/mpi3mr_transport.c
index c79ba5bf56de..be4c14078952 100644
--- a/drivers/scsi/mpi3mr/mpi3mr_transport.c
+++ b/drivers/scsi/mpi3mr/mpi3mr_transport.c
@@ -1022,7 +1022,7 @@ mpi3mr_alloc_hba_port(struct mpi3mr_ioc *mrioc, u16 port_id)
{
struct mpi3mr_hba_port *hba_port;
- hba_port = kzalloc_obj(struct mpi3mr_hba_port, GFP_KERNEL);
+ hba_port = kzalloc_obj(struct mpi3mr_hba_port);
if (!hba_port)
return NULL;
hba_port->port_id = port_id;
@@ -1343,7 +1343,7 @@ static struct mpi3mr_sas_port *mpi3mr_sas_port_add(struct mpi3mr_ioc *mrioc,
return NULL;
}
- mr_sas_port = kzalloc_obj(struct mpi3mr_sas_port, GFP_KERNEL);
+ mr_sas_port = kzalloc_obj(struct mpi3mr_sas_port);
if (!mr_sas_port)
return NULL;
@@ -1720,7 +1720,7 @@ mpi3mr_refresh_sas_ports(struct mpi3mr_ioc *mrioc)
sas_io_unit_pg0 = kzalloc(sz, GFP_KERNEL);
if (!sas_io_unit_pg0)
return;
- h_port = kzalloc_objs(struct host_port, 64, GFP_KERNEL);
+ h_port = kzalloc_objs(struct host_port, 64);
if (!h_port)
goto out;
@@ -2097,7 +2097,7 @@ int mpi3mr_expander_add(struct mpi3mr_ioc *mrioc, u16 handle)
if (sas_expander)
return 0;
- sas_expander = kzalloc_obj(struct mpi3mr_sas_node, GFP_KERNEL);
+ sas_expander = kzalloc_obj(struct mpi3mr_sas_node);
if (!sas_expander)
return -ENOMEM;
diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c
index 32e6c1f2f058..8d34d1ca3866 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_base.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_base.c
@@ -3161,7 +3161,7 @@ _base_request_irq(struct MPT3SAS_ADAPTER *ioc, u8 index)
struct adapter_reply_queue *reply_q;
int r, qid;
- reply_q = kzalloc_obj(struct adapter_reply_queue, GFP_KERNEL);
+ reply_q = kzalloc_obj(struct adapter_reply_queue);
if (!reply_q) {
ioc_err(ioc, "unable to allocate memory %zu!\n",
sizeof(struct adapter_reply_queue));
diff --git a/drivers/scsi/mpt3sas/mpt3sas_ctl.c b/drivers/scsi/mpt3sas/mpt3sas_ctl.c
index 35b78162e8c3..111b23875f4d 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_ctl.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_ctl.c
@@ -4031,7 +4031,7 @@ diag_trigger_scsi_store(struct device *cdev,
sz = min(sizeof(struct SL_WH_SCSI_TRIGGERS_T), count);
if (ioc->supports_trigger_pages) {
- scsi_tg = kzalloc_obj(struct SL_WH_SCSI_TRIGGERS_T, GFP_KERNEL);
+ scsi_tg = kzalloc_obj(struct SL_WH_SCSI_TRIGGERS_T);
if (!scsi_tg)
return -ENOMEM;
@@ -4104,7 +4104,7 @@ diag_trigger_mpi_store(struct device *cdev,
sz = min(sizeof(struct SL_WH_MPI_TRIGGERS_T), count);
if (ioc->supports_trigger_pages) {
- mpi_tg = kzalloc_obj(struct SL_WH_MPI_TRIGGERS_T, GFP_KERNEL);
+ mpi_tg = kzalloc_obj(struct SL_WH_MPI_TRIGGERS_T);
if (!mpi_tg)
return -ENOMEM;
diff --git a/drivers/scsi/mpt3sas/mpt3sas_debugfs.c b/drivers/scsi/mpt3sas/mpt3sas_debugfs.c
index d755f58ad7a0..183391f6b8d1 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_debugfs.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_debugfs.c
@@ -58,7 +58,7 @@ _debugfs_iocdump_open(struct inode *inode, struct file *file)
struct MPT3SAS_ADAPTER *ioc = inode->i_private;
struct mpt3sas_debugfs_buffer *debug;
- debug = kzalloc_obj(struct mpt3sas_debugfs_buffer, GFP_KERNEL);
+ debug = kzalloc_obj(struct mpt3sas_debugfs_buffer);
if (!debug)
return -ENOMEM;
diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
index 1bafd51cdcf6..6407d6561d9e 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
@@ -1940,7 +1940,7 @@ scsih_target_alloc(struct scsi_target *starget)
unsigned long flags;
struct sas_rphy *rphy;
- sas_target_priv_data = kzalloc_obj(*sas_target_priv_data, GFP_KERNEL);
+ sas_target_priv_data = kzalloc_obj(*sas_target_priv_data);
if (!sas_target_priv_data)
return -ENOMEM;
@@ -2108,7 +2108,7 @@ scsih_sdev_init(struct scsi_device *sdev)
struct _pcie_device *pcie_device;
unsigned long flags;
- sas_device_priv_data = kzalloc_obj(*sas_device_priv_data, GFP_KERNEL);
+ sas_device_priv_data = kzalloc_obj(*sas_device_priv_data);
if (!sas_device_priv_data)
return -ENOMEM;
@@ -6839,7 +6839,7 @@ _scsih_alloc_vphy(struct MPT3SAS_ADAPTER *ioc, u8 port_id, u8 phy_num)
vphy = mpt3sas_get_vphy_by_phy(ioc, port, phy_num);
if (!vphy) {
- vphy = kzalloc_obj(struct virtual_phy, GFP_KERNEL);
+ vphy = kzalloc_obj(struct virtual_phy);
if (!vphy)
return NULL;
@@ -6909,7 +6909,7 @@ _scsih_sas_host_refresh(struct MPT3SAS_ADAPTER *ioc)
sas_iounit_pg0->PhyData[0].ControllerDevHandle);
port_id = sas_iounit_pg0->PhyData[i].Port;
if (!(mpt3sas_get_port_by_id(ioc, port_id, 0))) {
- port = kzalloc_obj(struct hba_port, GFP_KERNEL);
+ port = kzalloc_obj(struct hba_port);
if (!port)
goto out;
@@ -7116,7 +7116,7 @@ _scsih_sas_host_add(struct MPT3SAS_ADAPTER *ioc)
port_id = sas_iounit_pg0->PhyData[i].Port;
if (!(mpt3sas_get_port_by_id(ioc, port_id, 0))) {
- port = kzalloc_obj(struct hba_port, GFP_KERNEL);
+ port = kzalloc_obj(struct hba_port);
if (!port)
goto out;
@@ -7257,7 +7257,7 @@ _scsih_expander_add(struct MPT3SAS_ADAPTER *ioc, u16 handle)
if (sas_expander)
return 0;
- sas_expander = kzalloc_obj(struct _sas_node, GFP_KERNEL);
+ sas_expander = kzalloc_obj(struct _sas_node);
if (!sas_expander) {
ioc_err(ioc, "failure at %s:%d/%s()!\n",
__FILE__, __LINE__, __func__);
@@ -7780,7 +7780,7 @@ _scsih_report_luns(struct MPT3SAS_ADAPTER *ioc, u16 handle, void *data,
int retries;
lun_data = NULL;
- transfer_packet = kzalloc_obj(struct _scsi_io_transfer, GFP_KERNEL);
+ transfer_packet = kzalloc_obj(struct _scsi_io_transfer);
if (!transfer_packet) {
ioc_err(ioc, "failure at %s:%d/%s()!\n", __FILE__, __LINE__, __func__);
@@ -7867,7 +7867,7 @@ _scsih_start_unit(struct MPT3SAS_ADAPTER *ioc, u16 handle, u32 lun, u8 is_pd,
enum device_responsive_state rc;
int return_code;
- transfer_packet = kzalloc_obj(struct _scsi_io_transfer, GFP_KERNEL);
+ transfer_packet = kzalloc_obj(struct _scsi_io_transfer);
if (!transfer_packet) {
pr_info("failure at %s:%d/%s()!\n", __FILE__, __LINE__, __func__);
@@ -7928,7 +7928,7 @@ _scsih_test_unit_ready(struct MPT3SAS_ADAPTER *ioc, u16 handle, u32 lun,
int return_code;
int sata_init_failure = 0;
- transfer_packet = kzalloc_obj(struct _scsi_io_transfer, GFP_KERNEL);
+ transfer_packet = kzalloc_obj(struct _scsi_io_transfer);
if (!transfer_packet) {
pr_info("failure at %s:%d/%s()!\n", __FILE__, __LINE__, __func__);
@@ -8000,7 +8000,7 @@ _scsih_ata_pass_thru_idd(struct MPT3SAS_ADAPTER *ioc, u16 handle,
u32 data_length;
idd_data = NULL;
- transfer_packet = kzalloc_obj(struct _scsi_io_transfer, GFP_KERNEL);
+ transfer_packet = kzalloc_obj(struct _scsi_io_transfer);
if (!transfer_packet) {
ioc_err(ioc, "failure at %s:%d/%s()!\n", __FILE__, __LINE__, __func__);
@@ -8131,7 +8131,7 @@ _scsih_wait_for_target_to_become_ready(struct MPT3SAS_ADAPTER *ioc, u16 handle,
int lun;
struct scsi_lun *lunp;
- lun_data = kzalloc_objs(struct scsi_lun, MPT3_MAX_LUNS, GFP_KERNEL);
+ lun_data = kzalloc_objs(struct scsi_lun, MPT3_MAX_LUNS);
if (!lun_data) {
ioc_err(ioc, "failure at %s:%d/%s()!\n", __FILE__, __LINE__, __func__);
@@ -8480,7 +8480,7 @@ _scsih_add_device(struct MPT3SAS_ADAPTER *ioc, u16 handle, u8 retry_count,
}
}
- sas_device = kzalloc_obj(struct _sas_device, GFP_KERNEL);
+ sas_device = kzalloc_obj(struct _sas_device);
if (!sas_device) {
ioc_err(ioc, "failure at %s:%d/%s()!\n",
__FILE__, __LINE__, __func__);
@@ -9383,7 +9383,7 @@ _scsih_pcie_add_device(struct MPT3SAS_ADAPTER *ioc, u16 handle, u8 retry_count)
}
}
- pcie_device = kzalloc_obj(struct _pcie_device, GFP_KERNEL);
+ pcie_device = kzalloc_obj(struct _pcie_device);
if (!pcie_device) {
ioc_err(ioc, "failure at %s:%d/%s()!\n",
__FILE__, __LINE__, __func__);
@@ -9835,7 +9835,7 @@ _scsih_sas_enclosure_dev_status_change_event(struct MPT3SAS_ADAPTER *ioc,
case MPI2_EVENT_SAS_ENCL_RC_ADDED:
if (!enclosure_dev) {
enclosure_dev =
- kzalloc_obj(struct _enclosure_node, GFP_KERNEL);
+ kzalloc_obj(struct _enclosure_node);
if (!enclosure_dev) {
ioc_info(ioc, "failure at %s:%d/%s()!\n",
__FILE__, __LINE__, __func__);
@@ -10260,7 +10260,7 @@ _scsih_sas_volume_add(struct MPT3SAS_ADAPTER *ioc,
if (raid_device)
return;
- raid_device = kzalloc_obj(struct _raid_device, GFP_KERNEL);
+ raid_device = kzalloc_obj(struct _raid_device);
if (!raid_device) {
ioc_err(ioc, "failure at %s:%d/%s()!\n",
__FILE__, __LINE__, __func__);
@@ -10678,7 +10678,7 @@ _scsih_sas_ir_volume_event(struct MPT3SAS_ADAPTER *ioc,
break;
}
- raid_device = kzalloc_obj(struct _raid_device, GFP_KERNEL);
+ raid_device = kzalloc_obj(struct _raid_device);
if (!raid_device) {
ioc_err(ioc, "failure at %s:%d/%s()!\n",
__FILE__, __LINE__, __func__);
@@ -11039,7 +11039,7 @@ _scsih_create_enclosure_list_after_reset(struct MPT3SAS_ADAPTER *ioc)
enclosure_handle = 0xFFFF;
do {
enclosure_dev =
- kzalloc_obj(struct _enclosure_node, GFP_KERNEL);
+ kzalloc_obj(struct _enclosure_node);
if (!enclosure_dev) {
ioc_err(ioc, "failure at %s:%d/%s()!\n",
__FILE__, __LINE__, __func__);
diff --git a/drivers/scsi/mpt3sas/mpt3sas_transport.c b/drivers/scsi/mpt3sas/mpt3sas_transport.c
index 09a36e561da5..e74a526efa8d 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_transport.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_transport.c
@@ -698,7 +698,7 @@ mpt3sas_transport_port_add(struct MPT3SAS_ADAPTER *ioc, u16 handle,
return NULL;
}
- mpt3sas_port = kzalloc_obj(struct _sas_port, GFP_KERNEL);
+ mpt3sas_port = kzalloc_obj(struct _sas_port);
if (!mpt3sas_port) {
ioc_err(ioc, "failure at %s:%d/%s()!\n",
__FILE__, __LINE__, __func__);
diff --git a/drivers/scsi/mvme16x_scsi.c b/drivers/scsi/mvme16x_scsi.c
index 43c68802d40a..f4db93c13986 100644
--- a/drivers/scsi/mvme16x_scsi.c
+++ b/drivers/scsi/mvme16x_scsi.c
@@ -49,7 +49,7 @@ static int mvme16x_probe(struct platform_device *dev)
goto out;
}
- hostdata = kzalloc_obj(struct NCR_700_Host_Parameters, GFP_KERNEL);
+ hostdata = kzalloc_obj(struct NCR_700_Host_Parameters);
if (hostdata == NULL) {
printk(KERN_ERR "mvme16x-scsi: "
"Failed to allocate host data\n");
diff --git a/drivers/scsi/mvsas/mv_init.c b/drivers/scsi/mvsas/mv_init.c
index 6f5a98572c33..5abc17a2e261 100644
--- a/drivers/scsi/mvsas/mv_init.c
+++ b/drivers/scsi/mvsas/mv_init.c
@@ -401,7 +401,7 @@ static int mvs_prep_sas_ha_init(struct Scsi_Host *shost,
sha->sas_port = arr_port;
sha->shost = shost;
- sha->lldd_ha = kzalloc_obj(struct mvs_prv_info, GFP_KERNEL);
+ sha->lldd_ha = kzalloc_obj(struct mvs_prv_info);
if (!sha->lldd_ha)
goto exit_free;
@@ -502,7 +502,7 @@ static int mvs_pci_init(struct pci_dev *pdev, const struct pci_device_id *ent)
chip = &mvs_chips[ent->driver_data];
SHOST_TO_SAS_HA(shost) =
- kzalloc_objs(struct sas_ha_struct, 1, GFP_KERNEL);
+ kzalloc_objs(struct sas_ha_struct, 1);
if (!SHOST_TO_SAS_HA(shost)) {
scsi_host_put(shost);
rc = -ENOMEM;
diff --git a/drivers/scsi/mvumi.c b/drivers/scsi/mvumi.c
index 10b40c434977..5fe066a6c377 100644
--- a/drivers/scsi/mvumi.c
+++ b/drivers/scsi/mvumi.c
@@ -252,7 +252,7 @@ static struct mvumi_cmd *mvumi_create_internal_cmd(struct mvumi_hba *mhba,
{
struct mvumi_cmd *cmd;
- cmd = kzalloc_obj(*cmd, GFP_KERNEL);
+ cmd = kzalloc_obj(*cmd);
if (!cmd) {
dev_err(&mhba->pdev->dev, "failed to create a internal cmd\n");
return NULL;
@@ -368,7 +368,7 @@ static int mvumi_alloc_cmds(struct mvumi_hba *mhba)
struct mvumi_cmd *cmd;
for (i = 0; i < mhba->max_io; i++) {
- cmd = kzalloc_obj(*cmd, GFP_KERNEL);
+ cmd = kzalloc_obj(*cmd);
if (!cmd)
goto err_exit;
@@ -2193,7 +2193,7 @@ static int mvumi_cfg_hw_reg(struct mvumi_hba *mhba)
mhba->mmio = mhba->base_addr[0];
base = mhba->mmio;
if (!mhba->regs) {
- mhba->regs = kzalloc_obj(*regs, GFP_KERNEL);
+ mhba->regs = kzalloc_obj(*regs);
if (mhba->regs == NULL)
return -ENOMEM;
}
@@ -2245,7 +2245,7 @@ static int mvumi_cfg_hw_reg(struct mvumi_hba *mhba)
mhba->mmio = mhba->base_addr[2];
base = mhba->mmio;
if (!mhba->regs) {
- mhba->regs = kzalloc_obj(*regs, GFP_KERNEL);
+ mhba->regs = kzalloc_obj(*regs);
if (mhba->regs == NULL)
return -ENOMEM;
}
diff --git a/drivers/scsi/myrb.c b/drivers/scsi/myrb.c
index e24996921e87..3678b66310ed 100644
--- a/drivers/scsi/myrb.c
+++ b/drivers/scsi/myrb.c
@@ -1628,7 +1628,7 @@ static int myrb_ldev_sdev_init(struct scsi_device *sdev)
ldev_info = cb->ldev_info_buf + ldev_num;
- sdev->hostdata = kzalloc_obj(*ldev_info, GFP_KERNEL);
+ sdev->hostdata = kzalloc_obj(*ldev_info);
if (!sdev->hostdata)
return -ENOMEM;
dev_dbg(&sdev->sdev_gendev,
@@ -1672,7 +1672,7 @@ static int myrb_pdev_sdev_init(struct scsi_device *sdev)
if (sdev->id > MYRB_MAX_TARGETS)
return -ENXIO;
- pdev_info = kzalloc_obj(*pdev_info, GFP_KERNEL);
+ pdev_info = kzalloc_obj(*pdev_info);
if (!pdev_info)
return -ENOMEM;
diff --git a/drivers/scsi/myrs.c b/drivers/scsi/myrs.c
index 77ed566d7b92..afd68225221a 100644
--- a/drivers/scsi/myrs.c
+++ b/drivers/scsi/myrs.c
@@ -538,11 +538,11 @@ static bool myrs_enable_mmio_mbox(struct myrs_hba *cs,
cs->fwstat_buf = NULL;
goto out_free;
}
- cs->ctlr_info = kzalloc_obj(struct myrs_ctlr_info, GFP_KERNEL);
+ cs->ctlr_info = kzalloc_obj(struct myrs_ctlr_info);
if (!cs->ctlr_info)
goto out_free;
- cs->event_buf = kzalloc_obj(struct myrs_event, GFP_KERNEL);
+ cs->event_buf = kzalloc_obj(struct myrs_event);
if (!cs->event_buf)
goto out_free;
@@ -1803,7 +1803,7 @@ static int myrs_sdev_init(struct scsi_device *sdev)
ldev_num = myrs_translate_ldev(cs, sdev);
- ldev_info = kzalloc_obj(*ldev_info, GFP_KERNEL);
+ ldev_info = kzalloc_obj(*ldev_info);
if (!ldev_info)
return -ENOMEM;
@@ -1865,7 +1865,7 @@ static int myrs_sdev_init(struct scsi_device *sdev)
} else {
struct myrs_pdev_info *pdev_info;
- pdev_info = kzalloc_obj(*pdev_info, GFP_KERNEL);
+ pdev_info = kzalloc_obj(*pdev_info);
if (!pdev_info)
return -ENOMEM;
diff --git a/drivers/scsi/pcmcia/aha152x_stub.c b/drivers/scsi/pcmcia/aha152x_stub.c
index ae96602a543b..014ae8d42331 100644
--- a/drivers/scsi/pcmcia/aha152x_stub.c
+++ b/drivers/scsi/pcmcia/aha152x_stub.c
@@ -96,7 +96,7 @@ static int aha152x_probe(struct pcmcia_device *link)
dev_dbg(&link->dev, "aha152x_attach()\n");
/* Create new SCSI device */
- info = kzalloc_obj(*info, GFP_KERNEL);
+ info = kzalloc_obj(*info);
if (!info) return -ENOMEM;
info->p_dev = link;
link->priv = info;
diff --git a/drivers/scsi/pcmcia/nsp_cs.c b/drivers/scsi/pcmcia/nsp_cs.c
index 50d2e4ffe037..ae70fda96ae9 100644
--- a/drivers/scsi/pcmcia/nsp_cs.c
+++ b/drivers/scsi/pcmcia/nsp_cs.c
@@ -1520,7 +1520,7 @@ static int nsp_cs_probe(struct pcmcia_device *link)
nsp_dbg(NSP_DEBUG_INIT, "in");
/* Create new SCSI device */
- info = kzalloc_obj(*info, GFP_KERNEL);
+ info = kzalloc_obj(*info);
if (info == NULL) { return -ENOMEM; }
info->p_dev = link;
link->priv = info;
diff --git a/drivers/scsi/pcmcia/qlogic_stub.c b/drivers/scsi/pcmcia/qlogic_stub.c
index f24223fc58b8..5d8a434d3f66 100644
--- a/drivers/scsi/pcmcia/qlogic_stub.c
+++ b/drivers/scsi/pcmcia/qlogic_stub.c
@@ -152,7 +152,7 @@ static int qlogic_probe(struct pcmcia_device *link)
dev_dbg(&link->dev, "qlogic_attach()\n");
/* Create new SCSI device */
- info = kzalloc_obj(*info, GFP_KERNEL);
+ info = kzalloc_obj(*info);
if (!info)
return -ENOMEM;
info->p_dev = link;
diff --git a/drivers/scsi/pcmcia/sym53c500_cs.c b/drivers/scsi/pcmcia/sym53c500_cs.c
index 2accb2c538f0..1530c1ad5d36 100644
--- a/drivers/scsi/pcmcia/sym53c500_cs.c
+++ b/drivers/scsi/pcmcia/sym53c500_cs.c
@@ -849,7 +849,7 @@ SYM53C500_probe(struct pcmcia_device *link)
dev_dbg(&link->dev, "SYM53C500_attach()\n");
/* Create new SCSI device */
- info = kzalloc_obj(*info, GFP_KERNEL);
+ info = kzalloc_obj(*info);
if (!info)
return -ENOMEM;
info->p_dev = link;
diff --git a/drivers/scsi/pm8001/pm8001_hwi.c b/drivers/scsi/pm8001/pm8001_hwi.c
index 68b4ddcb7781..fff8d877abb9 100644
--- a/drivers/scsi/pm8001/pm8001_hwi.c
+++ b/drivers/scsi/pm8001/pm8001_hwi.c
@@ -4371,7 +4371,7 @@ int pm8001_chip_get_nvmd_req(struct pm8001_hba_info *pm8001_ha,
struct pm8001_ioctl_payload *ioctl_payload = payload;
nvmd_type = ioctl_payload->minor_function;
- fw_control_context = kzalloc_obj(struct fw_control_ex, GFP_KERNEL);
+ fw_control_context = kzalloc_obj(struct fw_control_ex);
if (!fw_control_context)
return -ENOMEM;
fw_control_context->usrAddr = (u8 *)ioctl_payload->func_specific;
@@ -4464,7 +4464,7 @@ int pm8001_chip_set_nvmd_req(struct pm8001_hba_info *pm8001_ha,
struct pm8001_ioctl_payload *ioctl_payload = payload;
nvmd_type = ioctl_payload->minor_function;
- fw_control_context = kzalloc_obj(struct fw_control_ex, GFP_KERNEL);
+ fw_control_context = kzalloc_obj(struct fw_control_ex);
if (!fw_control_context)
return -ENOMEM;
@@ -4579,7 +4579,7 @@ pm8001_chip_fw_flash_update_req(struct pm8001_hba_info *pm8001_ha,
dma_addr_t phys_addr = pm8001_ha->memoryMap.region[FW_FLASH].phys_addr;
struct pm8001_ioctl_payload *ioctl_payload = payload;
- fw_control_context = kzalloc_obj(struct fw_control_ex, GFP_KERNEL);
+ fw_control_context = kzalloc_obj(struct fw_control_ex);
if (!fw_control_context)
return -ENOMEM;
fw_control = (struct fw_control_info *)&ioctl_payload->func_specific;
diff --git a/drivers/scsi/pm8001/pm8001_init.c b/drivers/scsi/pm8001/pm8001_init.c
index 631b7fa47fce..e93ea76b565e 100644
--- a/drivers/scsi/pm8001/pm8001_init.c
+++ b/drivers/scsi/pm8001/pm8001_init.c
@@ -622,7 +622,7 @@ static int pm8001_prep_sas_ha_init(struct Scsi_Host *shost,
sha->sas_phy = arr_phy;
sha->sas_port = arr_port;
- sha->lldd_ha = kzalloc_obj(struct pm8001_hba_info, GFP_KERNEL);
+ sha->lldd_ha = kzalloc_obj(struct pm8001_hba_info);
if (!sha->lldd_ha)
goto exit_free1;
@@ -1148,7 +1148,7 @@ static int pm8001_pci_probe(struct pci_dev *pdev,
goto err_out_regions;
}
chip = &pm8001_chips[ent->driver_data];
- sha = kzalloc_obj(struct sas_ha_struct, GFP_KERNEL);
+ sha = kzalloc_obj(struct sas_ha_struct);
if (!sha) {
rc = -ENOMEM;
goto err_out_free_host;
@@ -1264,7 +1264,7 @@ static int pm8001_init_ccb_tag(struct pm8001_hba_info *pm8001_ha)
/* Memory region for ccb_info*/
pm8001_ha->ccb_count = ccb_count;
pm8001_ha->ccb_info =
- kzalloc_objs(struct pm8001_ccb_info, ccb_count, GFP_KERNEL);
+ kzalloc_objs(struct pm8001_ccb_info, ccb_count);
if (!pm8001_ha->ccb_info) {
pm8001_dbg(pm8001_ha, FAIL,
"Unable to allocate memory for ccb\n");
diff --git a/drivers/scsi/pm8001/pm80xx_hwi.c b/drivers/scsi/pm8001/pm80xx_hwi.c
index 77ded22a26c7..954f307352e6 100644
--- a/drivers/scsi/pm8001/pm80xx_hwi.c
+++ b/drivers/scsi/pm8001/pm80xx_hwi.c
@@ -1563,7 +1563,7 @@ void pm80xx_fatal_error_uevent_emit(struct pm8001_hba_info *pm8001_ha,
pm8001_dbg(pm8001_ha, FAIL, "emitting fatal error uevent");
- env = kzalloc_obj(struct kobj_uevent_env, GFP_KERNEL);
+ env = kzalloc_obj(struct kobj_uevent_env);
if (!env)
return;
diff --git a/drivers/scsi/pmcraid.c b/drivers/scsi/pmcraid.c
index ff31e12aaba0..ce76c9dd6171 100644
--- a/drivers/scsi/pmcraid.c
+++ b/drivers/scsi/pmcraid.c
@@ -3468,7 +3468,7 @@ static long pmcraid_chr_ioctl(
void __user *argp = (void __user *)arg;
int retval = -ENOTTY;
- hdr = kmalloc_obj(struct pmcraid_ioctl_header, GFP_KERNEL);
+ hdr = kmalloc_obj(struct pmcraid_ioctl_header);
if (!hdr) {
pmcraid_err("failed to allocate memory for ioctl header\n");
diff --git a/drivers/scsi/ppa.c b/drivers/scsi/ppa.c
index 7c8923368edd..8a4e910d5758 100644
--- a/drivers/scsi/ppa.c
+++ b/drivers/scsi/ppa.c
@@ -1042,7 +1042,7 @@ static int __ppa_attach(struct parport *pb)
int err = -ENOMEM;
struct pardev_cb ppa_cb;
- dev = kzalloc_obj(ppa_struct, GFP_KERNEL);
+ dev = kzalloc_obj(ppa_struct);
if (!dev)
return -ENOMEM;
dev->base = -1;
diff --git a/drivers/scsi/qedf/qedf_debugfs.c b/drivers/scsi/qedf/qedf_debugfs.c
index 9b2ed9cb6245..a9d109c2cb4d 100644
--- a/drivers/scsi/qedf/qedf_debugfs.c
+++ b/drivers/scsi/qedf/qedf_debugfs.c
@@ -422,7 +422,7 @@ qedf_offload_stats_show(struct seq_file *s, void *unused)
struct qedf_ctx *qedf = s->private;
struct qed_fcoe_stats *fw_fcoe_stats;
- fw_fcoe_stats = kmalloc_obj(struct qed_fcoe_stats, GFP_KERNEL);
+ fw_fcoe_stats = kmalloc_obj(struct qed_fcoe_stats);
if (!fw_fcoe_stats) {
QEDF_ERR(&(qedf->dbg_ctx), "Could not allocate memory for "
"fw_fcoe_stats.\n");
diff --git a/drivers/scsi/qedf/qedf_io.c b/drivers/scsi/qedf/qedf_io.c
index 73a0ce7e5180..af1a34bed2f1 100644
--- a/drivers/scsi/qedf/qedf_io.c
+++ b/drivers/scsi/qedf/qedf_io.c
@@ -254,7 +254,7 @@ struct qedf_cmd_mgr *qedf_cmd_mgr_alloc(struct qedf_ctx *qedf)
}
/* Allocate pool of io_bdts - one for each qedf_ioreq */
- cmgr->io_bdt_pool = kmalloc_objs(struct io_bdt *, num_ios, GFP_KERNEL);
+ cmgr->io_bdt_pool = kmalloc_objs(struct io_bdt *, num_ios);
if (!cmgr->io_bdt_pool) {
QEDF_WARN(&(qedf->dbg_ctx), "Failed to alloc io_bdt_pool.\n");
@@ -262,7 +262,7 @@ struct qedf_cmd_mgr *qedf_cmd_mgr_alloc(struct qedf_ctx *qedf)
}
for (i = 0; i < num_ios; i++) {
- cmgr->io_bdt_pool[i] = kmalloc_obj(struct io_bdt, GFP_KERNEL);
+ cmgr->io_bdt_pool[i] = kmalloc_obj(struct io_bdt);
if (!cmgr->io_bdt_pool[i]) {
QEDF_WARN(&(qedf->dbg_ctx),
"Failed to alloc io_bdt_pool[%d].\n", i);
diff --git a/drivers/scsi/qedf/qedf_main.c b/drivers/scsi/qedf/qedf_main.c
index c712fdf86911..f1b6abba81e6 100644
--- a/drivers/scsi/qedf/qedf_main.c
+++ b/drivers/scsi/qedf/qedf_main.c
@@ -2082,7 +2082,7 @@ static struct fc_host_statistics *qedf_fc_get_host_stats(struct Scsi_Host
if (lport->vport)
goto out;
- fw_fcoe_stats = kmalloc_obj(struct qed_fcoe_stats, GFP_KERNEL);
+ fw_fcoe_stats = kmalloc_obj(struct qed_fcoe_stats);
if (!fw_fcoe_stats) {
QEDF_ERR(&(qedf->dbg_ctx), "Could not allocate memory for "
"fw_fcoe_stats.\n");
@@ -2778,7 +2778,7 @@ static int qedf_prepare_sb(struct qedf_ctx *qedf)
int ret;
qedf->fp_array =
- kzalloc_objs(struct qedf_fastpath, qedf->num_queues, GFP_KERNEL);
+ kzalloc_objs(struct qedf_fastpath, qedf->num_queues);
if (!qedf->fp_array) {
QEDF_ERR(&(qedf->dbg_ctx), "fastpath array allocation "
@@ -2789,7 +2789,7 @@ static int qedf_prepare_sb(struct qedf_ctx *qedf)
for (id = 0; id < qedf->num_queues; id++) {
fp = &(qedf->fp_array[id]);
fp->sb_id = QEDF_SB_ID_NULL;
- fp->sb_info = kzalloc_objs(*fp->sb_info, 1, GFP_KERNEL);
+ fp->sb_info = kzalloc_objs(*fp->sb_info, 1);
if (!fp->sb_info) {
QEDF_ERR(&(qedf->dbg_ctx), "SB info struct "
"allocation failed.\n");
diff --git a/drivers/scsi/qedi/qedi_iscsi.c b/drivers/scsi/qedi/qedi_iscsi.c
index 65fdbc07de43..6ab3a989d281 100644
--- a/drivers/scsi/qedi/qedi_iscsi.c
+++ b/drivers/scsi/qedi/qedi_iscsi.c
@@ -440,7 +440,7 @@ static int qedi_iscsi_update_conn(struct qedi_ctx *qedi,
qedi_ep = qedi_conn->ep;
- conn_info = kzalloc_obj(*conn_info, GFP_KERNEL);
+ conn_info = kzalloc_obj(*conn_info);
if (!conn_info) {
QEDI_ERR(&qedi->dbg_ctx, "memory alloc failed\n");
return -ENOMEM;
@@ -505,7 +505,7 @@ static int qedi_iscsi_offload_conn(struct qedi_endpoint *qedi_ep)
int rval;
int i;
- conn_info = kzalloc_obj(*conn_info, GFP_KERNEL);
+ conn_info = kzalloc_obj(*conn_info);
if (!conn_info) {
QEDI_ERR(&qedi->dbg_ctx,
"Failed to allocate memory ep=%p\n", qedi_ep);
diff --git a/drivers/scsi/qedi/qedi_main.c b/drivers/scsi/qedi/qedi_main.c
index 14ec6cb44316..ddb061ac300b 100644
--- a/drivers/scsi/qedi/qedi_main.c
+++ b/drivers/scsi/qedi/qedi_main.c
@@ -276,7 +276,7 @@ static int qedi_alloc_uio_rings(struct qedi_ctx *qedi)
}
}
- udev = kzalloc_obj(*udev, GFP_KERNEL);
+ udev = kzalloc_obj(*udev);
if (!udev)
goto err_udev;
@@ -956,7 +956,7 @@ static int qedi_find_boot_info(struct qedi_ctx *qedi,
pri_ctrl_flags = !!(block->target[0].ctrl_flags &
NVM_ISCSI_CFG_TARGET_ENABLED);
if (pri_ctrl_flags) {
- pri_tgt = kzalloc_obj(*pri_tgt, GFP_KERNEL);
+ pri_tgt = kzalloc_obj(*pri_tgt);
if (!pri_tgt)
return -1;
qedi_get_boot_tgt_info(block, pri_tgt, 0);
@@ -965,7 +965,7 @@ static int qedi_find_boot_info(struct qedi_ctx *qedi,
sec_ctrl_flags = !!(block->target[1].ctrl_flags &
NVM_ISCSI_CFG_TARGET_ENABLED);
if (sec_ctrl_flags) {
- sec_tgt = kzalloc_obj(*sec_tgt, GFP_KERNEL);
+ sec_tgt = kzalloc_obj(*sec_tgt);
if (!sec_tgt) {
ret = -1;
goto free_tgt;
@@ -1066,7 +1066,7 @@ static void qedi_get_protocol_tlv_data(void *dev, void *data)
struct qedi_ctx *qedi = dev;
int rval = 0;
- fw_iscsi_stats = kmalloc_obj(*fw_iscsi_stats, GFP_KERNEL);
+ fw_iscsi_stats = kmalloc_obj(*fw_iscsi_stats);
if (!fw_iscsi_stats) {
QEDI_ERR(&qedi->dbg_ctx,
"Could not allocate memory for fw_iscsi_stats.\n");
diff --git a/drivers/scsi/qla2xxx/qla_bsg.c b/drivers/scsi/qla2xxx/qla_bsg.c
index 924b07f56c80..5e910b5ca670 100644
--- a/drivers/scsi/qla2xxx/qla_bsg.c
+++ b/drivers/scsi/qla2xxx/qla_bsg.c
@@ -2395,7 +2395,7 @@ qla2x00_do_dport_diagnostics(struct bsg_job *bsg_job)
!IS_QLA28XX(vha->hw))
return -EPERM;
- dd = kmalloc_obj(*dd, GFP_KERNEL);
+ dd = kmalloc_obj(*dd);
if (!dd) {
ql_log(ql_log_warn, vha, 0x70db,
"Failed to allocate memory for dport.\n");
@@ -2441,7 +2441,7 @@ qla2x00_do_dport_diagnostics_v2(struct bsg_job *bsg_job)
if (!IS_DPORT_CAPABLE(vha->hw))
return -EPERM;
- dd = kzalloc_obj(*dd, GFP_KERNEL);
+ dd = kzalloc_obj(*dd);
if (!dd)
return -ENOMEM;
@@ -2598,7 +2598,7 @@ qla2x00_manage_host_stats(struct bsg_job *bsg_job)
return -EIO;
}
- req_data = kzalloc_obj(*req_data, GFP_KERNEL);
+ req_data = kzalloc_obj(*req_data);
if (!req_data) {
ql_log(ql_log_warn, vha, 0x0000, "req_data memory allocation failure.\n");
return -ENOMEM;
@@ -2669,7 +2669,7 @@ qla2x00_get_host_stats(struct bsg_job *bsg_job)
return -EIO;
}
- req_data = kzalloc_obj(*req_data, GFP_KERNEL);
+ req_data = kzalloc_obj(*req_data);
if (!req_data) {
ql_log(ql_log_warn, vha, 0x0000, "req_data memory allocation failure.\n");
return -ENOMEM;
@@ -2776,7 +2776,7 @@ qla2x00_get_tgt_stats(struct bsg_job *bsg_job)
return -EIO;
}
- req_data = kzalloc_obj(*req_data, GFP_KERNEL);
+ req_data = kzalloc_obj(*req_data);
if (!req_data) {
ql_log(ql_log_warn, vha, 0x0000, "req_data memory allocation failure.\n");
return -ENOMEM;
@@ -2859,7 +2859,7 @@ qla2x00_manage_host_port(struct bsg_job *bsg_job)
return -EIO;
}
- req_data = kzalloc_obj(*req_data, GFP_KERNEL);
+ req_data = kzalloc_obj(*req_data);
if (!req_data) {
ql_log(ql_log_warn, vha, 0x0000, "req_data memory allocation failure.\n");
return -ENOMEM;
diff --git a/drivers/scsi/qla2xxx/qla_edif.c b/drivers/scsi/qla2xxx/qla_edif.c
index a2db229d3af4..eccedb38a515 100644
--- a/drivers/scsi/qla2xxx/qla_edif.c
+++ b/drivers/scsi/qla2xxx/qla_edif.c
@@ -1393,7 +1393,7 @@ qla_edif_add_sa_ctl(fc_port_t *fcport, struct qla_sa_update_frame *sa_frame,
int index = sa_frame->fast_sa_index;
unsigned long flags = 0;
- sa_ctl = kzalloc_obj(*sa_ctl, GFP_KERNEL);
+ sa_ctl = kzalloc_obj(*sa_ctl);
if (!sa_ctl) {
/* couldn't get space */
ql_dbg(ql_dbg_edif, fcport->vha, 0x9100,
@@ -3381,7 +3381,7 @@ void qla_edif_sadb_release(struct qla_hw_data *ha)
int qla_edif_sadb_build_free_pool(struct qla_hw_data *ha)
{
ha->edif_tx_sa_id_map =
- kzalloc_objs(long, BITS_TO_LONGS(EDIF_NUM_SA_INDEX), GFP_KERNEL);
+ kzalloc_objs(long, BITS_TO_LONGS(EDIF_NUM_SA_INDEX));
if (!ha->edif_tx_sa_id_map) {
ql_log_pci(ql_log_fatal, ha->pdev, 0x0009,
@@ -3390,7 +3390,7 @@ int qla_edif_sadb_build_free_pool(struct qla_hw_data *ha)
}
ha->edif_rx_sa_id_map =
- kzalloc_objs(long, BITS_TO_LONGS(EDIF_NUM_SA_INDEX), GFP_KERNEL);
+ kzalloc_objs(long, BITS_TO_LONGS(EDIF_NUM_SA_INDEX));
if (!ha->edif_rx_sa_id_map) {
kfree(ha->edif_tx_sa_id_map);
ha->edif_tx_sa_id_map = NULL;
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
index 808acf7daf4d..5badce1b8ff5 100644
--- a/drivers/scsi/qla2xxx/qla_init.c
+++ b/drivers/scsi/qla2xxx/qla_init.c
@@ -9230,7 +9230,7 @@ qla84xx_get_chip(struct scsi_qla_host *vha)
}
}
- cs84xx = kzalloc_obj(*cs84xx, GFP_KERNEL);
+ cs84xx = kzalloc_obj(*cs84xx);
if (!cs84xx)
goto done;
@@ -9884,7 +9884,7 @@ struct qla_qpair *qla2xxx_create_qpair(struct scsi_qla_host *vha, int qos,
}
if (ql2xmqsupport || ql2xnvmeenable) {
- qpair = kzalloc_obj(struct qla_qpair, GFP_KERNEL);
+ qpair = kzalloc_obj(struct qla_qpair);
if (qpair == NULL) {
ql_log(ql_log_warn, vha, 0x0182,
"Failed to allocate memory for queue pair.\n");
diff --git a/drivers/scsi/qla2xxx/qla_mid.c b/drivers/scsi/qla2xxx/qla_mid.c
index 34928d981677..6dca934b033a 100644
--- a/drivers/scsi/qla2xxx/qla_mid.c
+++ b/drivers/scsi/qla2xxx/qla_mid.c
@@ -707,7 +707,7 @@ qla25xx_create_req_que(struct qla_hw_data *ha, uint16_t options,
device_reg_t *reg;
uint32_t cnt;
- req = kzalloc_obj(struct req_que, GFP_KERNEL);
+ req = kzalloc_obj(struct req_que);
if (req == NULL) {
ql_log(ql_log_fatal, base_vha, 0x00d9,
"Failed to allocate memory for request queue.\n");
@@ -834,7 +834,7 @@ qla25xx_create_rsp_que(struct qla_hw_data *ha, uint16_t options,
uint16_t que_id = 0;
device_reg_t *reg;
- rsp = kzalloc_obj(struct rsp_que, GFP_KERNEL);
+ rsp = kzalloc_obj(struct rsp_que);
if (rsp == NULL) {
ql_log(ql_log_warn, base_vha, 0x0066,
"Failed to allocate memory for response queue.\n");
diff --git a/drivers/scsi/qla2xxx/qla_nx.c b/drivers/scsi/qla2xxx/qla_nx.c
index ec47ef3f0783..298c060c1292 100644
--- a/drivers/scsi/qla2xxx/qla_nx.c
+++ b/drivers/scsi/qla2xxx/qla_nx.c
@@ -1183,7 +1183,7 @@ qla82xx_pinit_from_rom(scsi_qla_host_t *vha)
ql_log(ql_log_info, vha, 0x0072,
"%d CRB init values found in ROM.\n", n);
- buf = kmalloc_objs(struct crb_addr_pair, n, GFP_KERNEL);
+ buf = kmalloc_objs(struct crb_addr_pair, n);
if (buf == NULL) {
ql_log(ql_log_fatal, vha, 0x010c,
"Unable to allocate memory.\n");
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index 89540254b784..976181464fbb 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -454,7 +454,7 @@ static int qla2x00_alloc_queues(struct qla_hw_data *ha, struct req_que *req,
goto fail_rsp_map;
}
- ha->base_qpair = kzalloc_obj(struct qla_qpair, GFP_KERNEL);
+ ha->base_qpair = kzalloc_obj(struct qla_qpair);
if (ha->base_qpair == NULL) {
ql_log(ql_log_warn, vha, 0x00e0,
"Failed to allocate base queue pair memory.\n");
@@ -2960,7 +2960,7 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
ql2xallocfwdump = 0;
}
- ha = kzalloc_obj(struct qla_hw_data, GFP_KERNEL);
+ ha = kzalloc_obj(struct qla_hw_data);
if (!ha) {
ql_log_pci(ql_log_fatal, pdev, 0x0009,
"Unable to allocate memory for ha.\n");
@@ -4336,7 +4336,7 @@ qla2x00_mem_alloc(struct qla_hw_data *ha, uint16_t req_len, uint16_t rsp_len,
}
/* Allocate memory for request ring */
- *req = kzalloc_obj(struct req_que, GFP_KERNEL);
+ *req = kzalloc_obj(struct req_que);
if (!*req) {
ql_log_pci(ql_log_fatal, ha->pdev, 0x0028,
"Failed to allocate memory for req.\n");
@@ -4352,7 +4352,7 @@ qla2x00_mem_alloc(struct qla_hw_data *ha, uint16_t req_len, uint16_t rsp_len,
goto fail_req_ring;
}
/* Allocate memory for response ring */
- *rsp = kzalloc_obj(struct rsp_que, GFP_KERNEL);
+ *rsp = kzalloc_obj(struct rsp_que);
if (!*rsp) {
ql_log_pci(ql_log_fatal, ha->pdev, 0x002a,
"Failed to allocate memory for rsp.\n");
@@ -6017,7 +6017,7 @@ qla25xx_rdp_rsp_reduce_size(struct scsi_qla_host *vha,
ql_dbg(ql_dbg_init, vha, 0x0181, "%s: s_id=%#x\n", __func__, sid);
- pdb = kzalloc_obj(*pdb, GFP_KERNEL);
+ pdb = kzalloc_obj(*pdb);
if (!pdb) {
ql_dbg(ql_dbg_init, vha, 0x0181,
"%s: Failed allocate pdb\n", __func__);
diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c
index 8062dad21d4e..9c9cb5c97f5c 100644
--- a/drivers/scsi/qla2xxx/qla_target.c
+++ b/drivers/scsi/qla2xxx/qla_target.c
@@ -7458,7 +7458,7 @@ int qlt_add_target(struct qla_hw_data *ha, struct scsi_qla_host *base_vha)
BUG_ON(base_vha->vha_tgt.qla_tgt != NULL);
- tgt = kzalloc_obj(struct qla_tgt, GFP_KERNEL);
+ tgt = kzalloc_obj(struct qla_tgt);
if (!tgt) {
ql_dbg(ql_dbg_tgt, base_vha, 0xe066,
"Unable to allocate struct qla_tgt\n");
diff --git a/drivers/scsi/qla2xxx/tcm_qla2xxx.c b/drivers/scsi/qla2xxx/tcm_qla2xxx.c
index 2eae89aad109..28df9025def0 100644
--- a/drivers/scsi/qla2xxx/tcm_qla2xxx.c
+++ b/drivers/scsi/qla2xxx/tcm_qla2xxx.c
@@ -1015,7 +1015,7 @@ static struct se_portal_group *tcm_qla2xxx_make_tpg(struct se_wwn *wwn,
return ERR_PTR(-ENOSYS);
}
- tpg = kzalloc_obj(struct tcm_qla2xxx_tpg, GFP_KERNEL);
+ tpg = kzalloc_obj(struct tcm_qla2xxx_tpg);
if (!tpg) {
pr_err("Unable to allocate struct tcm_qla2xxx_tpg\n");
return ERR_PTR(-ENOMEM);
@@ -1106,7 +1106,7 @@ static struct se_portal_group *tcm_qla2xxx_npiv_make_tpg(struct se_wwn *wwn,
if (kstrtoul(name + 5, 10, &tpgt) || tpgt > USHRT_MAX)
return ERR_PTR(-EINVAL);
- tpg = kzalloc_obj(struct tcm_qla2xxx_tpg, GFP_KERNEL);
+ tpg = kzalloc_obj(struct tcm_qla2xxx_tpg);
if (!tpg) {
pr_err("Unable to allocate struct tcm_qla2xxx_tpg\n");
return ERR_PTR(-ENOMEM);
@@ -1609,7 +1609,7 @@ static struct se_wwn *tcm_qla2xxx_make_lport(
if (tcm_qla2xxx_parse_wwn(name, &wwpn, 1) < 0)
return ERR_PTR(-EINVAL);
- lport = kzalloc_obj(struct tcm_qla2xxx_lport, GFP_KERNEL);
+ lport = kzalloc_obj(struct tcm_qla2xxx_lport);
if (!lport) {
pr_err("Unable to allocate struct tcm_qla2xxx_lport\n");
return ERR_PTR(-ENOMEM);
@@ -1735,7 +1735,7 @@ static struct se_wwn *tcm_qla2xxx_npiv_make_lport(
&npiv_wwpn, &npiv_wwnn) < 0)
return ERR_PTR(-EINVAL);
- lport = kzalloc_obj(struct tcm_qla2xxx_lport, GFP_KERNEL);
+ lport = kzalloc_obj(struct tcm_qla2xxx_lport);
if (!lport) {
pr_err("Unable to allocate struct tcm_qla2xxx_lport for NPIV\n");
return ERR_PTR(-ENOMEM);
diff --git a/drivers/scsi/qla4xxx/ql4_iocb.c b/drivers/scsi/qla4xxx/ql4_iocb.c
index 3ec9321f41e2..c40441b12db9 100644
--- a/drivers/scsi/qla4xxx/ql4_iocb.c
+++ b/drivers/scsi/qla4xxx/ql4_iocb.c
@@ -451,7 +451,7 @@ static struct mrb *qla4xxx_get_new_mrb(struct scsi_qla_host *ha)
{
struct mrb *mrb;
- mrb = kzalloc_obj(*mrb, GFP_KERNEL);
+ mrb = kzalloc_obj(*mrb);
if (!mrb)
return mrb;
diff --git a/drivers/scsi/qla4xxx/ql4_nx.c b/drivers/scsi/qla4xxx/ql4_nx.c
index 47b9fea0a989..f7340cfc990a 100644
--- a/drivers/scsi/qla4xxx/ql4_nx.c
+++ b/drivers/scsi/qla4xxx/ql4_nx.c
@@ -1058,7 +1058,7 @@ qla4_82xx_pinit_from_rom(struct scsi_qla_host *ha, int verbose)
ql4_printk(KERN_INFO, ha,
"%s: %d CRB init values found in ROM.\n", DRIVER_NAME, n);
- buf = kmalloc_objs(struct crb_addr_pair, n, GFP_KERNEL);
+ buf = kmalloc_objs(struct crb_addr_pair, n);
if (buf == NULL) {
ql4_printk(KERN_WARNING, ha,
"%s: [ERROR] Unable to malloc memory.\n", DRIVER_NAME);
diff --git a/drivers/scsi/raid_class.c b/drivers/scsi/raid_class.c
index 46fb627f61d6..94f76e358634 100644
--- a/drivers/scsi/raid_class.c
+++ b/drivers/scsi/raid_class.c
@@ -81,7 +81,7 @@ static int raid_setup(struct transport_container *tc, struct device *dev,
BUG_ON(dev_get_drvdata(cdev));
- rd = kzalloc_obj(*rd, GFP_KERNEL);
+ rd = kzalloc_obj(*rd);
if (!rd)
return -ENOMEM;
@@ -212,7 +212,7 @@ raid_attr_ro_state_fn(state);
struct raid_template *
raid_class_attach(struct raid_function_template *ft)
{
- struct raid_internal *i = kzalloc_obj(struct raid_internal, GFP_KERNEL);
+ struct raid_internal *i = kzalloc_obj(struct raid_internal);
int count = 0;
if (unlikely(!i))
diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c
index fb609d2db056..91933d2f5159 100644
--- a/drivers/scsi/scsi_debug.c
+++ b/drivers/scsi/scsi_debug.c
@@ -1169,7 +1169,7 @@ static ssize_t sdebug_error_write(struct file *file, const char __user *ubuf,
return -EINVAL;
}
- inject = kzalloc_obj(struct sdebug_err_inject, GFP_KERNEL);
+ inject = kzalloc_obj(struct sdebug_err_inject);
if (!inject) {
kfree(buf);
return -ENOMEM;
@@ -1266,7 +1266,7 @@ static int sdebug_target_alloc(struct scsi_target *starget)
{
struct sdebug_target_info *targetip;
- targetip = kzalloc_obj(struct sdebug_target_info, GFP_KERNEL);
+ targetip = kzalloc_obj(struct sdebug_target_info);
if (!targetip)
return -ENOMEM;
@@ -8791,7 +8791,7 @@ static int sdebug_add_store(void)
struct sdeb_store_info *sip = NULL;
struct xa_limit xal = { .max = 1 << 16, .min = 0 };
- sip = kzalloc_obj(*sip, GFP_KERNEL);
+ sip = kzalloc_obj(*sip);
if (!sip)
return -ENOMEM;
@@ -8868,7 +8868,7 @@ static int sdebug_add_host_helper(int per_host_idx)
struct sdebug_host_info *sdbg_host;
struct sdebug_dev_info *sdbg_devinfo, *tmp;
- sdbg_host = kzalloc_obj(*sdbg_host, GFP_KERNEL);
+ sdbg_host = kzalloc_obj(*sdbg_host);
if (!sdbg_host)
return -ENOMEM;
idx = (per_host_idx < 0) ? sdeb_first_idx : per_host_idx;
diff --git a/drivers/scsi/scsi_devinfo.c b/drivers/scsi/scsi_devinfo.c
index bb27ae42c594..0dada89d8d99 100644
--- a/drivers/scsi/scsi_devinfo.c
+++ b/drivers/scsi/scsi_devinfo.c
@@ -355,7 +355,7 @@ int scsi_dev_info_list_add_keyed(int compatible, char *vendor, char *model,
if (IS_ERR(devinfo_table))
return PTR_ERR(devinfo_table);
- devinfo = kmalloc_obj(*devinfo, GFP_KERNEL);
+ devinfo = kmalloc_obj(*devinfo);
if (!devinfo) {
printk(KERN_ERR "%s: no memory\n", __func__);
return -ENOMEM;
@@ -615,7 +615,7 @@ static int devinfo_seq_show(struct seq_file *m, void *v)
static void *devinfo_seq_start(struct seq_file *m, loff_t *ppos)
{
- struct double_list *dl = kmalloc_obj(*dl, GFP_KERNEL);
+ struct double_list *dl = kmalloc_obj(*dl);
loff_t pos = *ppos;
if (!dl)
@@ -759,7 +759,7 @@ int scsi_dev_info_add_list(enum scsi_devinfo_key key, const char *name)
/* list already exists */
return -EEXIST;
- devinfo_table = kmalloc_obj(*devinfo_table, GFP_KERNEL);
+ devinfo_table = kmalloc_obj(*devinfo_table);
if (!devinfo_table)
return -ENOMEM;
diff --git a/drivers/scsi/scsi_proc.c b/drivers/scsi/scsi_proc.c
index 046871351dc0..1799dcae775c 100644
--- a/drivers/scsi/scsi_proc.c
+++ b/drivers/scsi/scsi_proc.c
@@ -162,7 +162,7 @@ int scsi_proc_hostdir_add(const struct scsi_host_template *sht)
mutex_lock(&global_host_template_mutex);
e = __scsi_lookup_proc_entry(sht);
if (!e) {
- e = kzalloc_obj(*e, GFP_KERNEL);
+ e = kzalloc_obj(*e);
if (!e) {
ret = -ENOMEM;
goto unlock;
diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c
index ca2bda973aad..60c06fa4ec32 100644
--- a/drivers/scsi/scsi_scan.c
+++ b/drivers/scsi/scsi_scan.c
@@ -1954,7 +1954,7 @@ static struct async_scan_data *scsi_prep_async_scan(struct Scsi_Host *shost)
goto err;
}
- data = kmalloc_obj(*data, GFP_KERNEL);
+ data = kmalloc_obj(*data);
if (!data)
goto err;
data->shost = scsi_host_get(shost);
diff --git a/drivers/scsi/scsi_transport_fc.c b/drivers/scsi/scsi_transport_fc.c
index 3ec584e65fb4..dce95e361daf 100644
--- a/drivers/scsi/scsi_transport_fc.c
+++ b/drivers/scsi/scsi_transport_fc.c
@@ -2651,7 +2651,7 @@ struct scsi_transport_template *
fc_attach_transport(struct fc_function_template *ft)
{
int count;
- struct fc_internal *i = kzalloc_obj(struct fc_internal, GFP_KERNEL);
+ struct fc_internal *i = kzalloc_obj(struct fc_internal);
if (unlikely(!i))
return NULL;
diff --git a/drivers/scsi/scsi_transport_iscsi.c b/drivers/scsi/scsi_transport_iscsi.c
index af050a2c628e..8aa76f813bcd 100644
--- a/drivers/scsi/scsi_transport_iscsi.c
+++ b/drivers/scsi/scsi_transport_iscsi.c
@@ -4848,7 +4848,7 @@ iscsi_register_transport(struct iscsi_transport *tt)
if (priv)
return NULL;
- priv = kzalloc_obj(*priv, GFP_KERNEL);
+ priv = kzalloc_obj(*priv);
if (!priv)
return NULL;
INIT_LIST_HEAD(&priv->list);
diff --git a/drivers/scsi/scsi_transport_sas.c b/drivers/scsi/scsi_transport_sas.c
index 9bc00d950f86..12124f9d5ccd 100644
--- a/drivers/scsi/scsi_transport_sas.c
+++ b/drivers/scsi/scsi_transport_sas.c
@@ -712,7 +712,7 @@ struct sas_phy *sas_phy_alloc(struct device *parent, int number)
struct Scsi_Host *shost = dev_to_shost(parent);
struct sas_phy *phy;
- phy = kzalloc_obj(*phy, GFP_KERNEL);
+ phy = kzalloc_obj(*phy);
if (!phy)
return NULL;
@@ -907,7 +907,7 @@ struct sas_port *sas_port_alloc(struct device *parent, int port_id)
struct Scsi_Host *shost = dev_to_shost(parent);
struct sas_port *port;
- port = kzalloc_obj(*port, GFP_KERNEL);
+ port = kzalloc_obj(*port);
if (!port)
return NULL;
@@ -1467,7 +1467,7 @@ struct sas_rphy *sas_end_device_alloc(struct sas_port *parent)
struct Scsi_Host *shost = dev_to_shost(&parent->dev);
struct sas_end_device *rdev;
- rdev = kzalloc_obj(*rdev, GFP_KERNEL);
+ rdev = kzalloc_obj(*rdev);
if (!rdev) {
return NULL;
}
@@ -1511,7 +1511,7 @@ struct sas_rphy *sas_expander_alloc(struct sas_port *parent,
BUG_ON(type != SAS_EDGE_EXPANDER_DEVICE &&
type != SAS_FANOUT_EXPANDER_DEVICE);
- rdev = kzalloc_obj(*rdev, GFP_KERNEL);
+ rdev = kzalloc_obj(*rdev);
if (!rdev) {
return NULL;
}
@@ -1815,7 +1815,7 @@ sas_attach_transport(struct sas_function_template *ft)
struct sas_internal *i;
int count;
- i = kzalloc_obj(struct sas_internal, GFP_KERNEL);
+ i = kzalloc_obj(struct sas_internal);
if (!i)
return NULL;
diff --git a/drivers/scsi/scsi_transport_spi.c b/drivers/scsi/scsi_transport_spi.c
index 1f4299a61e1f..3e3da8c2ff26 100644
--- a/drivers/scsi/scsi_transport_spi.c
+++ b/drivers/scsi/scsi_transport_spi.c
@@ -1570,7 +1570,7 @@ static int spi_target_configure(struct transport_container *tc,
struct scsi_transport_template *
spi_attach_transport(struct spi_function_template *ft)
{
- struct spi_internal *i = kzalloc_obj(struct spi_internal, GFP_KERNEL);
+ struct spi_internal *i = kzalloc_obj(struct spi_internal);
if (unlikely(!i))
return NULL;
diff --git a/drivers/scsi/scsi_transport_srp.c b/drivers/scsi/scsi_transport_srp.c
index ada7e07e5ae0..d71ab5fdb758 100644
--- a/drivers/scsi/scsi_transport_srp.c
+++ b/drivers/scsi/scsi_transport_srp.c
@@ -700,7 +700,7 @@ struct srp_rport *srp_rport_add(struct Scsi_Host *shost,
struct srp_internal *i = to_srp_internal(shost->transportt);
int id, ret;
- rport = kzalloc_obj(*rport, GFP_KERNEL);
+ rport = kzalloc_obj(*rport);
if (!rport)
return ERR_PTR(-ENOMEM);
@@ -814,7 +814,7 @@ srp_attach_transport(struct srp_function_template *ft)
int count;
struct srp_internal *i;
- i = kzalloc_obj(*i, GFP_KERNEL);
+ i = kzalloc_obj(*i);
if (!i)
return NULL;
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index 92fbe9caf6be..628a1d0a74ba 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -3735,7 +3735,7 @@ static void sd_revalidate_disk(struct gendisk *disk)
if (!scsi_device_online(sdp))
return;
- lim = kmalloc_obj(*lim, GFP_KERNEL);
+ lim = kmalloc_obj(*lim);
if (!lim)
return;
@@ -3974,7 +3974,7 @@ static int sd_probe(struct scsi_device *sdp)
"sd_probe\n"));
error = -ENOMEM;
- sdkp = kzalloc_obj(*sdkp, GFP_KERNEL);
+ sdkp = kzalloc_obj(*sdkp);
if (!sdkp)
goto out;
diff --git a/drivers/scsi/ses.c b/drivers/scsi/ses.c
index 901956cf3c5b..c096bbf68b2f 100644
--- a/drivers/scsi/ses.c
+++ b/drivers/scsi/ses.c
@@ -715,7 +715,7 @@ static int ses_intf_add(struct device *cdev)
if (sdev->type != TYPE_ENCLOSURE)
sdev_printk(KERN_NOTICE, sdev, "Embedded Enclosure Device\n");
- ses_dev = kzalloc_obj(*ses_dev, GFP_KERNEL);
+ ses_dev = kzalloc_obj(*ses_dev);
hdr_buf = kzalloc(INIT_ALLOC_SIZE, GFP_KERNEL);
if (!hdr_buf || !ses_dev)
goto err_init_free;
diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c
index b04d8ddeb2eb..37bac49f30f0 100644
--- a/drivers/scsi/sg.c
+++ b/drivers/scsi/sg.c
@@ -1436,7 +1436,7 @@ sg_alloc(struct scsi_device *scsidp)
int error;
u32 k;
- sdp = kzalloc_obj(Sg_device, GFP_KERNEL);
+ sdp = kzalloc_obj(Sg_device);
if (!sdp) {
sdev_printk(KERN_WARNING, scsidp, "%s: kmalloc Sg_device "
"failure\n", __func__);
@@ -2456,7 +2456,7 @@ struct sg_proc_deviter {
static void * dev_seq_start(struct seq_file *s, loff_t *pos)
{
- struct sg_proc_deviter * it = kmalloc_obj(*it, GFP_KERNEL);
+ struct sg_proc_deviter * it = kmalloc_obj(*it);
s->private = it;
if (! it)
diff --git a/drivers/scsi/sim710.c b/drivers/scsi/sim710.c
index 16ca6245c51d..408f37003748 100644
--- a/drivers/scsi/sim710.c
+++ b/drivers/scsi/sim710.c
@@ -87,7 +87,7 @@ static int sim710_probe_common(struct device *dev, unsigned long base_addr,
{
struct Scsi_Host * host = NULL;
struct NCR_700_Host_Parameters *hostdata =
- kzalloc_obj(struct NCR_700_Host_Parameters, GFP_KERNEL);
+ kzalloc_obj(struct NCR_700_Host_Parameters);
printk(KERN_NOTICE "sim710: %s\n", dev_name(dev));
printk(KERN_NOTICE "sim710: irq = %d, clock = %d, base = 0x%lx, scsi_id = %d\n",
diff --git a/drivers/scsi/smartpqi/smartpqi_init.c b/drivers/scsi/smartpqi/smartpqi_init.c
index 88b94e611d0f..2fb918677eb6 100644
--- a/drivers/scsi/smartpqi/smartpqi_init.c
+++ b/drivers/scsi/smartpqi/smartpqi_init.c
@@ -888,7 +888,7 @@ static int pqi_get_advanced_raid_bypass_config(struct pqi_ctrl_info *ctrl_info)
struct pqi_raid_path_request request;
struct bmic_sense_feature_buffer *buffer;
- buffer = kmalloc_obj(*buffer, GFP_KERNEL);
+ buffer = kmalloc_obj(*buffer);
if (!buffer)
return -ENOMEM;
@@ -953,7 +953,7 @@ static int pqi_flush_cache(struct pqi_ctrl_info *ctrl_info,
int rc;
struct bmic_flush_cache *flush_cache;
- flush_cache = kzalloc_obj(*flush_cache, GFP_KERNEL);
+ flush_cache = kzalloc_obj(*flush_cache);
if (!flush_cache)
return -ENOMEM;
@@ -982,7 +982,7 @@ static int pqi_set_diag_rescan(struct pqi_ctrl_info *ctrl_info)
int rc;
struct bmic_diag_options *diag;
- diag = kzalloc_obj(*diag, GFP_KERNEL);
+ diag = kzalloc_obj(*diag);
if (!diag)
return -ENOMEM;
@@ -1164,7 +1164,7 @@ static int pqi_report_phys_logical_luns(struct pqi_ctrl_info *ctrl_info, u8 cmd,
void *lun_data = NULL;
struct report_lun_header *report_lun_header;
- report_lun_header = kmalloc_obj(*report_lun_header, GFP_KERNEL);
+ report_lun_header = kmalloc_obj(*report_lun_header);
if (!report_lun_header) {
rc = -ENOMEM;
goto out;
@@ -1478,7 +1478,7 @@ static int pqi_get_raid_map(struct pqi_ctrl_info *ctrl_info,
u32 raid_map_size;
struct raid_map *raid_map;
- raid_map = kmalloc_obj(*raid_map, GFP_KERNEL);
+ raid_map = kmalloc_obj(*raid_map);
if (!raid_map)
return -ENOMEM;
@@ -1616,7 +1616,7 @@ static void pqi_get_volume_status(struct pqi_ctrl_info *ctrl_info,
u32 volume_flags;
struct ciss_vpd_logical_volume_status *vpd;
- vpd = kmalloc_obj(*vpd, GFP_KERNEL);
+ vpd = kmalloc_obj(*vpd);
if (!vpd)
goto no_buffer;
@@ -2447,7 +2447,7 @@ static int pqi_update_scsi_devices(struct pqi_ctrl_info *ctrl_info)
* pqi_get_physical_disk_info() because it's a fairly large
* buffer.
*/
- id_phys = kmalloc_obj(*id_phys, GFP_KERNEL);
+ id_phys = kmalloc_obj(*id_phys);
if (!id_phys) {
dev_warn(&ctrl_info->pci_dev->dev, "%s\n",
out_of_memory_msg);
@@ -2481,7 +2481,7 @@ static int pqi_update_scsi_devices(struct pqi_ctrl_info *ctrl_info)
}
for (i = 0; i < num_new_devices; i++) {
- device = kzalloc_obj(*device, GFP_KERNEL);
+ device = kzalloc_obj(*device);
if (!device) {
dev_warn(&ctrl_info->pci_dev->dev, "%s\n",
out_of_memory_msg);
@@ -4750,7 +4750,7 @@ static int pqi_report_device_capability(struct pqi_ctrl_info *ctrl_info)
struct pqi_device_capability *capability;
struct pqi_iu_layer_descriptor *sop_iu_layer_descriptor;
- capability = kmalloc_obj(*capability, GFP_KERNEL);
+ capability = kmalloc_obj(*capability);
if (!capability)
return -ENOMEM;
@@ -7746,7 +7746,7 @@ static int pqi_get_ctrl_serial_number(struct pqi_ctrl_info *ctrl_info)
int rc;
struct bmic_sense_subsystem_info *sense_info;
- sense_info = kzalloc_obj(*sense_info, GFP_KERNEL);
+ sense_info = kzalloc_obj(*sense_info);
if (!sense_info)
return -ENOMEM;
@@ -7769,7 +7769,7 @@ static int pqi_get_ctrl_product_details(struct pqi_ctrl_info *ctrl_info)
int rc;
struct bmic_identify_controller *identify;
- identify = kmalloc_obj(*identify, GFP_KERNEL);
+ identify = kmalloc_obj(*identify);
if (!identify)
return -ENOMEM;
diff --git a/drivers/scsi/smartpqi/smartpqi_sas_transport.c b/drivers/scsi/smartpqi/smartpqi_sas_transport.c
index 093b2ee39e90..b9c56a3816e0 100644
--- a/drivers/scsi/smartpqi/smartpqi_sas_transport.c
+++ b/drivers/scsi/smartpqi/smartpqi_sas_transport.c
@@ -22,7 +22,7 @@ static struct pqi_sas_phy *pqi_alloc_sas_phy(struct pqi_sas_port *pqi_sas_port)
struct pqi_sas_phy *pqi_sas_phy;
struct sas_phy *phy;
- pqi_sas_phy = kzalloc_obj(*pqi_sas_phy, GFP_KERNEL);
+ pqi_sas_phy = kzalloc_obj(*pqi_sas_phy);
if (!pqi_sas_phy)
return NULL;
@@ -131,7 +131,7 @@ static struct pqi_sas_port *pqi_alloc_sas_port(
struct pqi_sas_port *pqi_sas_port;
struct sas_port *port;
- pqi_sas_port = kzalloc_obj(*pqi_sas_port, GFP_KERNEL);
+ pqi_sas_port = kzalloc_obj(*pqi_sas_port);
if (!pqi_sas_port)
return NULL;
@@ -180,7 +180,7 @@ static struct pqi_sas_node *pqi_alloc_sas_node(struct device *parent_dev)
{
struct pqi_sas_node *pqi_sas_node;
- pqi_sas_node = kzalloc_obj(*pqi_sas_node, GFP_KERNEL);
+ pqi_sas_node = kzalloc_obj(*pqi_sas_node);
if (pqi_sas_node) {
pqi_sas_node->parent_dev = parent_dev;
INIT_LIST_HEAD(&pqi_sas_node->port_list_head);
@@ -463,7 +463,7 @@ pqi_build_csmi_smp_passthru_buffer(struct sas_rphy *rphy,
u32 req_size;
u32 resp_size;
- smp_buf = kzalloc_obj(*smp_buf, GFP_KERNEL);
+ smp_buf = kzalloc_obj(*smp_buf);
if (!smp_buf)
return NULL;
diff --git a/drivers/scsi/sni_53c710.c b/drivers/scsi/sni_53c710.c
index 0e57e873dc42..b504a2cc5041 100644
--- a/drivers/scsi/sni_53c710.c
+++ b/drivers/scsi/sni_53c710.c
@@ -64,7 +64,7 @@ static int snirm710_probe(struct platform_device *dev)
return -ENODEV;
base = res->start;
- hostdata = kzalloc_obj(*hostdata, GFP_KERNEL);
+ hostdata = kzalloc_obj(*hostdata);
if (!hostdata)
return -ENOMEM;
diff --git a/drivers/scsi/snic/snic_disc.c b/drivers/scsi/snic/snic_disc.c
index 064f2d4d0ffc..71d34a702f2a 100644
--- a/drivers/scsi/snic/snic_disc.c
+++ b/drivers/scsi/snic/snic_disc.c
@@ -244,7 +244,7 @@ snic_tgt_create(struct snic *snic, struct snic_tgt_id *tgtid)
return tgt;
}
- tgt = kzalloc_obj(*tgt, GFP_KERNEL);
+ tgt = kzalloc_obj(*tgt);
if (!tgt) {
SNIC_HOST_ERR(snic->shost, "Failure to allocate snic_tgt.\n");
ret = -ENOMEM;
diff --git a/drivers/scsi/snic/snic_main.c b/drivers/scsi/snic/snic_main.c
index f9ee2205407e..82953e6a0915 100644
--- a/drivers/scsi/snic/snic_main.c
+++ b/drivers/scsi/snic/snic_main.c
@@ -818,7 +818,7 @@ snic_global_data_init(void)
struct kmem_cache *cachep;
ssize_t len = 0;
- snic_glob = kzalloc_obj(*snic_glob, GFP_KERNEL);
+ snic_glob = kzalloc_obj(*snic_glob);
if (!snic_glob) {
SNIC_ERR("Failed to allocate Global Context.\n");
diff --git a/drivers/scsi/sr.c b/drivers/scsi/sr.c
index f1871d78c30c..7adb2573f50d 100644
--- a/drivers/scsi/sr.c
+++ b/drivers/scsi/sr.c
@@ -629,7 +629,7 @@ static int sr_probe(struct scsi_device *sdev)
goto fail;
error = -ENOMEM;
- cd = kzalloc_obj(*cd, GFP_KERNEL);
+ cd = kzalloc_obj(*cd);
if (!cd)
goto fail;
diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c
index 438c4e50d0fd..f1c3c4946637 100644
--- a/drivers/scsi/st.c
+++ b/drivers/scsi/st.c
@@ -462,7 +462,7 @@ static struct st_request *st_allocate_request(struct scsi_tape *stp)
{
struct st_request *streq;
- streq = kzalloc_obj(*streq, GFP_KERNEL);
+ streq = kzalloc_obj(*streq);
if (streq)
streq->stp = stp;
else {
@@ -3973,7 +3973,7 @@ static struct st_buffer *new_tape_buffer(int max_sg)
{
struct st_buffer *tb;
- tb = kzalloc_obj(struct st_buffer, GFP_KERNEL);
+ tb = kzalloc_obj(struct st_buffer);
if (!tb) {
printk(KERN_NOTICE "st: Can't allocate new tape buffer.\n");
return NULL;
@@ -3982,7 +3982,7 @@ static struct st_buffer *new_tape_buffer(int max_sg)
tb->use_sg = max_sg;
tb->buffer_size = 0;
- tb->reserved_pages = kzalloc_objs(struct page *, max_sg, GFP_KERNEL);
+ tb->reserved_pages = kzalloc_objs(struct page *, max_sg);
if (!tb->reserved_pages) {
kfree(tb);
return NULL;
@@ -4373,7 +4373,7 @@ static int st_probe(struct scsi_device *SDp)
goto out;
}
- tpnt = kzalloc_obj(struct scsi_tape, GFP_KERNEL);
+ tpnt = kzalloc_obj(struct scsi_tape);
if (tpnt == NULL) {
sdev_printk(KERN_ERR, SDp,
"st: Can't allocate device descriptor.\n");
@@ -4456,7 +4456,7 @@ static int st_probe(struct scsi_device *SDp)
}
tpnt->index = error;
sprintf(tpnt->name, "st%d", tpnt->index);
- tpnt->stats = kzalloc_obj(struct scsi_tape_stats, GFP_KERNEL);
+ tpnt->stats = kzalloc_obj(struct scsi_tape_stats);
if (tpnt->stats == NULL) {
sdev_printk(KERN_ERR, SDp,
"st: Can't allocate statistics.\n");
@@ -5006,7 +5006,7 @@ static int sgl_map_user_pages(struct st_buffer *STbp,
if (count == 0)
return 0;
- pages = kmalloc_objs(*pages, max_pages, GFP_KERNEL);
+ pages = kmalloc_objs(*pages, max_pages);
if (pages == NULL)
return -ENOMEM;
diff --git a/drivers/scsi/stex.c b/drivers/scsi/stex.c
index 1ff8be01b1b1..6aeeb338633d 100644
--- a/drivers/scsi/stex.c
+++ b/drivers/scsi/stex.c
@@ -1757,7 +1757,7 @@ static int stex_probe(struct pci_dev *pdev, const struct pci_device_id *id)
}
}
- hba->ccb = kzalloc_objs(struct st_ccb, ci->rq_count, GFP_KERNEL);
+ hba->ccb = kzalloc_objs(struct st_ccb, ci->rq_count);
if (!hba->ccb) {
err = -ENOMEM;
printk(KERN_ERR DRV_NAME "(%s): ccb alloc failed\n",
diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c
index 4e3ff9e0a794..664ad55728b5 100644
--- a/drivers/scsi/storvsc_drv.c
+++ b/drivers/scsi/storvsc_drv.c
@@ -1970,7 +1970,7 @@ static int storvsc_probe(struct hv_device *device,
host_dev->host = host;
- stor_device = kzalloc_obj(struct storvsc_device, GFP_KERNEL);
+ stor_device = kzalloc_obj(struct storvsc_device);
if (!stor_device) {
ret = -ENOMEM;
goto err_out0;
diff --git a/drivers/scsi/sym53c8xx_2/sym_hipd.c b/drivers/scsi/sym53c8xx_2/sym_hipd.c
index b9117acd324d..c554e4158094 100644
--- a/drivers/scsi/sym53c8xx_2/sym_hipd.c
+++ b/drivers/scsi/sym53c8xx_2/sym_hipd.c
@@ -5655,7 +5655,7 @@ int sym_hcb_attach(struct Scsi_Host *shost, struct sym_fw *fw, struct sym_nvram
/*
* Allocate the array of lists of CCBs hashed by DSA.
*/
- np->ccbh = kzalloc_objs(*np->ccbh, CCB_HASH_SIZE, GFP_KERNEL);
+ np->ccbh = kzalloc_objs(*np->ccbh, CCB_HASH_SIZE);
if (!np->ccbh)
goto attach_failed;
diff --git a/drivers/scsi/virtio_scsi.c b/drivers/scsi/virtio_scsi.c
index 7cccb4e06297..0ed8558dad72 100644
--- a/drivers/scsi/virtio_scsi.c
+++ b/drivers/scsi/virtio_scsi.c
@@ -853,8 +853,8 @@ static int virtscsi_init(struct virtio_device *vdev,
num_req_vqs = vscsi->num_queues;
num_vqs = num_req_vqs + VIRTIO_SCSI_VQ_BASE;
- vqs = kmalloc_objs(struct virtqueue *, num_vqs, GFP_KERNEL);
- vqs_info = kzalloc_objs(*vqs_info, num_vqs, GFP_KERNEL);
+ vqs = kmalloc_objs(struct virtqueue *, num_vqs);
+ vqs_info = kzalloc_objs(*vqs_info, num_vqs);
if (!vqs || !vqs_info) {
err = -ENOMEM;
diff --git a/drivers/scsi/zorro7xx.c b/drivers/scsi/zorro7xx.c
index 392c905726ef..6aca9897b231 100644
--- a/drivers/scsi/zorro7xx.c
+++ b/drivers/scsi/zorro7xx.c
@@ -95,7 +95,7 @@ static int zorro7xx_init_one(struct zorro_dev *z,
return -EBUSY;
}
- hostdata = kzalloc_obj(struct NCR_700_Host_Parameters, GFP_KERNEL);
+ hostdata = kzalloc_obj(struct NCR_700_Host_Parameters);
if (!hostdata) {
printk(KERN_ERR "zorro7xx: Failed to allocate host data\n");
goto out_release;
diff --git a/drivers/scsi/zorro_esp.c b/drivers/scsi/zorro_esp.c
index 39c0357eb8bd..1622285c9aec 100644
--- a/drivers/scsi/zorro_esp.c
+++ b/drivers/scsi/zorro_esp.c
@@ -726,7 +726,7 @@ static int zorro_esp_probe(struct zorro_dev *z,
pr_info("%s found at address 0x%lx.\n", zdd->name, board);
- zep = kzalloc_obj(*zep, GFP_KERNEL);
+ zep = kzalloc_obj(*zep);
if (!zep) {
pr_err("Can't allocate device private data!\n");
return -ENOMEM;