scsi: remove unnecessary oom message
Subsystems (14)
v2 cover scsi: remove unnecessary oom message
v1 --> v2:
Combine these individual patches into a series.
Zhen Lei (20):
scsi: zorro_esp: remove unnecessary oom message
scsi: zorro7xx: remove unnecessary oom message
scsi: bvme6000: remove unnecessary oom message
scsi: vmw_pvscsi: remove unnecessary oom message
snic: remove unnecessary oom message
scsi: devinfo: remove unnecessary oom message
scsi: tcm_qla2xxx: remove unnecessary oom message
scsi: pmcraid: remove unnecessary oom message
scsi: mvme16x: remove unnecessary oom message
scsi: libsas: remove unnecessary oom message
scsi: ips: remove unnecessary oom message
scsi: ipr: remove unnecessary oom message
scsi: fnic: remove unnecessary oom message
scsi: fcoe: remove unnecessary oom message
scsi: libcxgbi: remove unnecessary oom message
scsi: bnx2i: remove unnecessary oom message
scsi: aic94xx: remove unnecessary oom message
scsi: aacraid: remove unnecessary oom message
scsi: a100u2w: remove unnecessary oom message
scsi: 3w-xxx: remove unnecessary oom message
drivers/scsi/3w-xxxx.c | 4 +--- drivers/scsi/a100u2w.c | 8 ++------ drivers/scsi/aacraid/comminit.c | 8 ++------ drivers/scsi/aic94xx/aic94xx_init.c | 4 +--- drivers/scsi/aic94xx/aic94xx_sds.c | 4 +--- drivers/scsi/bnx2i/bnx2i_iscsi.c | 2 -- drivers/scsi/bvme6000_scsi.c | 5 +---- drivers/scsi/cxgbi/libcxgbi.c | 7 +++---- drivers/scsi/fcoe/fcoe_transport.c | 4 +--- drivers/scsi/fnic/fnic_trace.c | 2 -- drivers/scsi/fnic/vnic_rq.c | 4 +--- drivers/scsi/fnic/vnic_wq.c | 4 +--- drivers/scsi/ipr.c | 5 +---- drivers/scsi/ips.c | 4 +--- drivers/scsi/libsas/sas_ata.c | 4 +--- drivers/scsi/mvme16x_scsi.c | 5 +---- drivers/scsi/pmcraid.c | 10 ++-------- drivers/scsi/qla2xxx/tcm_qla2xxx.c | 16 ++++------------ drivers/scsi/scsi_devinfo.c | 4 +--- drivers/scsi/snic/vnic_wq.c | 5 +---- drivers/scsi/vmw_pvscsi.c | 5 +---- drivers/scsi/zorro7xx.c | 4 +--- drivers/scsi/zorro_esp.c | 4 +--- 23 files changed, 29 insertions(+), 93 deletions(-)
Signature · 1 line
2.26.0.106.g9fadedd
PATCH v2 1/20 scsi: zorro_esp: remove unnecessary oom message
Fixes scripts/checkpatch.pl warning:
WARNING: Possible unnecessary 'out of memory' message
Remove it can help us save a bit of memory.
--- drivers/scsi/zorro_esp.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/scsi/zorro_esp.c +1 -3
@@ -727,10 +727,8 @@ static int zorro_esp_probe(struct zorro_dev *z,pr_info ("%s found at address 0x%lx.\n" , zdd->name, board); zep =kzalloc (sizeof (*zep),GFP_KERNEL ); -if (!zep) { -pr_err ("Can't allocate device private data!\n" ); +if (!zep)return -ENOMEM ; - }/* let's figure out whether we have a Zorro II or Zorro III board */ if ((z->rom.er_Type &ERT_TYPEMASK ) ==ERT_ZORROIII ) {
Signature · 1 line
2.26.0.106.g9fadedd
PATCH v2 2/20 scsi: zorro7xx: remove unnecessary oom message
In reply to Zhen LeiFixes scripts/checkpatch.pl warning:
WARNING: Possible unnecessary 'out of memory' message
Remove it can help us save a bit of memory.
--- drivers/scsi/zorro7xx.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/scsi/zorro7xx.c +1 -3
@@ -96,10 +96,8 @@ static int zorro7xx_init_one(struct zorro_dev *z, } hostdata =kzalloc (sizeof (struct NCR_700_Host_Parameters ),GFP_KERNEL ); -if (!hostdata) { -printk (KERN_ERR "zorro7xx: Failed to allocate host data\n" ); +if (!hostdata) goto out_release; - }/* Fill in the required pieces of hostdata */ if (ioaddr >0x01000000 )
Signature · 1 line
2.26.0.106.g9fadedd
PATCH v2 3/20 scsi: bvme6000: remove unnecessary oom message
In reply to Zhen LeiFixes scripts/checkpatch.pl warning:
WARNING: Possible unnecessary 'out of memory' message
Remove it can help us save a bit of memory.
--- drivers/scsi/bvme6000_scsi.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/scsi/bvme6000_scsi.c +1 -4
@@ -45,11 +45,8 @@ bvme6000_probe(struct platform_device *dev) goto out; hostdata =kzalloc (sizeof (struct NCR_700_Host_Parameters ),GFP_KERNEL ); -if (!hostdata) { -printk (KERN_ERR "bvme6000-scsi: " -"Failed to allocate host data\n" ); +if (!hostdata) goto out; - }/* Fill in the required pieces of hostdata */ hostdata->base = (void __iomem *)BVME_NCR53C710_BASE ;
Signature · 1 line
2.26.0.106.g9fadedd
PATCH v2 4/20 scsi: vmw_pvscsi: remove unnecessary oom message
In reply to Zhen LeiFixes scripts/checkpatch.pl warning:
WARNING: Possible unnecessary 'out of memory' message
Remove it can help us save a bit of memory.
--- drivers/scsi/vmw_pvscsi.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/scsi/vmw_pvscsi.c +1 -4
@@ -1304,10 +1304,8 @@ static u32 pvscsi_get_max_targets(struct pvscsi_adapter *adapter) dev =pvscsi_dev (adapter); config_page =dma_alloc_coherent (&adapter->dev->dev,PAGE_SIZE , &configPagePA,GFP_KERNEL ); -if (!config_page) { -dev_warn (dev,"vmw_pvscsi: failed to allocate memory for config page\n" ); +if (!config_page) goto exit; - }BUG_ON (configPagePA & ~PAGE_MASK );/* Fetch config info from the device. */
@@ -1479,7 +1477,6 @@ static int pvscsi_probe(struct pci_dev *pdev, const struct pci_device_id *id) adapter->cmd_map =kcalloc (adapter->req_depth,sizeof (struct pvscsi_ctx ),GFP_KERNEL );if (!adapter->cmd_map) { -printk (KERN_ERR "vmw_pvscsi: failed to allocate memory.\n" ); error = -ENOMEM ; goto out_reset_adapter; }
Signature · 1 line
2.26.0.106.g9fadedd
PATCH v2 5/20 snic: remove unnecessary oom message
In reply to Zhen LeiFixes scripts/checkpatch.pl warning:
WARNING: Possible unnecessary 'out of memory' message
Remove it can help us save a bit of memory.
--- drivers/scsi/snic/vnic_wq.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/scsi/snic/vnic_wq.c +1 -4
@@ -48,11 +48,8 @@ static int vnic_wq_alloc_bufs(struct vnic_wq *wq)for (i =0 ; i < blks; i++) { wq->bufs[i] =kzalloc (VNIC_WQ_BUF_BLK_SZ ,GFP_ATOMIC ); -if (!wq->bufs[i]) { -pr_err ("Failed to alloc wq_bufs\n" ); - +if (!wq->bufs[i])return -ENOMEM ; - } }for (i =0 ; i < blks; i++) {
Signature · 1 line
2.26.0.106.g9fadedd
PATCH v2 6/20 scsi: devinfo: remove unnecessary oom message
In reply to Zhen LeiFixes scripts/checkpatch.pl warning:
WARNING: Possible unnecessary 'out of memory' message
Remove it can help us save a bit of memory.
--- drivers/scsi/scsi_devinfo.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/scsi/scsi_devinfo.c +1 -3
@@ -357,10 +357,8 @@ int scsi_dev_info_list_add_keyed(int compatible, char *vendor, char *model,return PTR_ERR (devinfo_table); devinfo =kmalloc (sizeof (*devinfo),GFP_KERNEL ); -if (!devinfo) { -printk (KERN_ERR "%s: no memory\n" , __func__); +if (!devinfo)return -ENOMEM ; - }scsi_strcpy_devinfo ("vendor" , devinfo->vendor,sizeof (devinfo->vendor), vendor, compatible);
Signature · 1 line
2.26.0.106.g9fadedd
PATCH v2 7/20 scsi: tcm_qla2xxx: remove unnecessary oom message
In reply to Zhen LeiFixes scripts/checkpatch.pl warning:
WARNING: Possible unnecessary 'out of memory' message
Remove it can help us save a bit of memory.
--- drivers/scsi/qla2xxx/tcm_qla2xxx.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-)
drivers/scsi/qla2xxx/tcm_qla2xxx.c +4 -12
@@ -1035,10 +1035,8 @@ static struct se_portal_group *tcm_qla2xxx_make_tpg(struct se_wwn *wwn, } tpg =kzalloc (sizeof (struct tcm_qla2xxx_tpg ),GFP_KERNEL ); -if (!tpg) { -pr_err ("Unable to allocate struct tcm_qla2xxx_tpg\n" ); +if (!tpg)return ERR_PTR (-ENOMEM ); - } tpg->lport = lport; tpg->lport_tpgt = tpgt;/*
@@ -1151,10 +1149,8 @@ static struct se_portal_group *tcm_qla2xxx_npiv_make_tpg(struct se_wwn *wwn,return ERR_PTR (-EINVAL ); tpg =kzalloc (sizeof (struct tcm_qla2xxx_tpg ),GFP_KERNEL ); -if (!tpg) { -pr_err ("Unable to allocate struct tcm_qla2xxx_tpg\n" ); +if (!tpg)return ERR_PTR (-ENOMEM ); - } tpg->lport = lport; tpg->lport_tpgt = tpgt;
@@ -1653,10 +1649,8 @@ static struct se_wwn *tcm_qla2xxx_make_lport(return ERR_PTR (-EINVAL ); lport =kzalloc (sizeof (struct tcm_qla2xxx_lport ),GFP_KERNEL ); -if (!lport) { -pr_err ("Unable to allocate struct tcm_qla2xxx_lport\n" ); +if (!lport)return ERR_PTR (-ENOMEM ); - } lport->lport_wwpn = wwpn;tcm_qla2xxx_format_wwn (&lport->lport_name[0 ],TCM_QLA2XXX_NAMELEN , wwpn);
@@ -1779,10 +1773,8 @@ static struct se_wwn *tcm_qla2xxx_npiv_make_lport(return ERR_PTR (-EINVAL ); lport =kzalloc (sizeof (struct tcm_qla2xxx_lport ),GFP_KERNEL ); -if (!lport) { -pr_err ("Unable to allocate struct tcm_qla2xxx_lport for NPIV\n" ); +if (!lport)return ERR_PTR (-ENOMEM ); - } lport->lport_npiv_wwpn = npiv_wwpn; lport->lport_npiv_wwnn = npiv_wwnn;sprintf (lport->lport_naa_name,"naa.%016llx" , (unsigned long long ) npiv_wwpn);
Signature · 1 line
2.26.0.106.g9fadedd
PATCH v2 8/20 scsi: pmcraid: remove unnecessary oom message
In reply to Zhen LeiFixes scripts/checkpatch.pl warning:
WARNING: Possible unnecessary 'out of memory' message
Remove it can help us save a bit of memory.
--- drivers/scsi/pmcraid.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-)
drivers/scsi/pmcraid.c +2 -8
@@ -3601,11 +3601,8 @@ static long pmcraid_ioctl_passthrough( buffer_size =sizeof (struct pmcraid_passthrough_ioctl_buffer ); buffer =kmalloc (buffer_size,GFP_KERNEL ); - -if (!buffer) { -pmcraid_err ("no memory for passthrough buffer\n" ); +if (!buffer)return -ENOMEM ; - } request_offset = offsetof(struct pmcraid_passthrough_ioctl_buffer , request_buffer);
@@ -3903,11 +3900,8 @@ static long pmcraid_chr_ioctl(int retval = -ENOTTY ; hdr =kmalloc (sizeof (struct pmcraid_ioctl_header ),GFP_KERNEL ); - -if (!hdr) { -pmcraid_err ("failed to allocate memory for ioctl header\n" ); +if (!hdr)return -ENOMEM ; - } retval =pmcraid_check_ioctl_buffer (cmd, argp, hdr);
Signature · 1 line
2.26.0.106.g9fadedd
PATCH v2 9/20 scsi: mvme16x: remove unnecessary oom message
In reply to Zhen LeiFixes scripts/checkpatch.pl warning:
WARNING: Possible unnecessary 'out of memory' message
Remove it can help us save a bit of memory.
--- drivers/scsi/mvme16x_scsi.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/scsi/mvme16x_scsi.c +1 -4
@@ -50,11 +50,8 @@ static int mvme16x_probe(struct platform_device *dev) } hostdata =kzalloc (sizeof (struct NCR_700_Host_Parameters ),GFP_KERNEL ); -if (hostdata ==NULL ) { -printk (KERN_ERR "mvme16x-scsi: " -"Failed to allocate host data\n" ); +if (!hostdata) goto out; - }/* Fill in the required pieces of hostdata */ hostdata->base = (void __iomem *)0xfff47000UL ;
Signature · 1 line
2.26.0.106.g9fadedd
PATCH v2 10/20 scsi: libsas: remove unnecessary oom message
In reply to Zhen LeiFixes scripts/checkpatch.pl warning:
WARNING: Possible unnecessary 'out of memory' message
Remove it can help us save a bit of memory.
--- drivers/scsi/libsas/sas_ata.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/scsi/libsas/sas_ata.c +1 -3
@@ -552,10 +552,8 @@ int sas_ata_init(struct domain_device *found_dev)int rc; ata_host =kzalloc (sizeof (*ata_host),GFP_KERNEL ); -if (!ata_host) { -pr_err ("ata host alloc failed.\n" ); +if (!ata_host)return -ENOMEM ; - }ata_host_init (ata_host, ha->dev, &sas_sata_ops);
Signature · 1 line
2.26.0.106.g9fadedd
PATCH v2 11/20 scsi: ips: remove unnecessary oom message
In reply to Zhen LeiFixes scripts/checkpatch.pl warning:
WARNING: Possible unnecessary 'out of memory' message
Remove it can help us save a bit of memory.
--- drivers/scsi/ips.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/scsi/ips.c +1 -3
@@ -1685,10 +1685,8 @@ ips_flash_copperhead(ips_ha_t * ha, ips_passthru_t * pt, ips_scb_t * scb) pt->CoppCP.cmd.flashfw.count; ha->flash_data =dma_alloc_coherent (&ha->pcidev->dev, datasize, &ha->flash_busaddr,GFP_KERNEL ); -if (!ha->flash_data){ -printk (KERN_WARNING "Unable to allocate a flash buffer\n" ); +if (!ha->flash_data)return IPS_FAILURE ; - } ha->flash_datasize =0 ; ha->flash_len = datasize; }else
Signature · 1 line
2.26.0.106.g9fadedd
PATCH v2 12/20 scsi: ipr: remove unnecessary oom message
In reply to Zhen LeiFixes scripts/checkpatch.pl warning:
WARNING: Possible unnecessary 'out of memory' message
Remove it can help us save a bit of memory.
--- drivers/scsi/ipr.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/scsi/ipr.c +1 -4
@@ -4364,11 +4364,8 @@ static int ipr_alloc_dump(struct ipr_ioa_cfg *ioa_cfg)unsigned long lock_flags =0 ; dump =kzalloc (sizeof (struct ipr_dump ),GFP_KERNEL ); - -if (!dump) { -ipr_err ("Dump memory allocation failed\n" ); +if (!dump)return -ENOMEM ; - }if (ioa_cfg->sis64) ioa_data = vmalloc(array_size(IPR_FMT3_MAX_NUM_DUMP_PAGES,
Signature · 1 line
2.26.0.106.g9fadedd
PATCH v2 13/20 scsi: fnic: remove unnecessary oom message
In reply to Zhen LeiFixes scripts/checkpatch.pl warning:
WARNING: Possible unnecessary 'out of memory' message
Remove it can help us save a bit of memory.
--- drivers/scsi/fnic/fnic_trace.c | 2 -- drivers/scsi/fnic/vnic_rq.c | 4 +--- drivers/scsi/fnic/vnic_wq.c | 4 +--- 3 files changed, 2 insertions(+), 8 deletions(-)
drivers/scsi/fnic/fnic_trace.c +0 -2
@@ -481,8 +481,6 @@ int fnic_trace_buf_init(void) fnic_trace_buf_p = (unsigned long )vzalloc (trace_max_pages *PAGE_SIZE );if (!fnic_trace_buf_p) { - printk(KERN_ERR PFX "Failed to allocate memory " - "for fnic_trace_buf_p\n"); err = -ENOMEM ; goto err_fnic_trace_buf_init; }
drivers/scsi/fnic/vnic_rq.c +1 -3
@@ -32,10 +32,8 @@ static int vnic_rq_alloc_bufs(struct vnic_rq *rq)for (i =0 ; i < blks; i++) { rq->bufs[i] =kzalloc (VNIC_RQ_BUF_BLK_SZ ,GFP_ATOMIC ); -if (!rq->bufs[i]) { -printk (KERN_ERR "Failed to alloc rq_bufs\n" ); +if (!rq->bufs[i])return -ENOMEM ; - } }for (i =0 ; i < blks; i++) {
drivers/scsi/fnic/vnic_wq.c +1 -3
@@ -52,10 +52,8 @@ static int vnic_wq_alloc_bufs(struct vnic_wq *wq)for (i =0 ; i < blks; i++) { wq->bufs[i] =kzalloc (VNIC_WQ_BUF_BLK_SZ ,GFP_ATOMIC ); -if (!wq->bufs[i]) { -printk (KERN_ERR "Failed to alloc wq_bufs\n" ); +if (!wq->bufs[i])return -ENOMEM ; - } }for (i =0 ; i < blks; i++) {
Signature · 1 line
2.26.0.106.g9fadedd
PATCH v2 14/20 scsi: fcoe: remove unnecessary oom message
In reply to Zhen LeiFixes scripts/checkpatch.pl warning:
WARNING: Possible unnecessary 'out of memory' message
Remove it can help us save a bit of memory.
--- drivers/scsi/fcoe/fcoe_transport.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/scsi/fcoe/fcoe_transport.c +1 -3
@@ -639,10 +639,8 @@ static int fcoe_add_netdev_mapping(struct net_device *netdev,struct fcoe_netdev_mapping *nm; nm =kmalloc (sizeof (*nm),GFP_KERNEL ); -if (!nm) { -printk (KERN_ERR "Unable to allocate netdev_mapping" ); +if (!nm)return -ENOMEM ; - } nm->netdev = netdev; nm->ft = ft;
Signature · 1 line
2.26.0.106.g9fadedd
PATCH v2 15/20 scsi: libcxgbi: remove unnecessary oom message
In reply to Zhen LeiFixes scripts/checkpatch.pl warning:
WARNING: Possible unnecessary 'out of memory' message
Remove it can help us save a bit of memory.
--- drivers/scsi/cxgbi/libcxgbi.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/scsi/cxgbi/libcxgbi.c +3 -4
@@ -556,12 +556,11 @@ EXPORT_SYMBOL_GPL(cxgbi_sock_free_cpl_skbs);static struct cxgbi_sock *cxgbi_sock_create (struct cxgbi_device *cdev) { -struct cxgbi_sock *csk =kzalloc (sizeof (*csk),GFP_NOIO ); +struct cxgbi_sock *csk; -if (!csk) { -pr_info ("alloc csk %zu failed.\n" ,sizeof (*csk)); + csk =kzalloc (sizeof (*csk),GFP_NOIO ); +if (!csk)return NULL ; - }if (cdev->csk_alloc_cpls (csk) <0 ) {pr_info ("csk 0x%p, alloc cpls failed.\n" , csk);
Signature · 1 line
2.26.0.106.g9fadedd
PATCH v2 16/20 scsi: bnx2i: remove unnecessary oom message
In reply to Zhen LeiFixes scripts/checkpatch.pl warning:
WARNING: Possible unnecessary 'out of memory' message
Remove it can help us save a bit of memory.
--- drivers/scsi/bnx2i/bnx2i_iscsi.c | 2 -- 1 file changed, 2 deletions(-)
drivers/scsi/bnx2i/bnx2i_iscsi.c +0 -2
@@ -529,7 +529,6 @@ static int bnx2i_setup_mp_bdt(struct bnx2i_hba *hba) hba->mp_bd_tbl =dma_alloc_coherent (&hba->pcidev->dev,CNIC_PAGE_SIZE , &hba->mp_bd_dma,GFP_KERNEL );if (!hba->mp_bd_tbl) { -printk (KERN_ERR "unable to allocate Middle Path BDT\n" ); rc =-1 ; goto out; }
@@ -538,7 +537,6 @@ static int bnx2i_setup_mp_bdt(struct bnx2i_hba *hba)CNIC_PAGE_SIZE , &hba->dummy_buf_dma, GFP_KERNEL);if (!hba->dummy_buffer) { -printk (KERN_ERR "unable to alloc Middle Path Dummy Buffer\n" );dma_free_coherent (&hba->pcidev->dev,CNIC_PAGE_SIZE , hba->mp_bd_tbl, hba->mp_bd_dma); hba->mp_bd_tbl =NULL ;
Signature · 1 line
2.26.0.106.g9fadedd
PATCH v2 17/20 scsi: aic94xx: remove unnecessary oom message
In reply to Zhen LeiFixes scripts/checkpatch.pl warning:
WARNING: Possible unnecessary 'out of memory' message
Remove it can help us save a bit of memory.
--- drivers/scsi/aic94xx/aic94xx_init.c | 4 +--- drivers/scsi/aic94xx/aic94xx_sds.c | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-)
drivers/scsi/aic94xx/aic94xx_init.c +1 -3
@@ -725,10 +725,8 @@ 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 (sizeof (*asd_ha),GFP_KERNEL ); -if (!asd_ha) { -asd_printk ("out of memory\n" ); +if (!asd_ha) goto Err_put; - } asd_ha->pcidev = dev; asd_ha->sas_ha.dev = &asd_ha->pcidev->dev; asd_ha->sas_ha.lldd_ha = asd_ha;
drivers/scsi/aic94xx/aic94xx_sds.c +1 -3
@@ -342,10 +342,8 @@ int asd_read_ocm(struct asd_ha_struct *asd_ha)return -1 ; dir =kmalloc (sizeof (*dir),GFP_KERNEL ); -if (!dir) { -asd_printk ("no memory for ocm dir\n" ); +if (!dir)return -ENOMEM ; - } err =asd_read_ocm_dir (asd_ha, dir,0 );if (err)
Signature · 1 line
2.26.0.106.g9fadedd
PATCH v2 18/20 scsi: aacraid: remove unnecessary oom message
In reply to Zhen LeiFixes scripts/checkpatch.pl warning:
WARNING: Possible unnecessary 'out of memory' message
Remove it can help us save a bit of memory.
--- drivers/scsi/aacraid/comminit.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)
drivers/scsi/aacraid/comminit.c +2 -6
@@ -85,10 +85,8 @@ static int aac_alloc_comm(struct aac_dev *dev, void **commaddr, unsigned long co printfbufsiz + host_rrq_size; base =dma_alloc_coherent (&dev->pdev->dev, size, &phys,GFP_KERNEL ); -if (base ==NULL ) { -printk (KERN_ERR "aacraid: unable to create mapping.\n" ); +if (!base)return 0 ; - } dev->comm_addr = (void *)base; dev->comm_phys = phys;
@@ -635,10 +633,8 @@ struct aac_dev *aac_init_adapter(struct aac_dev *dev)*/ dev->queues =kzalloc (sizeof (struct aac_queue_block ),GFP_KERNEL ); -if (dev->queues ==NULL ) { -printk (KERN_ERR "Error could not allocate comm region.\n" ); +if (!dev->queues)return NULL ; - }if (aac_comm_init (dev)<0 ){kfree (dev->queues);
Signature · 1 line
2.26.0.106.g9fadedd
PATCH v2 19/20 scsi: a100u2w: remove unnecessary oom message
In reply to Zhen LeiFixes scripts/checkpatch.pl warning:
WARNING: Possible unnecessary 'out of memory' message
Remove it can help us save a bit of memory.
--- drivers/scsi/a100u2w.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)
drivers/scsi/a100u2w.c +2 -6
@@ -1123,19 +1123,15 @@ static int inia100_probe_one(struct pci_dev *pdev, sz =ORC_MAXQUEUE *sizeof (struct orc_scb ); host->scb_virt =dma_alloc_coherent (&pdev->dev, sz, &host->scb_phys,GFP_KERNEL ); -if (!host->scb_virt) { -printk ("inia100: SCB memory allocation error\n" ); +if (!host->scb_virt) goto out_host_put; - }/* Get total memory needed for ESCB */ sz =ORC_MAXQUEUE *sizeof (struct orc_extended_scb ); host->escb_virt =dma_alloc_coherent (&pdev->dev, sz, &host->escb_phys,GFP_KERNEL ); -if (!host->escb_virt) { -printk ("inia100: ESCB memory allocation error\n" ); +if (!host->escb_virt) goto out_free_scb_array; - }if (init_orchid (host)) {/* Initialize orchid chip */ printk ("inia100: initial orchid fail!!\n" );
Signature · 1 line
2.26.0.106.g9fadedd
PATCH v2 20/20 scsi: 3w-xxx: remove unnecessary oom message
In reply to Zhen LeiFixes scripts/checkpatch.pl warning:
WARNING: Possible unnecessary 'out of memory' message
Remove it can help us save a bit of memory.
--- drivers/scsi/3w-xxxx.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/scsi/3w-xxxx.c +1 -3
@@ -836,10 +836,8 @@ static int tw_allocate_memory(TW_Device_Extension *tw_dev, int size, int which) cpu_addr =dma_alloc_coherent (&tw_dev->tw_pci_dev->dev, size *TW_Q_LENGTH , &dma_handle,GFP_KERNEL ); -if (cpu_addr ==NULL ) { -printk (KERN_WARNING "3w-xxxx: dma_alloc_coherent() failed.\n" ); +if (!cpu_addr)return 1 ; - }if ((unsigned long )cpu_addr % (tw_dev->tw_pci_dev->device ==TW_DEVICE_ID ?TW_ALIGNMENT_6000 :TW_ALIGNMENT_7000 )) {printk (KERN_WARNING "3w-xxxx: Couldn't allocate correctly aligned memory.\n" );
Signature · 1 line
2.26.0.106.g9fadedd