From patchwork Tue Oct 17 15:37:41 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SF Markus Elfring X-Patchwork-Id: 827089 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yGfWG6yQ8z9t32 for ; Wed, 18 Oct 2017 02:39:22 +1100 (AEDT) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3yGfWG5PfQzDrPC for ; Wed, 18 Oct 2017 02:39:22 +1100 (AEDT) X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=users.sourceforge.net (client-ip=212.227.15.14; helo=mout.web.de; envelope-from=elfring@users.sourceforge.net; receiver=) Received: from mout.web.de (mout.web.de [212.227.15.14]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3yGfTp4c9tzDqlv for ; Wed, 18 Oct 2017 02:38:06 +1100 (AEDT) Received: from [192.168.1.2] ([92.228.183.125]) by smtp.web.de (mrweb004 [213.165.67.108]) with ESMTPSA (Nemesis) id 0MaHHc-1dp9yh41xQ-00JsFD; Tue, 17 Oct 2017 17:37:44 +0200 Subject: [PATCH 1/3] powernv/pci: Delete an error message for a failed memory allocation in pnv_ioda_pick_m64_pe() From: SF Markus Elfring To: linuxppc-dev@lists.ozlabs.org, Alexey Kardashevskiy , Alistair Popple , Benjamin Herrenschmidt , David Gibson , Gavin Shan , Michael Ellerman , Paul Mackerras , Rob Herring , Russell Currey References: <549d0b6b-f875-c524-d867-742745117c1e@users.sourceforge.net> Message-ID: Date: Tue, 17 Oct 2017 17:37:41 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <549d0b6b-f875-c524-d867-742745117c1e@users.sourceforge.net> Content-Language: en-GB X-Provags-ID: V03:K0:yFdXujOAP/RDjPuJYkLowSIc2nQW6adneECV/gwEdJPY+p+9aPZ 5LiCAt0ZQqaZQmtVPXbTv5PGV29ig4yBYwnwzyPPADQgkEHC+FB5yjb1QxutP+p4ZOwH4yS lJK8o3oqJgdps+FYKjAJHrJ8S++kOCR/1CYHyUqGDj2zMwkA3+LLOUfGSh9/bbWPj1RRtuR tewFxX9xgo/1TApKperew== X-UI-Out-Filterresults: notjunk:1; V01:K0:8PIv+0kcSuc=:ZFs5g35NQS+SMeuKZnShxA RPENKvl6Z6gjuXVktbMUL/3VpoqXKDV4ejeC6IRSrHyq0W1yiU5UfFXqp14bSW7KM323evtDR X88gkFS6HYWCcY8HEHSrHm+0gHKQvsTgUhrlLdpD8X25nJEAM6M05cSFpEz4txkBZsQ+M0ygI qJve/iUBH5IMHzQ50QzLdURv9nB0yHZ5PWG4g8lhPN4alMqnJeUoizXUHOpJRPuqPzMrBfnAR jDpra2ixwHSW1mSnHPKjQdBL9NElOW7YMWgw5fGTk9UHcOT2zeQT9qU6t2hBqJvy9R8h5kLS3 F/b/x9qYEp8Dvj9BOy3yQAW/2QPxS4UOcaz8+kLM0GL0XP+jpgLiY0xsSP3muI8dbcSo5eJid +65qAWeOa6IcU/p4r92I6kfatSnE5hjP/dgi6vFQiKg9najRYuLge6PafSnRsTULUQX6Nz0// e7NmQXUBnFdwNZ6D+8ZBm+1fvyAkDCE6UwWJh7VJj4cSFwsSz2miG//e97uOLv0JFd3zYt6gd 943gyv1JjcRRwLidtOjEauniKqRdw1eel+JQp0eghsAQ0bbH+GUsYGTSxnX5xx181W9aGcPF3 THg/TMcvfg9kb+CNsP6tdTOii1HCFGVH1b2ozqH8RZJ+OYA0yLPfDxwzLKvDTZ7fbrcduCgfZ ah3TIZ0OhLrYjLgA/wb3zhqLaelSoxCtKXF+MMlW7v9PczIySxk3sQ6WBlX8sxjl+0wHgVhOh yuqWtoCYMuDsthfwyRSfrvUIwTo/+jCFwFs+PWPr49pZs4OMMzuKGMVi8ljVXq1sDKxmfuLIi /3g6ZxrwJcBnjjSZn+MTBj0j0CZuqjaxH73UxpbV3V5Tktsmtw= X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.24 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kernel-janitors@vger.kernel.org, LKML Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" From: Markus Elfring Date: Tue, 17 Oct 2017 16:52:43 +0200 Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Reviewed-by: Alexey Kardashevskiy --- arch/powerpc/platforms/powernv/pci-ioda.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c b/arch/powerpc/platforms/powernv/pci-ioda.c index fb5cd7511189..17c0330bb059 100644 --- a/arch/powerpc/platforms/powernv/pci-ioda.c +++ b/arch/powerpc/platforms/powernv/pci-ioda.c @@ -358,11 +358,8 @@ static struct pnv_ioda_pe *pnv_ioda_pick_m64_pe(struct pci_bus *bus, bool all) /* Allocate bitmap */ size = _ALIGN_UP(phb->ioda.total_pe_num / 8, sizeof(unsigned long)); pe_alloc = kzalloc(size, GFP_KERNEL); - if (!pe_alloc) { - pr_warn("%s: Out of memory !\n", - __func__); + if (!pe_alloc) return NULL; - } /* Figure out reserved PE numbers by the PE */ pnv_ioda_reserve_m64_pe(bus, pe_alloc, all);