From patchwork Wed Jun 16 06:37:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Leizhen \(ThunderTown\)" X-Patchwork-Id: 461365 Delivered-To: patch@linaro.org Received: by 2002:a02:735a:0:0:0:0:0 with SMTP id a26csp313005jae; Tue, 15 Jun 2021 23:38:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJweFCkdUEvW/v6J3dTL069WwvK+c11E3aWc2UWhsPtNaZjjMtEuNYad+FLc9sgU7t0njDby X-Received: by 2002:a17:906:1c49:: with SMTP id l9mr3714025ejg.39.1623825488133; Tue, 15 Jun 2021 23:38:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623825488; cv=none; d=google.com; s=arc-20160816; b=xLPjAZq5GbHWDm/fehoNVAoqRRt4YeWHVc5CW3poM2qikazBlr1icJWwMDFvo9TfAX R6TeN6oKS42JsLo5rIx0a1uWiNkIIR/oFErul+D+5jBb6Q2rLXUQ9DNcNtWmE21x1+Fv uEDAc3Cgax9FXmjaBQLDN8E7xC4yu6PQbTEXvCTb7ZfFZ2UwUF5IwDXbXKOPf/fRnJf5 U5fihGCwPJ+NkGyzJGJFvUMkJLb0Cu6vbUqW9rpNHYk7636rPBcA2vupj67Jdl+UTs5f PoFx5SKLzJmfLwDVPbfjsah4lIgvsPr0KJS94teDrCqQDO/rSAP7e5HotDNx3fCFvCIz MUdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=/hnErDtnD0/gKbbjHk76fpbYBR0Rq2yVneksz6tQpws=; b=eU7KAYb94QhpOrxYZbS8IO4FpBSv0wbM801xPPhEOpZxL6cgjCxRpHdde1u1x+uO1m aoaMuZClKbAfHqhfuRW+BH1PRzbABcYn04rGNeK46EdstKwPq/zWE/kusC3JMUARZE5y 5Tw2fRBB4Rg4sAbA4omcn12KIJ0teSprydmLolrJNvuWNXhj0vY5vDjNJsgwqDEBkUsq Oz03hvsxbosHmWvuVQd004I8CEIDYXozZUHiNg1wCHrT1dLMIljg55doctzE4SER9bjt ICtmYG5J3b5OmoqaobFZiVsBa/HUYmi5pfCl71pVuQDl7AIscuRW9fNczww1SaZTCVba 14Cw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-scsi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-scsi-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z16si1386040edb.194.2021.06.15.23.38.08 for ; Tue, 15 Jun 2021 23:38:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-scsi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-scsi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-scsi-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231604AbhFPGkM (ORCPT ); Wed, 16 Jun 2021 02:40:12 -0400 Received: from szxga02-in.huawei.com ([45.249.212.188]:4933 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231499AbhFPGkH (ORCPT ); Wed, 16 Jun 2021 02:40:07 -0400 Received: from dggemv711-chm.china.huawei.com (unknown [172.30.72.56]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4G4b5R3KjTz70KQ; Wed, 16 Jun 2021 14:34:51 +0800 (CST) Received: from dggpemm500006.china.huawei.com (7.185.36.236) by dggemv711-chm.china.huawei.com (10.1.198.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Wed, 16 Jun 2021 14:38:01 +0800 Received: from thunder-town.china.huawei.com (10.174.179.0) by dggpemm500006.china.huawei.com (7.185.36.236) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Wed, 16 Jun 2021 14:38:00 +0800 From: Zhen Lei 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 Subject: [PATCH v2 13/20] scsi: fnic: remove unnecessary oom message Date: Wed, 16 Jun 2021 14:37:07 +0800 Message-ID: <20210616063714.778-14-thunder.leizhen@huawei.com> X-Mailer: git-send-email 2.26.0.windows.1 In-Reply-To: <20210616063714.778-1-thunder.leizhen@huawei.com> References: <20210616063714.778-1-thunder.leizhen@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.174.179.0] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To dggpemm500006.china.huawei.com (7.185.36.236) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org 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 --- 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(-) -- 2.26.0.106.g9fadedd 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++) {