All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zhen Lei <thunder.leizhen@huawei.com>
To: Vishal Bhakta <vbhakta@vmware.com>,
	VMware PV-Drivers <pv-drivers@vmware.com>,
	Karan Tilak Kumar <kartilak@cisco.com>,
	"Sesidhar Baddela" <sebaddel@cisco.com>,
	Nilesh Javali <njavali@marvell.com>,
	GR-QLogic-Storage-Upstream
	<GR-QLogic-Storage-Upstream@marvell.com>,
	"Adaptec OEM Raid Solutions" <aacraid@microsemi.com>,
	Brian King <brking@us.ibm.com>,
	Satish Kharat <satishkh@cisco.com>,
	Hannes Reinecke <hare@suse.de>,
	"Manish Rangankar" <mrangankar@marvell.com>,
	Adam Radford <aradford@gmail.com>,
	"James E . J . Bottomley" <jejb@linux.ibm.com>,
	"Martin K . Petersen" <martin.petersen@oracle.com>,
	linux-scsi <linux-scsi@vger.kernel.org>
Cc: Zhen Lei <thunder.leizhen@huawei.com>
Subject: [PATCH v2 07/20] scsi: tcm_qla2xxx: remove unnecessary oom message
Date: Wed, 16 Jun 2021 14:37:01 +0800	[thread overview]
Message-ID: <20210616063714.778-8-thunder.leizhen@huawei.com> (raw)
In-Reply-To: <20210616063714.778-1-thunder.leizhen@huawei.com>

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



  parent reply	other threads:[~2021-06-16  6:37 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 ` Zhen Lei [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210616063714.778-8-thunder.leizhen@huawei.com \
    --to=thunder.leizhen@huawei.com \
    --cc=GR-QLogic-Storage-Upstream@marvell.com \
    --cc=aacraid@microsemi.com \
    --cc=aradford@gmail.com \
    --cc=brking@us.ibm.com \
    --cc=hare@suse.de \
    --cc=jejb@linux.ibm.com \
    --cc=kartilak@cisco.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=mrangankar@marvell.com \
    --cc=njavali@marvell.com \
    --cc=pv-drivers@vmware.com \
    --cc=satishkh@cisco.com \
    --cc=sebaddel@cisco.com \
    --cc=vbhakta@vmware.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.