From patchwork Thu Jun 10 07:44:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Leizhen \(ThunderTown\)" X-Patchwork-Id: 457812 Delivered-To: patch@linaro.org Received: by 2002:a02:735a:0:0:0:0:0 with SMTP id a26csp155637jae; Thu, 10 Jun 2021 00:45:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyAxh4aVSkYboKz+zBJ3gs/M+VKqRFXhOgD8tDNfRUNsGYVHHjnGxlNkntG0KTeIaiXOufw X-Received: by 2002:a17:906:1444:: with SMTP id q4mr3295198ejc.459.1623311103570; Thu, 10 Jun 2021 00:45:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623311103; cv=none; d=google.com; s=arc-20160816; b=eJmR0S7ojBBiPhp/WEL+fIR4vCkfpglOD9CQMkg6sIrun4lwIp5ZKBdLn+JWzyudhM 7fPi467Q76tYebM3Qbm56fOgnUjKjLIM4Q/NIIGVjZSJ1bDYr20Wc1Usm73ZkSrzUqow /PClH/y/xfb2TWpc+AbsBLX8JffGI4QZgSVgm3Ac/Kz3Gn0IYUtoYmeMKzUr31p5nP2/ Eo+zoCVH09rf4f44y+9/y4TE9UB6FM9I0RgrC1IJISpo/1/yifjl6YBaBP0B4v8C1/F0 DP/KX6VFiJx/Sv3f1VIcjdOLRIggi2+MpIq6PoaqEMEfpvPLrsIv1ybvrrDtoH62f0Vu 6RKQ== 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=2ZgqKHQO0DPGkxdYrWW7pNH7rzklQCG/BtSnjovo+YA=; b=PgNCmYu6oDpm8NedbMwZXz2wTdSOIFTYB+Z8D5W6Tyx3nncl1o+VkFpg8mUfGWbG1i tE78DaPitB0eb59UqrMUm+KvsYzgjkJr/OwgDvU74oFv1qdBWt2K1rnVKqcspYVYqOx2 MpmfLW3Xo3qB4rFeg8CRCpRl39Nw9w7rlwyiTQmmiSAibjv+tVMMie3AJ0kssK6aA6Cg sWBXsYZRbmCE7QqFVc7ldJOoEPUrL61H0elczzWBD1sWYK8SAkUwmZP5kh8e5g8bSBmb AaJ+S7ejwEOejQ8oQRuOUyOwAQI8+EJ3fVWXUVs55CTDcnZzRMYOx+v5HW8N/q/tDDR6 vuTA== 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 j23si1755484ejn.74.2021.06.10.00.45.03 for ; Thu, 10 Jun 2021 00:45:03 -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 S230144AbhFJHqg (ORCPT ); Thu, 10 Jun 2021 03:46:36 -0400 Received: from szxga08-in.huawei.com ([45.249.212.255]:5319 "EHLO szxga08-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229941AbhFJHqg (ORCPT ); Thu, 10 Jun 2021 03:46:36 -0400 Received: from dggemv703-chm.china.huawei.com (unknown [172.30.72.54]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4G0wq61lXJz1BKcD; Thu, 10 Jun 2021 15:39:46 +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:44:39 +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:44:38 +0800 From: Zhen Lei To: Adaptec OEM Raid Solutions , "James E . J . Bottomley" , "Martin K . Petersen" , linux-scsi CC: Zhen Lei Subject: [PATCH 1/1] scsi: aacraid: remove unnecessary oom message Date: Thu, 10 Jun 2021 15:44:33 +0800 Message-ID: <20210610074433.15606-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/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);