Message ID | 20210616063714.778-21-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 a26csp313144jae; Tue, 15 Jun 2021 23:38:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxLLijYK2RZyL2HLFYbwbQa6BoVCpXYL+3aIKMkEwWVzH9U8ONvDYvWI8Xj3ycAoqBcUe/1 X-Received: by 2002:a05:6402:1c88:: with SMTP id cy8mr2315335edb.80.1623825498117; Tue, 15 Jun 2021 23:38:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623825498; cv=none; d=google.com; s=arc-20160816; b=aD61F2PmEshM4a2c1AaAmt/ixaKWSOYbgX1CzoGcdQSJkWGEJnEie7Ha2nlPPUaS7C GJW4ZziqVSbSWG2whBA4MEfuQ/BwN0w2++3Bo7CjVZmumSxoW3RoTBwP6U6npBmqsjpb Ul6H1rMT00Kuda1cly53Gr4sQwZ+aCELQaZ0ADBnXnICMutmwEwnuyNMV8jUeCz2PtOE Zx+mhxgy3EeH2Hpb/FsL4ip93y6rBeXn5foCL9ON6xTgJFjl+rsxb4JJbxGSQMbjch2e 0Vi3a1/xAOTXWTOr7KmKo3mZAHfJ8g8j9OwAoBsC6zxPRP3DlrpOqG7875V+6N+swCqj yFAQ== 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=Nmem0+oKnfV6lI+LWyz9v1qn/6ql69BN8A1PNrwLYO4=; b=GvZVhUZRToTfN+p9XODYp3iIHgocfXO7pm33g9gTF0VqtV+w20xNs9n2dqKc55KXkL y7k8rts3fP63I0Ol2TaS8deaHS2wrSuAk+xpCQgaS1sRnWmfvDKdRlfJ4FJwl7HtAi8A a6YsQnq0jNg8EIao0Q32T6Sxn66BWbVm+8XJvs/N/JHIu7tT7dEp20lz6IQ7Zp57MBop kuL9b8GQsWX4x56xXpFidWcwWJzna57mYcQOtvajgW01weLEAAKygzoqHo04YtSvvgrv RcA2DjJFbYPtvMwcRKNQqjd1Knz+ADILSL/XC00kaeXerVpSPkTQoWyXVLwpLEPGabRT RjYg== 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.17 for <patch@linaro.org>; Tue, 15 Jun 2021 23:38:18 -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 S231614AbhFPGkV (ORCPT <rfc822;patch@linaro.org>); Wed, 16 Jun 2021 02:40:21 -0400 Received: from szxga03-in.huawei.com ([45.249.212.189]:7326 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231258AbhFPGkT (ORCPT <rfc822; linux-scsi@vger.kernel.org>); Wed, 16 Jun 2021 02:40:19 -0400 Received: from dggemv704-chm.china.huawei.com (unknown [172.30.72.57]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4G4b4j3k9Vz6yB8; Wed, 16 Jun 2021 14:34:13 +0800 (CST) Received: from dggpemm500006.china.huawei.com (7.185.36.236) by dggemv704-chm.china.huawei.com (10.3.19.47) 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:06 +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:06 +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 20/20] scsi: 3w-xxx: remove unnecessary oom message Date: Wed, 16 Jun 2021 14:37:14 +0800 Message-ID: <20210616063714.778-21-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/3w-xxxx.c b/drivers/scsi/3w-xxxx.c index 4ee485ab2714845..a7eb50d2592ea1a 100644 --- a/drivers/scsi/3w-xxxx.c +++ b/drivers/scsi/3w-xxxx.c @@ -836,10 +836,8 @@ static int tw_allocate_memory(TW_Device_Extension *tw_dev, int size, int which) cpu_addr = dma_alloc_coherent(&tw_dev->tw_pci_dev->dev, size * TW_Q_LENGTH, &dma_handle, GFP_KERNEL); - if (cpu_addr == NULL) { - printk(KERN_WARNING "3w-xxxx: dma_alloc_coherent() failed.\n"); + if (!cpu_addr) return 1; - } if ((unsigned long)cpu_addr % (tw_dev->tw_pci_dev->device == TW_DEVICE_ID ? TW_ALIGNMENT_6000 : TW_ALIGNMENT_7000)) { printk(KERN_WARNING "3w-xxxx: Couldn't allocate correctly aligned memory.\n");
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/3w-xxxx.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) -- 2.26.0.106.g9fadedd