From patchwork Thu Jun 10 07:53:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Leizhen \(ThunderTown\)" X-Patchwork-Id: 457817 Delivered-To: patch@linaro.org Received: by 2002:a02:735a:0:0:0:0:0 with SMTP id a26csp160535jae; Thu, 10 Jun 2021 00:54:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxasTJe3rkxsPgB0DzdUDj8J3EXOpGaJOnTk5Ec++yQ23S0XjiCFtbWydlBSS/QlRD2tUk5 X-Received: by 2002:a17:906:34d6:: with SMTP id h22mr3356662ejb.413.1623311690971; Thu, 10 Jun 2021 00:54:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623311690; cv=none; d=google.com; s=arc-20160816; b=oxKHVZ9tXFACaf9gtFoSRVDDRJpikXHJQiZEoKwOS14BJCNG9Xpq6D4I6loql+9hJ6 hKVC91Zh++q05+pPWQfoMGJiDhjxlL6adMEcW7JGPmHzsQ0QKaUTgkMaAc9JYX6y6NrY ylGSOkTayXUyPrV3M82thA0jr0S+C8LhsyhfFt3j7ILP/JmCn7fZRboJnEf0e6cJCP6C us1EECkyCMzEDO9hJUMET6uV9m/+30P/12Ub6IY7mA9wGIgeHwHyTeUXlS58/D9oCH2g L/fPu8ip3duHrhnAKFZpJ7s2xXF+h6fncsmcSmCklJty4+cGzJ6qlAtBKCrxuJzVkqru zWBg== 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 :message-id:date:subject:cc:to:from; bh=/hnErDtnD0/gKbbjHk76fpbYBR0Rq2yVneksz6tQpws=; b=eRWGzqf9Qp0HoXjory60jPJbIprC5qp9C27/c5hCFRDaIsoQNz5wXfW81f/osDOtgs BdoiIyfuC6KiRm7NdSpyA7Xtq5ATib+ABf+VPKzMt4AW0MJNGlRJXLDO54MCWSD08mz5 areJzgNN0kalHOSHuUgvcIH7Ynum7MctABFJ+g8sJKCFYlb27CsSWYNlDkevhAiYpsoI S2XeIJZlUXaP2nJVui4W2xlTGjhABm779Z2dZrynuXo2Q5PwbDiirAWFPaxwfAoHVVuD EpCcekmBurTi5Qz7diUWc01/ZVBGtysaj2bhziujzSvf6JfhgVcsho40slUJ/nPvjjzA 74Tw== 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 c7si1657081ejz.386.2021.06.10.00.54.50 for ; Thu, 10 Jun 2021 00:54:50 -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 S230052AbhFJH4E (ORCPT ); Thu, 10 Jun 2021 03:56:04 -0400 Received: from szxga02-in.huawei.com ([45.249.212.188]:5478 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230055AbhFJH4D (ORCPT ); Thu, 10 Jun 2021 03:56:03 -0400 Received: from dggemv703-chm.china.huawei.com (unknown [172.30.72.55]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4G0x4M1MflzZfyB; Thu, 10 Jun 2021 15:51:15 +0800 (CST) Received: from dggpemm500006.china.huawei.com (7.185.36.236) by dggemv703-chm.china.huawei.com (10.3.19.46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Thu, 10 Jun 2021 15:54:03 +0800 Received: from thunder-town.china.huawei.com (10.174.177.72) 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; Thu, 10 Jun 2021 15:54:02 +0800 From: Zhen Lei To: Satish Kharat , Sesidhar Baddela , Karan Tilak Kumar , "James E . J . Bottomley" , "Martin K . Petersen" , linux-scsi CC: Zhen Lei Subject: [PATCH 1/1] scsi: fnic: remove unnecessary oom message Date: Thu, 10 Jun 2021 15:53:36 +0800 Message-ID: <20210610075336.15871-1-thunder.leizhen@huawei.com> X-Mailer: git-send-email 2.26.0.windows.1 MIME-Version: 1.0 X-Originating-IP: [10.174.177.72] 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++) {