From patchwork Thu Jun 10 02:22:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Leizhen \(ThunderTown\)" X-Patchwork-Id: 457802 Delivered-To: patch@linaro.org Received: by 2002:a02:735a:0:0:0:0:0 with SMTP id a26csp5978446jae; Wed, 9 Jun 2021 19:26:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxy2cuD4OtqLABkQWSqch3FQfCMyTHxaeZaBnii4DfvjOSl0hXslu7HmS0GIhYQB/D7G4H6 X-Received: by 2002:a17:906:6d45:: with SMTP id a5mr2430677ejt.399.1623291980188; Wed, 09 Jun 2021 19:26:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623291980; cv=none; d=google.com; s=arc-20160816; b=sZ+Gh+4P/pMLIvz0fTodJlB1whCoCLG0fQffCNKZlftG0HuEJrtYeobtQdL3sXwVfH wvR1INlIM+RfNvDSOuG/38wVUUZsq3N/Qq8V9wc19yV5s5ygIlvHDmEirVH84c3NX3VA lQ8Amp2r80nB6cfOsVb5zzmLHgPUWEktCy2s2dSRxE9AnOaSKHEJrs5VuuatfMRK3gQz Y0KWS769IV7fCUvAHXIKhl/ULHNGacP6RfzwQAW4heMT77yjLDg5DI9GE2zOsGMB9vUF c9/IvsqRr72c7WR8HjJqmWv2RjHCEMWnMqAnwyJaoEAlOuX8t+ARnGrWZq+1iu6Iyx/X 4RGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=EHUnh1nqiHHurmI1/DBxleVki3dLS2fXAkSVpGnCtSM=; b=G6tQFIuXvdUD+3Ke4kNE2dBVTubf+9KYQXu+fTEPQjNNzVmcy+wZIz+UXx6JbjkLnQ ihPvB/NC7T04bLpJ8YW/n9S7vc33Qc6ioFHsaZXG5cUomcrFRGChaJlE3J1C9s68HopW 8a5PKGLRI2Qq7UqgQGUUPEtIDTp2TLA0t4E+H8KbhGLFSFa4k36Gk07yWKzm4xMW1mMm J31Xz8INqy+L1y2pB+RIsEobv8bqNp6xsmXmMDhmrZ3F09ehnchh2Xh5AUNy9vQ2YLnN aeHcS+hVytvCRAzYl/V1SeS7rVjvdI3Fb3A7KZPvHch2o7NFC87i0P99HrJembe/RXFE EEXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=bombadil.20210309 header.b=MzGU8FYb; spf=pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 198.137.202.133 as permitted sender) smtp.mailfrom="linux-mtd-bounces+patch=linaro.org@lists.infradead.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [198.137.202.133]) by mx.google.com with ESMTPS id qp24si1372087ejb.742.2021.06.09.19.26.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Jun 2021 19:26:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 198.137.202.133 as permitted sender) client-ip=198.137.202.133; Authentication-Results: mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=bombadil.20210309 header.b=MzGU8FYb; spf=pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 198.137.202.133 as permitted sender) smtp.mailfrom="linux-mtd-bounces+patch=linaro.org@lists.infradead.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:CC :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=EHUnh1nqiHHurmI1/DBxleVki3dLS2fXAkSVpGnCtSM=; b=MzGU8FYbmPQUsM ZZqhybcf23kp9NT5iEkod4CGgGoReVNVJhRUAL4pfZt0NGNQrC1Y5fS99NLfnfpkWMOP4pxCn6mo5 0g/CYZq3qvICIjy4faFb54hajV5QyAZsMLKlTUyyfa/enTWQh/eddETrvwK2+5F1PNecViGlbJ+3u lyBAinjfB++sUHQLL3yYqDUMJF66XbP7OdiSbYgyhPPKOmNRC5QFTVDHKqa33fKAguYLXEbsbdQGU 718jWQS2UaIbg7ATiea4XH8bMcdCwo0RamrAafV7WJFBhCMYnbODcxCI7AFwddiyL8D103qtUTGPV 20vvwtVqOSysiLxAevDQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lrALu-00GQMk-Jn; Thu, 10 Jun 2021 02:23:26 +0000 Received: from szxga02-in.huawei.com ([45.249.212.188]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lrALg-00GQIG-EG for linux-mtd@lists.infradead.org; Thu, 10 Jun 2021 02:23:14 +0000 Received: from dggemv703-chm.china.huawei.com (unknown [172.30.72.57]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4G0nk95h02z6x8q; Thu, 10 Jun 2021 10:20: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; Thu, 10 Jun 2021 10:22:58 +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 10:22:57 +0800 From: Zhen Lei To: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , linux-mtd CC: Zhen Lei Subject: [PATCH 1/1] mtd: esb2rom: remove unnecessary oom message Date: Thu, 10 Jun 2021 10:22:39 +0800 Message-ID: <20210610022239.15238-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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210609_192312_683613_7E99539C X-CRM114-Status: UNSURE ( 8.54 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.3 (--) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: 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/mtd/maps/esb2rom.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) Content analysis details: (-2.3 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [45.249.212.188 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_H4 RBL: Very Good reputation (+4) [45.249.212.188 listed in wl.mailspike.net] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-mtd" Errors-To: linux-mtd-bounces+patch=linaro.org@lists.infradead.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/mtd/maps/esb2rom.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) -- 2.26.0.106.g9fadedd ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/ diff --git a/drivers/mtd/maps/esb2rom.c b/drivers/mtd/maps/esb2rom.c index 85e14150a073068..15d5b76ff50450e 100644 --- a/drivers/mtd/maps/esb2rom.c +++ b/drivers/mtd/maps/esb2rom.c @@ -277,11 +277,10 @@ static int __init esb2rom_init_one(struct pci_dev *pdev, unsigned long offset; int i; - if (!map) - map = kmalloc(sizeof(*map), GFP_KERNEL); if (!map) { - printk(KERN_ERR MOD_NAME ": kmalloc failed"); - goto out; + map = kmalloc(sizeof(*map), GFP_KERNEL); + if (!map) + goto out; } memset(map, 0, sizeof(*map)); INIT_LIST_HEAD(&map->list);