All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 00/20] scsi: remove unnecessary oom message
@ 2021-06-16  6:36 Zhen Lei
  2021-06-16  6:36 ` [PATCH v2 01/20] scsi: zorro_esp: " Zhen Lei
                   ` (19 more replies)
  0 siblings, 20 replies; 21+ messages in thread
From: Zhen Lei @ 2021-06-16  6:36 UTC (permalink / raw)
  To: Vishal Bhakta, VMware PV-Drivers, Karan Tilak Kumar,
	Sesidhar Baddela, Nilesh Javali, GR-QLogic-Storage-Upstream,
	Adaptec OEM Raid Solutions, Brian King, Satish Kharat,
	Hannes Reinecke, Manish Rangankar, Adam Radford,
	James E . J . Bottomley, Martin K . Petersen, linux-scsi
  Cc: Zhen Lei

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(-)

-- 
2.26.0.106.g9fadedd



^ permalink raw reply	[flat|nested] 21+ messages in thread

* [PATCH v2 01/20] scsi: zorro_esp: remove unnecessary oom message
  2021-06-16  6:36 [PATCH v2 00/20] scsi: remove unnecessary oom message Zhen Lei
@ 2021-06-16  6:36 ` Zhen Lei
  2021-06-16  6:36 ` [PATCH v2 02/20] scsi: zorro7xx: " Zhen Lei
                   ` (18 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Zhen Lei @ 2021-06-16  6:36 UTC (permalink / raw)
  To: Vishal Bhakta, VMware PV-Drivers, Karan Tilak Kumar,
	Sesidhar Baddela, Nilesh Javali, GR-QLogic-Storage-Upstream,
	Adaptec OEM Raid Solutions, Brian King, Satish Kharat,
	Hannes Reinecke, Manish Rangankar, Adam Radford,
	James E . J . Bottomley, Martin K . Petersen, linux-scsi
  Cc: Zhen Lei

Fixes scripts/checkpatch.pl warning:
WARNING: Possible unnecessary 'out of memory' message

Remove it can help us save a bit of memory.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
---
 drivers/scsi/zorro_esp.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/scsi/zorro_esp.c b/drivers/scsi/zorro_esp.c
index 928c8adf5cb33f4..b03870b4d8dcaaf 100644
--- a/drivers/scsi/zorro_esp.c
+++ b/drivers/scsi/zorro_esp.c
@@ -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) {
-- 
2.26.0.106.g9fadedd



^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH v2 02/20] scsi: zorro7xx: remove unnecessary oom message
  2021-06-16  6:36 [PATCH v2 00/20] scsi: remove unnecessary oom message Zhen Lei
  2021-06-16  6:36 ` [PATCH v2 01/20] scsi: zorro_esp: " Zhen Lei
@ 2021-06-16  6:36 ` Zhen Lei
  2021-06-16  6:36 ` [PATCH v2 03/20] scsi: bvme6000: " Zhen Lei
                   ` (17 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Zhen Lei @ 2021-06-16  6:36 UTC (permalink / raw)
  To: Vishal Bhakta, VMware PV-Drivers, Karan Tilak Kumar,
	Sesidhar Baddela, Nilesh Javali, GR-QLogic-Storage-Upstream,
	Adaptec OEM Raid Solutions, Brian King, Satish Kharat,
	Hannes Reinecke, Manish Rangankar, Adam Radford,
	James E . J . Bottomley, Martin K . Petersen, linux-scsi
  Cc: Zhen Lei

Fixes scripts/checkpatch.pl warning:
WARNING: Possible unnecessary 'out of memory' message

Remove it can help us save a bit of memory.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
---
 drivers/scsi/zorro7xx.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/scsi/zorro7xx.c b/drivers/scsi/zorro7xx.c
index 27b9e2baab1a61c..1ecbb603897a27f 100644
--- a/drivers/scsi/zorro7xx.c
+++ b/drivers/scsi/zorro7xx.c
@@ -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)
-- 
2.26.0.106.g9fadedd



^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH v2 03/20] scsi: bvme6000: remove unnecessary oom message
  2021-06-16  6:36 [PATCH v2 00/20] scsi: remove unnecessary oom message Zhen Lei
  2021-06-16  6:36 ` [PATCH v2 01/20] scsi: zorro_esp: " Zhen Lei
  2021-06-16  6:36 ` [PATCH v2 02/20] scsi: zorro7xx: " Zhen Lei
@ 2021-06-16  6:36 ` Zhen Lei
  2021-06-16  6:36 ` [PATCH v2 04/20] scsi: vmw_pvscsi: " Zhen Lei
                   ` (16 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Zhen Lei @ 2021-06-16  6:36 UTC (permalink / raw)
  To: Vishal Bhakta, VMware PV-Drivers, Karan Tilak Kumar,
	Sesidhar Baddela, Nilesh Javali, GR-QLogic-Storage-Upstream,
	Adaptec OEM Raid Solutions, Brian King, Satish Kharat,
	Hannes Reinecke, Manish Rangankar, Adam Radford,
	James E . J . Bottomley, Martin K . Petersen, linux-scsi
  Cc: Zhen Lei

Fixes scripts/checkpatch.pl warning:
WARNING: Possible unnecessary 'out of memory' message

Remove it can help us save a bit of memory.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
---
 drivers/scsi/bvme6000_scsi.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/scsi/bvme6000_scsi.c b/drivers/scsi/bvme6000_scsi.c
index 8d72b25535c5e72..fec971bc9a7d7c7 100644
--- a/drivers/scsi/bvme6000_scsi.c
+++ b/drivers/scsi/bvme6000_scsi.c
@@ -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;
-- 
2.26.0.106.g9fadedd



^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH v2 04/20] scsi: vmw_pvscsi: remove unnecessary oom message
  2021-06-16  6:36 [PATCH v2 00/20] scsi: remove unnecessary oom message Zhen Lei
                   ` (2 preceding siblings ...)
  2021-06-16  6:36 ` [PATCH v2 03/20] scsi: bvme6000: " Zhen Lei
@ 2021-06-16  6:36 ` Zhen Lei
  2021-06-16  6:36 ` [PATCH v2 05/20] snic: " Zhen Lei
                   ` (15 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Zhen Lei @ 2021-06-16  6:36 UTC (permalink / raw)
  To: Vishal Bhakta, VMware PV-Drivers, Karan Tilak Kumar,
	Sesidhar Baddela, Nilesh Javali, GR-QLogic-Storage-Upstream,
	Adaptec OEM Raid Solutions, Brian King, Satish Kharat,
	Hannes Reinecke, Manish Rangankar, Adam Radford,
	James E . J . Bottomley, Martin K . Petersen, linux-scsi
  Cc: Zhen Lei

Fixes scripts/checkpatch.pl warning:
WARNING: Possible unnecessary 'out of memory' message

Remove it can help us save a bit of memory.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
---
 drivers/scsi/vmw_pvscsi.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/scsi/vmw_pvscsi.c b/drivers/scsi/vmw_pvscsi.c
index ce1ba1b936298c7..78102969e9fe692 100644
--- a/drivers/scsi/vmw_pvscsi.c
+++ b/drivers/scsi/vmw_pvscsi.c
@@ -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;
 	}
-- 
2.26.0.106.g9fadedd



^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH v2 05/20] snic: remove unnecessary oom message
  2021-06-16  6:36 [PATCH v2 00/20] scsi: remove unnecessary oom message Zhen Lei
                   ` (3 preceding siblings ...)
  2021-06-16  6:36 ` [PATCH v2 04/20] scsi: vmw_pvscsi: " Zhen Lei
@ 2021-06-16  6:36 ` Zhen Lei
  2021-06-16  6:37 ` [PATCH v2 06/20] scsi: devinfo: " Zhen Lei
                   ` (14 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Zhen Lei @ 2021-06-16  6:36 UTC (permalink / raw)
  To: Vishal Bhakta, VMware PV-Drivers, Karan Tilak Kumar,
	Sesidhar Baddela, Nilesh Javali, GR-QLogic-Storage-Upstream,
	Adaptec OEM Raid Solutions, Brian King, Satish Kharat,
	Hannes Reinecke, Manish Rangankar, Adam Radford,
	James E . J . Bottomley, Martin K . Petersen, linux-scsi
  Cc: Zhen Lei

Fixes scripts/checkpatch.pl warning:
WARNING: Possible unnecessary 'out of memory' message

Remove it can help us save a bit of memory.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
---
 drivers/scsi/snic/vnic_wq.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/scsi/snic/vnic_wq.c b/drivers/scsi/snic/vnic_wq.c
index 1e91d432089e805..bcf05057861e1fc 100644
--- a/drivers/scsi/snic/vnic_wq.c
+++ b/drivers/scsi/snic/vnic_wq.c
@@ -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++) {
-- 
2.26.0.106.g9fadedd



^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH v2 06/20] scsi: devinfo: remove unnecessary oom message
  2021-06-16  6:36 [PATCH v2 00/20] scsi: remove unnecessary oom message Zhen Lei
                   ` (4 preceding siblings ...)
  2021-06-16  6:36 ` [PATCH v2 05/20] snic: " Zhen Lei
@ 2021-06-16  6:37 ` Zhen Lei
  2021-06-16  6:37 ` [PATCH v2 07/20] scsi: tcm_qla2xxx: " Zhen Lei
                   ` (13 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Zhen Lei @ 2021-06-16  6:37 UTC (permalink / raw)
  To: Vishal Bhakta, VMware PV-Drivers, Karan Tilak Kumar,
	Sesidhar Baddela, Nilesh Javali, GR-QLogic-Storage-Upstream,
	Adaptec OEM Raid Solutions, Brian King, Satish Kharat,
	Hannes Reinecke, Manish Rangankar, Adam Radford,
	James E . J . Bottomley, Martin K . Petersen, linux-scsi
  Cc: Zhen Lei

Fixes scripts/checkpatch.pl warning:
WARNING: Possible unnecessary 'out of memory' message

Remove it can help us save a bit of memory.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
---
 drivers/scsi/scsi_devinfo.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/scsi/scsi_devinfo.c b/drivers/scsi/scsi_devinfo.c
index d33355ab6e14505..a8adbbbfddba44b 100644
--- a/drivers/scsi/scsi_devinfo.c
+++ b/drivers/scsi/scsi_devinfo.c
@@ -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);
-- 
2.26.0.106.g9fadedd



^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH v2 07/20] scsi: tcm_qla2xxx: remove unnecessary oom message
  2021-06-16  6:36 [PATCH v2 00/20] scsi: remove unnecessary oom message Zhen Lei
                   ` (5 preceding siblings ...)
  2021-06-16  6:37 ` [PATCH v2 06/20] scsi: devinfo: " Zhen Lei
@ 2021-06-16  6:37 ` Zhen Lei
  2021-06-16  6:37 ` [PATCH v2 08/20] scsi: pmcraid: " Zhen Lei
                   ` (12 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Zhen Lei @ 2021-06-16  6:37 UTC (permalink / raw)
  To: Vishal Bhakta, VMware PV-Drivers, Karan Tilak Kumar,
	Sesidhar Baddela, Nilesh Javali, GR-QLogic-Storage-Upstream,
	Adaptec OEM Raid Solutions, Brian King, Satish Kharat,
	Hannes Reinecke, Manish Rangankar, Adam Radford,
	James E . J . Bottomley, Martin K . Petersen, linux-scsi
  Cc: Zhen Lei

Fixes scripts/checkpatch.pl warning:
WARNING: Possible unnecessary 'out of memory' message

Remove it can help us save a bit of memory.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
---
 drivers/scsi/qla2xxx/tcm_qla2xxx.c | 16 ++++------------
 1 file changed, 4 insertions(+), 12 deletions(-)

diff --git a/drivers/scsi/qla2xxx/tcm_qla2xxx.c b/drivers/scsi/qla2xxx/tcm_qla2xxx.c
index 03de1bcf1461d77..d537a7bc27f08b0 100644
--- a/drivers/scsi/qla2xxx/tcm_qla2xxx.c
+++ b/drivers/scsi/qla2xxx/tcm_qla2xxx.c
@@ -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);
-- 
2.26.0.106.g9fadedd



^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH v2 08/20] scsi: pmcraid: remove unnecessary oom message
  2021-06-16  6:36 [PATCH v2 00/20] scsi: remove unnecessary oom message Zhen Lei
                   ` (6 preceding siblings ...)
  2021-06-16  6:37 ` [PATCH v2 07/20] scsi: tcm_qla2xxx: " Zhen Lei
@ 2021-06-16  6:37 ` Zhen Lei
  2021-06-16  6:37 ` [PATCH v2 09/20] scsi: mvme16x: " Zhen Lei
                   ` (11 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Zhen Lei @ 2021-06-16  6:37 UTC (permalink / raw)
  To: Vishal Bhakta, VMware PV-Drivers, Karan Tilak Kumar,
	Sesidhar Baddela, Nilesh Javali, GR-QLogic-Storage-Upstream,
	Adaptec OEM Raid Solutions, Brian King, Satish Kharat,
	Hannes Reinecke, Manish Rangankar, Adam Radford,
	James E . J . Bottomley, Martin K . Petersen, linux-scsi
  Cc: Zhen Lei

Fixes scripts/checkpatch.pl warning:
WARNING: Possible unnecessary 'out of memory' message

Remove it can help us save a bit of memory.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
---
 drivers/scsi/pmcraid.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/drivers/scsi/pmcraid.c b/drivers/scsi/pmcraid.c
index bffd9a9349e7245..4754e72babc82cf 100644
--- a/drivers/scsi/pmcraid.c
+++ b/drivers/scsi/pmcraid.c
@@ -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);
 
-- 
2.26.0.106.g9fadedd



^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH v2 09/20] scsi: mvme16x: remove unnecessary oom message
  2021-06-16  6:36 [PATCH v2 00/20] scsi: remove unnecessary oom message Zhen Lei
                   ` (7 preceding siblings ...)
  2021-06-16  6:37 ` [PATCH v2 08/20] scsi: pmcraid: " Zhen Lei
@ 2021-06-16  6:37 ` Zhen Lei
  2021-06-16  6:37 ` [PATCH v2 10/20] scsi: libsas: " Zhen Lei
                   ` (10 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Zhen Lei @ 2021-06-16  6:37 UTC (permalink / raw)
  To: Vishal Bhakta, VMware PV-Drivers, Karan Tilak Kumar,
	Sesidhar Baddela, Nilesh Javali, GR-QLogic-Storage-Upstream,
	Adaptec OEM Raid Solutions, Brian King, Satish Kharat,
	Hannes Reinecke, Manish Rangankar, Adam Radford,
	James E . J . Bottomley, Martin K . Petersen, linux-scsi
  Cc: Zhen Lei

Fixes scripts/checkpatch.pl warning:
WARNING: Possible unnecessary 'out of memory' message

Remove it can help us save a bit of memory.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
---
 drivers/scsi/mvme16x_scsi.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/scsi/mvme16x_scsi.c b/drivers/scsi/mvme16x_scsi.c
index 21d638299ab8e56..5c2f5aa572d5677 100644
--- a/drivers/scsi/mvme16x_scsi.c
+++ b/drivers/scsi/mvme16x_scsi.c
@@ -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;
-- 
2.26.0.106.g9fadedd



^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH v2 10/20] scsi: libsas: remove unnecessary oom message
  2021-06-16  6:36 [PATCH v2 00/20] scsi: remove unnecessary oom message Zhen Lei
                   ` (8 preceding siblings ...)
  2021-06-16  6:37 ` [PATCH v2 09/20] scsi: mvme16x: " Zhen Lei
@ 2021-06-16  6:37 ` Zhen Lei
  2021-06-16  6:37 ` [PATCH v2 11/20] scsi: ips: " Zhen Lei
                   ` (9 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Zhen Lei @ 2021-06-16  6:37 UTC (permalink / raw)
  To: Vishal Bhakta, VMware PV-Drivers, Karan Tilak Kumar,
	Sesidhar Baddela, Nilesh Javali, GR-QLogic-Storage-Upstream,
	Adaptec OEM Raid Solutions, Brian King, Satish Kharat,
	Hannes Reinecke, Manish Rangankar, Adam Radford,
	James E . J . Bottomley, Martin K . Petersen, linux-scsi
  Cc: Zhen Lei

Fixes scripts/checkpatch.pl warning:
WARNING: Possible unnecessary 'out of memory' message

Remove it can help us save a bit of memory.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
---
 drivers/scsi/libsas/sas_ata.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/scsi/libsas/sas_ata.c b/drivers/scsi/libsas/sas_ata.c
index 4aa1fda95f35dd4..a1c7e2c42c5c378 100644
--- a/drivers/scsi/libsas/sas_ata.c
+++ b/drivers/scsi/libsas/sas_ata.c
@@ -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);
 
-- 
2.26.0.106.g9fadedd



^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH v2 11/20] scsi: ips: remove unnecessary oom message
  2021-06-16  6:36 [PATCH v2 00/20] scsi: remove unnecessary oom message Zhen Lei
                   ` (9 preceding siblings ...)
  2021-06-16  6:37 ` [PATCH v2 10/20] scsi: libsas: " Zhen Lei
@ 2021-06-16  6:37 ` Zhen Lei
  2021-06-16  6:37 ` [PATCH v2 12/20] scsi: ipr: " Zhen Lei
                   ` (8 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Zhen Lei @ 2021-06-16  6:37 UTC (permalink / raw)
  To: Vishal Bhakta, VMware PV-Drivers, Karan Tilak Kumar,
	Sesidhar Baddela, Nilesh Javali, GR-QLogic-Storage-Upstream,
	Adaptec OEM Raid Solutions, Brian King, Satish Kharat,
	Hannes Reinecke, Manish Rangankar, Adam Radford,
	James E . J . Bottomley, Martin K . Petersen, linux-scsi
  Cc: Zhen Lei

Fixes scripts/checkpatch.pl warning:
WARNING: Possible unnecessary 'out of memory' message

Remove it can help us save a bit of memory.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
---
 drivers/scsi/ips.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/scsi/ips.c b/drivers/scsi/ips.c
index bc33d54a40112a1..5a242247b8b52d7 100644
--- a/drivers/scsi/ips.c
+++ b/drivers/scsi/ips.c
@@ -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
-- 
2.26.0.106.g9fadedd



^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH v2 12/20] scsi: ipr: remove unnecessary oom message
  2021-06-16  6:36 [PATCH v2 00/20] scsi: remove unnecessary oom message Zhen Lei
                   ` (10 preceding siblings ...)
  2021-06-16  6:37 ` [PATCH v2 11/20] scsi: ips: " Zhen Lei
@ 2021-06-16  6:37 ` Zhen Lei
  2021-06-16  6:37 ` [PATCH v2 13/20] scsi: fnic: " Zhen Lei
                   ` (7 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Zhen Lei @ 2021-06-16  6:37 UTC (permalink / raw)
  To: Vishal Bhakta, VMware PV-Drivers, Karan Tilak Kumar,
	Sesidhar Baddela, Nilesh Javali, GR-QLogic-Storage-Upstream,
	Adaptec OEM Raid Solutions, Brian King, Satish Kharat,
	Hannes Reinecke, Manish Rangankar, Adam Radford,
	James E . J . Bottomley, Martin K . Petersen, linux-scsi
  Cc: Zhen Lei

Fixes scripts/checkpatch.pl warning:
WARNING: Possible unnecessary 'out of memory' message

Remove it can help us save a bit of memory.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
---
 drivers/scsi/ipr.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c
index 30c30a1db5b1aa0..b99f55e9897af1b 100644
--- a/drivers/scsi/ipr.c
+++ b/drivers/scsi/ipr.c
@@ -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,
-- 
2.26.0.106.g9fadedd



^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH v2 13/20] scsi: fnic: remove unnecessary oom message
  2021-06-16  6:36 [PATCH v2 00/20] scsi: remove unnecessary oom message Zhen Lei
                   ` (11 preceding siblings ...)
  2021-06-16  6:37 ` [PATCH v2 12/20] scsi: ipr: " Zhen Lei
@ 2021-06-16  6:37 ` Zhen Lei
  2021-06-16  6:37 ` [PATCH v2 14/20] scsi: fcoe: " Zhen Lei
                   ` (6 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Zhen Lei @ 2021-06-16  6:37 UTC (permalink / raw)
  To: Vishal Bhakta, VMware PV-Drivers, Karan Tilak Kumar,
	Sesidhar Baddela, Nilesh Javali, GR-QLogic-Storage-Upstream,
	Adaptec OEM Raid Solutions, Brian King, Satish Kharat,
	Hannes Reinecke, Manish Rangankar, Adam Radford,
	James E . J . Bottomley, Martin K . Petersen, linux-scsi
  Cc: Zhen Lei

Fixes scripts/checkpatch.pl warning:
WARNING: Possible unnecessary 'out of memory' message

Remove it can help us save a bit of memory.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
---
 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(-)

diff --git a/drivers/scsi/fnic/fnic_trace.c b/drivers/scsi/fnic/fnic_trace.c
index 4a7536bb0ab3874..34aac0253901a99 100644
--- a/drivers/scsi/fnic/fnic_trace.c
+++ b/drivers/scsi/fnic/fnic_trace.c
@@ -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;
 	}
diff --git a/drivers/scsi/fnic/vnic_rq.c b/drivers/scsi/fnic/vnic_rq.c
index 6a35b1be00322db..9c341cc50e119d3 100644
--- a/drivers/scsi/fnic/vnic_rq.c
+++ b/drivers/scsi/fnic/vnic_rq.c
@@ -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++) {
diff --git a/drivers/scsi/fnic/vnic_wq.c b/drivers/scsi/fnic/vnic_wq.c
index 442972c04e65d39..da1c775410cb0f9 100644
--- a/drivers/scsi/fnic/vnic_wq.c
+++ b/drivers/scsi/fnic/vnic_wq.c
@@ -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++) {
-- 
2.26.0.106.g9fadedd



^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH v2 14/20] scsi: fcoe: remove unnecessary oom message
  2021-06-16  6:36 [PATCH v2 00/20] scsi: remove unnecessary oom message Zhen Lei
                   ` (12 preceding siblings ...)
  2021-06-16  6:37 ` [PATCH v2 13/20] scsi: fnic: " Zhen Lei
@ 2021-06-16  6:37 ` Zhen Lei
  2021-06-16  6:37 ` [PATCH v2 15/20] scsi: libcxgbi: " Zhen Lei
                   ` (5 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Zhen Lei @ 2021-06-16  6:37 UTC (permalink / raw)
  To: Vishal Bhakta, VMware PV-Drivers, Karan Tilak Kumar,
	Sesidhar Baddela, Nilesh Javali, GR-QLogic-Storage-Upstream,
	Adaptec OEM Raid Solutions, Brian King, Satish Kharat,
	Hannes Reinecke, Manish Rangankar, Adam Radford,
	James E . J . Bottomley, Martin K . Petersen, linux-scsi
  Cc: Zhen Lei

Fixes scripts/checkpatch.pl warning:
WARNING: Possible unnecessary 'out of memory' message

Remove it can help us save a bit of memory.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
---
 drivers/scsi/fcoe/fcoe_transport.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/scsi/fcoe/fcoe_transport.c b/drivers/scsi/fcoe/fcoe_transport.c
index 4d0e19e7c84b91a..815915734d88d43 100644
--- a/drivers/scsi/fcoe/fcoe_transport.c
+++ b/drivers/scsi/fcoe/fcoe_transport.c
@@ -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;
-- 
2.26.0.106.g9fadedd



^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH v2 15/20] scsi: libcxgbi: remove unnecessary oom message
  2021-06-16  6:36 [PATCH v2 00/20] scsi: remove unnecessary oom message Zhen Lei
                   ` (13 preceding siblings ...)
  2021-06-16  6:37 ` [PATCH v2 14/20] scsi: fcoe: " Zhen Lei
@ 2021-06-16  6:37 ` Zhen Lei
  2021-06-16  6:37 ` [PATCH v2 16/20] scsi: bnx2i: " Zhen Lei
                   ` (4 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Zhen Lei @ 2021-06-16  6:37 UTC (permalink / raw)
  To: Vishal Bhakta, VMware PV-Drivers, Karan Tilak Kumar,
	Sesidhar Baddela, Nilesh Javali, GR-QLogic-Storage-Upstream,
	Adaptec OEM Raid Solutions, Brian King, Satish Kharat,
	Hannes Reinecke, Manish Rangankar, Adam Radford,
	James E . J . Bottomley, Martin K . Petersen, linux-scsi
  Cc: Zhen Lei

Fixes scripts/checkpatch.pl warning:
WARNING: Possible unnecessary 'out of memory' message

Remove it can help us save a bit of memory.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
---
 drivers/scsi/cxgbi/libcxgbi.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/scsi/cxgbi/libcxgbi.c b/drivers/scsi/cxgbi/libcxgbi.c
index 8c7d4dda4cf2994..df370fb5dd86f96 100644
--- a/drivers/scsi/cxgbi/libcxgbi.c
+++ b/drivers/scsi/cxgbi/libcxgbi.c
@@ -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);
-- 
2.26.0.106.g9fadedd



^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH v2 16/20] scsi: bnx2i: remove unnecessary oom message
  2021-06-16  6:36 [PATCH v2 00/20] scsi: remove unnecessary oom message Zhen Lei
                   ` (14 preceding siblings ...)
  2021-06-16  6:37 ` [PATCH v2 15/20] scsi: libcxgbi: " Zhen Lei
@ 2021-06-16  6:37 ` Zhen Lei
  2021-06-16  6:37 ` [PATCH v2 17/20] scsi: aic94xx: " Zhen Lei
                   ` (3 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Zhen Lei @ 2021-06-16  6:37 UTC (permalink / raw)
  To: Vishal Bhakta, VMware PV-Drivers, Karan Tilak Kumar,
	Sesidhar Baddela, Nilesh Javali, GR-QLogic-Storage-Upstream,
	Adaptec OEM Raid Solutions, Brian King, Satish Kharat,
	Hannes Reinecke, Manish Rangankar, Adam Radford,
	James E . J . Bottomley, Martin K . Petersen, linux-scsi
  Cc: Zhen Lei

Fixes scripts/checkpatch.pl warning:
WARNING: Possible unnecessary 'out of memory' message

Remove it can help us save a bit of memory.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
---
 drivers/scsi/bnx2i/bnx2i_iscsi.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/scsi/bnx2i/bnx2i_iscsi.c b/drivers/scsi/bnx2i/bnx2i_iscsi.c
index 1b5f3e143f0710b..a66ca1ebba15f01 100644
--- a/drivers/scsi/bnx2i/bnx2i_iscsi.c
+++ b/drivers/scsi/bnx2i/bnx2i_iscsi.c
@@ -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;
-- 
2.26.0.106.g9fadedd



^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH v2 17/20] scsi: aic94xx: remove unnecessary oom message
  2021-06-16  6:36 [PATCH v2 00/20] scsi: remove unnecessary oom message Zhen Lei
                   ` (15 preceding siblings ...)
  2021-06-16  6:37 ` [PATCH v2 16/20] scsi: bnx2i: " Zhen Lei
@ 2021-06-16  6:37 ` Zhen Lei
  2021-06-16  6:37 ` [PATCH v2 18/20] scsi: aacraid: " Zhen Lei
                   ` (2 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Zhen Lei @ 2021-06-16  6:37 UTC (permalink / raw)
  To: Vishal Bhakta, VMware PV-Drivers, Karan Tilak Kumar,
	Sesidhar Baddela, Nilesh Javali, GR-QLogic-Storage-Upstream,
	Adaptec OEM Raid Solutions, Brian King, Satish Kharat,
	Hannes Reinecke, Manish Rangankar, Adam Radford,
	James E . J . Bottomley, Martin K . Petersen, linux-scsi
  Cc: Zhen Lei

Fixes scripts/checkpatch.pl warning:
WARNING: Possible unnecessary 'out of memory' message

Remove it can help us save a bit of memory.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
---
 drivers/scsi/aic94xx/aic94xx_init.c | 4 +---
 drivers/scsi/aic94xx/aic94xx_sds.c  | 4 +---
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/scsi/aic94xx/aic94xx_init.c b/drivers/scsi/aic94xx/aic94xx_init.c
index a195bfe9eccc073..9edd6008bbdec03 100644
--- a/drivers/scsi/aic94xx/aic94xx_init.c
+++ b/drivers/scsi/aic94xx/aic94xx_init.c
@@ -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;
diff --git a/drivers/scsi/aic94xx/aic94xx_sds.c b/drivers/scsi/aic94xx/aic94xx_sds.c
index 297a66770260ccf..1b46f0018e0bfe5 100644
--- a/drivers/scsi/aic94xx/aic94xx_sds.c
+++ b/drivers/scsi/aic94xx/aic94xx_sds.c
@@ -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)
-- 
2.26.0.106.g9fadedd



^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH v2 18/20] scsi: aacraid: remove unnecessary oom message
  2021-06-16  6:36 [PATCH v2 00/20] scsi: remove unnecessary oom message Zhen Lei
                   ` (16 preceding siblings ...)
  2021-06-16  6:37 ` [PATCH v2 17/20] scsi: aic94xx: " Zhen Lei
@ 2021-06-16  6:37 ` Zhen Lei
  2021-06-16  6:37 ` [PATCH v2 19/20] scsi: a100u2w: " Zhen Lei
  2021-06-16  6:37 ` [PATCH v2 20/20] scsi: 3w-xxx: " Zhen Lei
  19 siblings, 0 replies; 21+ messages in thread
From: Zhen Lei @ 2021-06-16  6:37 UTC (permalink / raw)
  To: Vishal Bhakta, VMware PV-Drivers, Karan Tilak Kumar,
	Sesidhar Baddela, Nilesh Javali, GR-QLogic-Storage-Upstream,
	Adaptec OEM Raid Solutions, Brian King, Satish Kharat,
	Hannes Reinecke, Manish Rangankar, Adam Radford,
	James E . J . Bottomley, Martin K . Petersen, linux-scsi
  Cc: Zhen Lei

Fixes scripts/checkpatch.pl warning:
WARNING: Possible unnecessary 'out of memory' message

Remove it can help us save a bit of memory.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
---
 drivers/scsi/aacraid/comminit.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/scsi/aacraid/comminit.c b/drivers/scsi/aacraid/comminit.c
index 355b16f0b1456bd..282519ccd4a22da 100644
--- a/drivers/scsi/aacraid/comminit.c
+++ b/drivers/scsi/aacraid/comminit.c
@@ -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);
-- 
2.26.0.106.g9fadedd



^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH v2 19/20] scsi: a100u2w: remove unnecessary oom message
  2021-06-16  6:36 [PATCH v2 00/20] scsi: remove unnecessary oom message Zhen Lei
                   ` (17 preceding siblings ...)
  2021-06-16  6:37 ` [PATCH v2 18/20] scsi: aacraid: " Zhen Lei
@ 2021-06-16  6:37 ` Zhen Lei
  2021-06-16  6:37 ` [PATCH v2 20/20] scsi: 3w-xxx: " Zhen Lei
  19 siblings, 0 replies; 21+ messages in thread
From: Zhen Lei @ 2021-06-16  6:37 UTC (permalink / raw)
  To: Vishal Bhakta, VMware PV-Drivers, Karan Tilak Kumar,
	Sesidhar Baddela, Nilesh Javali, GR-QLogic-Storage-Upstream,
	Adaptec OEM Raid Solutions, Brian King, Satish Kharat,
	Hannes Reinecke, Manish Rangankar, Adam Radford,
	James E . J . Bottomley, Martin K . Petersen, linux-scsi
  Cc: Zhen Lei

Fixes scripts/checkpatch.pl warning:
WARNING: Possible unnecessary 'out of memory' message

Remove it can help us save a bit of memory.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
---
 drivers/scsi/a100u2w.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/scsi/a100u2w.c b/drivers/scsi/a100u2w.c
index 028af6b1057c606..7bcb8889c085e0a 100644
--- a/drivers/scsi/a100u2w.c
+++ b/drivers/scsi/a100u2w.c
@@ -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");
-- 
2.26.0.106.g9fadedd



^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH v2 20/20] scsi: 3w-xxx: remove unnecessary oom message
  2021-06-16  6:36 [PATCH v2 00/20] scsi: remove unnecessary oom message Zhen Lei
                   ` (18 preceding siblings ...)
  2021-06-16  6:37 ` [PATCH v2 19/20] scsi: a100u2w: " Zhen Lei
@ 2021-06-16  6:37 ` Zhen Lei
  19 siblings, 0 replies; 21+ messages in thread
From: Zhen Lei @ 2021-06-16  6:37 UTC (permalink / raw)
  To: Vishal Bhakta, VMware PV-Drivers, Karan Tilak Kumar,
	Sesidhar Baddela, Nilesh Javali, GR-QLogic-Storage-Upstream,
	Adaptec OEM Raid Solutions, Brian King, Satish Kharat,
	Hannes Reinecke, Manish Rangankar, Adam Radford,
	James E . J . Bottomley, Martin K . Petersen, linux-scsi
  Cc: Zhen Lei

Fixes scripts/checkpatch.pl warning:
WARNING: Possible unnecessary 'out of memory' message

Remove it can help us save a bit of memory.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
---
 drivers/scsi/3w-xxxx.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/scsi/3w-xxxx.c b/drivers/scsi/3w-xxxx.c
index 4ee485ab2714845..a7eb50d2592ea1a 100644
--- a/drivers/scsi/3w-xxxx.c
+++ b/drivers/scsi/3w-xxxx.c
@@ -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");
-- 
2.26.0.106.g9fadedd



^ permalink raw reply related	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2021-06-16  6:38 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-16  6:36 [PATCH v2 00/20] scsi: remove unnecessary oom message Zhen Lei
2021-06-16  6:36 ` [PATCH v2 01/20] scsi: zorro_esp: " Zhen Lei
2021-06-16  6:36 ` [PATCH v2 02/20] scsi: zorro7xx: " Zhen Lei
2021-06-16  6:36 ` [PATCH v2 03/20] scsi: bvme6000: " Zhen Lei
2021-06-16  6:36 ` [PATCH v2 04/20] scsi: vmw_pvscsi: " Zhen Lei
2021-06-16  6:36 ` [PATCH v2 05/20] snic: " Zhen Lei
2021-06-16  6:37 ` [PATCH v2 06/20] scsi: devinfo: " Zhen Lei
2021-06-16  6:37 ` [PATCH v2 07/20] scsi: tcm_qla2xxx: " Zhen Lei
2021-06-16  6:37 ` [PATCH v2 08/20] scsi: pmcraid: " Zhen Lei
2021-06-16  6:37 ` [PATCH v2 09/20] scsi: mvme16x: " Zhen Lei
2021-06-16  6:37 ` [PATCH v2 10/20] scsi: libsas: " Zhen Lei
2021-06-16  6:37 ` [PATCH v2 11/20] scsi: ips: " Zhen Lei
2021-06-16  6:37 ` [PATCH v2 12/20] scsi: ipr: " Zhen Lei
2021-06-16  6:37 ` [PATCH v2 13/20] scsi: fnic: " Zhen Lei
2021-06-16  6:37 ` [PATCH v2 14/20] scsi: fcoe: " Zhen Lei
2021-06-16  6:37 ` [PATCH v2 15/20] scsi: libcxgbi: " Zhen Lei
2021-06-16  6:37 ` [PATCH v2 16/20] scsi: bnx2i: " Zhen Lei
2021-06-16  6:37 ` [PATCH v2 17/20] scsi: aic94xx: " Zhen Lei
2021-06-16  6:37 ` [PATCH v2 18/20] scsi: aacraid: " Zhen Lei
2021-06-16  6:37 ` [PATCH v2 19/20] scsi: a100u2w: " Zhen Lei
2021-06-16  6:37 ` [PATCH v2 20/20] scsi: 3w-xxx: " Zhen Lei

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.