From patchwork Thu Jun 10 07:49:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhen Lei X-Patchwork-Id: 457815 Delivered-To: patch@linaro.org Received: by 2002:a02:735a:0:0:0:0:0 with SMTP id a26csp158636jae; Thu, 10 Jun 2021 00:50:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwN9xEdJq4L8o45llm/tDRpnDfF0VeT9EpKx1GcPjbl63lwl1Cn0ydEkRAOGgpHfjGtxQu5 X-Received: by 2002:a17:906:49c8:: with SMTP id w8mr3243050ejv.497.1623311447793; Thu, 10 Jun 2021 00:50:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623311447; cv=none; d=google.com; s=arc-20160816; b=Oz0Dh1yPtvCwuLyv0tAEvizQappymj5MHnCq3PyLodo1X7oPGmB1PreiGteGTlQTgv zNNdcrBYan3K9nR4bHy/1zI3uq1fQIczkwK1QGHNeiNmVLcGlInbX28puKmjeksd+Qtp 48D6x+nGJCoIx4A3yEOZa3glNhqPuJKLo/+ze25dCD/fZ0EDgT6yj6rVjOJ2jaRQ12dj hJ4NWI7RlBfhaqDf0Gdw3vQsEGBuB/3unXzEywYTIBdMwSdFh8P3QRsjICjAkWB1G8lh fhJJI+UqH/MnXBXF7mVlG6kPyzPpGbq7j1jHD1lOACGuq6dE1oV9ELBE+h/ye+hyIi6X E8Kw== 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=eYPLPkKkHQEnKQ73AvM6Z1lBLo1wxQqhjrrS8My3B0M=; b=i0y5bOCDBPHNtkxos3kyx/ancpYTRamz5+86uHUHehdiO/75lu0UC0WvUCmS/cKX0T lIJeSWT5+Lnmiy7sK22wVZlrvSa8QiN2z9l8XJCIPMDMV1OC+Q7Cgsj2t446/l9rZAs5 BBi2G5pmytWQo7E+/A4QUveG/Bxx0TWlhkW9OvSfcZqtnRM7Ulhp1ytj3vNgrLaz8Dpa hes33FnUsxbMlojmFlGLKJ6fr5vfGldLSBxiaeTM/hSgKdU7wf+NX55R3M1fxj3TeG+7 CuWDeYo3B/SLgzQG0gYJXKSf06TmsqpxAIS8gTCKCmWRQChgZxa9L5Q5vMq57d+NPeCY Ikxw== 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 y12si1653921eje.174.2021.06.10.00.50.47 for ; Thu, 10 Jun 2021 00:50:47 -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 S230040AbhFJHwF (ORCPT ); Thu, 10 Jun 2021 03:52:05 -0400 Received: from szxga03-in.huawei.com ([45.249.212.189]:5366 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229802AbhFJHwE (ORCPT ); Thu, 10 Jun 2021 03:52:04 -0400 Received: from dggemv703-chm.china.huawei.com (unknown [172.30.72.54]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4G0wyT270gz6w7B; Thu, 10 Jun 2021 15:46:09 +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:50:01 +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:50:01 +0800 From: Zhen Lei To: "James E . J . Bottomley" , "Martin K . Petersen" , linux-scsi CC: Zhen Lei Subject: [PATCH 1/1] scsi: libcxgbi: remove unnecessary oom message Date: Thu, 10 Jun 2021 15:49:52 +0800 Message-ID: <20210610074952.15765-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: dggems701-chm.china.huawei.com (10.3.19.178) 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/cxgbi/libcxgbi.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) -- 2.26.0.106.g9fadedd 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);