From patchwork Wed Jun 16 06:37:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Leizhen \(ThunderTown\)" X-Patchwork-Id: 461368 Delivered-To: patch@linaro.org Received: by 2002:a02:735a:0:0:0:0:0 with SMTP id a26csp313054jae; Tue, 15 Jun 2021 23:38:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxTqSkQ8cPSpnIasra2DPes1OgNQa68MiKwSYZFEAvZ2wmEUJXIbmiSw7tHZZceGC+c8AK7 X-Received: by 2002:a50:fd0a:: with SMTP id i10mr2339479eds.78.1623825491284; Tue, 15 Jun 2021 23:38:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623825491; cv=none; d=google.com; s=arc-20160816; b=BFOxZSOCYpiBH28t4Td2Zo7CCsxTh00eXtmq/Niv3F2s3LO/HtLHhS5kBsfEd8z9Ia bYVtEM8BW4wkHjj/E76e/+0t2jms84DUb2aXUvJzgcAusk2ARS6U+1bYzlFVSOMopx96 lJrIJftqbnjRchD3TyRs6H8zkTEO4hmvr6GnmeulXPqJXrmSzBq6zYH+wEoEa10qEkhO WUV1mZ8AJnu9K8/8AY4GYWMVCu8VhCO8vLnRAop3epVsZgJe3CaROxPEleoepUzMdk7O 6417vUVlRWYZuM7TcdxQls/SlV7x/3D/1Bg9dwufyk31pbKqip//2ve8m6tyhKgb8xFo DH+w== 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=2ZgqKHQO0DPGkxdYrWW7pNH7rzklQCG/BtSnjovo+YA=; b=iHMfytQXTm4mP35TXN/NaHnFtAY38Og9r3KlG0uLGYxEqgKUDeIso9ypVJ/ey2xOVj eM70jvg2eXtiYpnVG1KbEm90szMXvWughfE55bf4EyGz4Nh7C7xM308PkM0G7I2bIrlS LGxlV1iYuTUjhSHYCRA5+bvA4Vd7wqDH2CdukezoW03F4XPV8cKp91pPbWQUcS1zABxB J/AQFFMnG7V/Wm4fm6acrPVJP5Lo4t42VRApz1hV+NtcunYG4axq/MP4P4qNRou0BvrI 7yChliXppNR2M7Kop13CksIovc73W1cMqGudfXcx/MqCBmuB9hTIWYCmat7Jg1MaaDjP C89A== 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.11 for ; Tue, 15 Jun 2021 23:38:11 -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 S231602AbhFPGkP (ORCPT ); Wed, 16 Jun 2021 02:40:15 -0400 Received: from szxga01-in.huawei.com ([45.249.212.187]:4797 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231560AbhFPGkL (ORCPT ); Wed, 16 Jun 2021 02:40:11 -0400 Received: from dggemv703-chm.china.huawei.com (unknown [172.30.72.53]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4G4b3N0hjQzWtHr; Wed, 16 Jun 2021 14:33:04 +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:05 +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:04 +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 18/20] scsi: aacraid: remove unnecessary oom message Date: Wed, 16 Jun 2021 14:37:12 +0800 Message-ID: <20210616063714.778-19-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/aacraid/comminit.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) -- 2.26.0.106.g9fadedd diff --git a/drivers/scsi/aacraid/comminit.c b/drivers/scsi/aacraid/comminit.c index 355b16f0b1456bd..282519ccd4a22da 100644 --- a/drivers/scsi/aacraid/comminit.c +++ b/drivers/scsi/aacraid/comminit.c @@ -85,10 +85,8 @@ static int aac_alloc_comm(struct aac_dev *dev, void **commaddr, unsigned long co printfbufsiz + host_rrq_size; base = dma_alloc_coherent(&dev->pdev->dev, size, &phys, GFP_KERNEL); - if (base == NULL) { - printk(KERN_ERR "aacraid: unable to create mapping.\n"); + if (!base) return 0; - } dev->comm_addr = (void *)base; dev->comm_phys = phys; @@ -635,10 +633,8 @@ struct aac_dev *aac_init_adapter(struct aac_dev *dev) */ dev->queues = kzalloc(sizeof(struct aac_queue_block), GFP_KERNEL); - if (dev->queues == NULL) { - printk(KERN_ERR "Error could not allocate comm region.\n"); + if (!dev->queues) return NULL; - } if (aac_comm_init(dev)<0){ kfree(dev->queues);