Message ID | 20210616063714.778-16-thunder.leizhen@huawei.com |
---|---|
State | New |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a02:735a:0:0:0:0:0 with SMTP id a26csp313028jae; Tue, 15 Jun 2021 23:38:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxkDdOD3wRXJ/Y8FkWIjB7gViTQYtb2mdHcu3h8TJPg0hDO7Mp2tGxlsB5rimOhE5FAJ2N5 X-Received: by 2002:aa7:d648:: with SMTP id v8mr2194780edr.203.1623825489668; Tue, 15 Jun 2021 23:38:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623825489; cv=none; d=google.com; s=arc-20160816; b=S9lDkTPaiiMn19VyEikbMBJ0Q0dciXkajLPOzfR17ALlSjkW9bjgRwH6XkRyIXwf7z 4AIVH61Su9MSlge0naUIoOXmB8lLJl6/Rd3obyLNfuska/guHhalQIois8at4aZXbkZz tIljkRJozxHGG2kmYXSiAtHzHmAaTyHJnJqmq1ewvUWQ0FAf+zHZQdZ+jLIRB65ymE0B f0CSW9S62dFqbhtMHlI1vMT4P0JlcsRMvQq7GgcYydCYjxccQUFF4n5eGqTbsy8CVsq1 8OM4tmwNGD4x+7mkIUJ/Eupphm6IvC/UGkmG3c9oXcX8Y3jEJUbputzxyugDmMR3lbGR 0nFQ== 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=eYPLPkKkHQEnKQ73AvM6Z1lBLo1wxQqhjrrS8My3B0M=; b=d5V0zksgyLeZP5ggD2YDtRRfX0TDqTHbkIHOAWvbFkW+0wWOjYjZ0p/V8Mjiamirma HqsBR5GWKXu3oSkeALerGoIuSB9dx5Av8XReDcRK+wgKZSICUJlbCX5C1CRclVLZyWRf jl3z4FgTj3nHTkhfhHl+2M3YLfREj0Sp7y+CeY/yAZmOD1WReH1NzbpLaqlKyJDbflex 8ZhSNmgU6Z4SQFbgV+/URH8UWbwKkXOfaGSSaY4Ue7Wxb6WhOM1/zRBoqk09aRH6qVZb hQh+DH/3SNjjxs7wRva6iwOHVvgx2oAWVq/8BrzzvcU6vSOxCSRpe6vuokkl9XhES9Ev wVMA== 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: <linux-scsi-owner@vger.kernel.org> 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.09 for <patch@linaro.org>; Tue, 15 Jun 2021 23:38:09 -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 S231499AbhFPGkO (ORCPT <rfc822;patch@linaro.org>); Wed, 16 Jun 2021 02:40:14 -0400 Received: from szxga08-in.huawei.com ([45.249.212.255]:7289 "EHLO szxga08-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231453AbhFPGkL (ORCPT <rfc822; linux-scsi@vger.kernel.org>); Wed, 16 Jun 2021 02:40:11 -0400 Received: from dggemv703-chm.china.huawei.com (unknown [172.30.72.54]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4G4b3K5gZGz1BN48; Wed, 16 Jun 2021 14:33:01 +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; Wed, 16 Jun 2021 14:38:02 +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:01 +0800 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 15/20] scsi: libcxgbi: remove unnecessary oom message Date: Wed, 16 Jun 2021 14:37:09 +0800 Message-ID: <20210616063714.778-16-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 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII 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: <linux-scsi.vger.kernel.org> X-Mailing-List: linux-scsi@vger.kernel.org |
Series |
scsi: remove unnecessary oom message
|
expand
|
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);
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(-) -- 2.26.0.106.g9fadedd