{"id":797835,"url":"http://patchwork.ozlabs.org/api/patches/797835/?format=json","web_url":"http://patchwork.ozlabs.org/project/linuxppc-dev/patch/0a35cb55-9f6b-21ca-565f-cab26237c962@users.sourceforge.net/","project":{"id":2,"url":"http://patchwork.ozlabs.org/api/projects/2/?format=json","name":"Linux PPC development","link_name":"linuxppc-dev","list_id":"linuxppc-dev.lists.ozlabs.org","list_email":"linuxppc-dev@lists.ozlabs.org","web_url":"https://github.com/linuxppc/wiki/wiki","scm_url":"https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git","webscm_url":"https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/","list_archive_url":"https://lore.kernel.org/linuxppc-dev/","list_archive_url_format":"https://lore.kernel.org/linuxppc-dev/{}/","commit_url_format":"https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/commit/?id={}"},"msgid":"<0a35cb55-9f6b-21ca-565f-cab26237c962@users.sourceforge.net>","list_archive_url":"https://lore.kernel.org/linuxppc-dev/0a35cb55-9f6b-21ca-565f-cab26237c962@users.sourceforge.net/","date":"2017-08-04T14:46:51","name":"powerpc/eeh: Delete an error message for a failed memory allocation in two functions","commit_ref":"6ab41161b44a3b4d504ac29c9dd9976890d76a3f","pull_url":null,"state":"accepted","archived":false,"hash":"84fe9c51c902a2c850819815b26a2e56a6a5a2a0","submitter":{"id":65077,"url":"http://patchwork.ozlabs.org/api/people/65077/?format=json","name":"SF Markus Elfring","email":"elfring@users.sourceforge.net"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/linuxppc-dev/patch/0a35cb55-9f6b-21ca-565f-cab26237c962@users.sourceforge.net/mbox/","series":[],"comments":"http://patchwork.ozlabs.org/api/patches/797835/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/797835/checks/","tags":{},"related":[],"headers":{"Return-Path":"<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>","X-Original-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Delivered-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Received":["from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xP8tY3xp7z9sRm\n\tfor <patchwork-incoming@ozlabs.org>;\n\tSat,  5 Aug 2017 00:48:21 +1000 (AEST)","from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3xP8tY2sPPzDqk9\n\tfor <patchwork-incoming@ozlabs.org>;\n\tSat,  5 Aug 2017 00:48:21 +1000 (AEST)","from mout.web.de (mout.web.de [212.227.15.14])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128\n\tbits)) (No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3xP8sK2MJgzDqJ7\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tSat,  5 Aug 2017 00:47:16 +1000 (AEST)","from [192.168.1.2] ([78.49.135.73]) by smtp.web.de (mrweb002\n\t[213.165.67.108]) with ESMTPSA (Nemesis) id 0MS1xS-1e6t2223h4-00TAvH;\n\tFri, 04 Aug 2017 16:46:56 +0200"],"To":"linuxppc-dev@lists.ozlabs.org,\n\tBenjamin Herrenschmidt <benh@kernel.crashing.org>,\n\tMichael Ellerman <mpe@ellerman.id.au>,\n\tPaul Mackerras <paulus@samba.org>, Russell Currey <ruscur@russell.cc>","From":"SF Markus Elfring <elfring@users.sourceforge.net>","Subject":"[PATCH] powerpc/eeh: Delete an error message for a failed memory\n\tallocation in two functions","Message-ID":"<0a35cb55-9f6b-21ca-565f-cab26237c962@users.sourceforge.net>","Date":"Fri, 4 Aug 2017 16:46:51 +0200","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.2.1","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-GB","Content-Transfer-Encoding":"7bit","X-Provags-ID":"V03:K0:jw7faWDnovbKF/D3veu5p+7oY66+WH2B4XY4osTeMX89mEmn0hO\n\t6Ivn8hghWhsVRWoVgLafjfmvk/tNbI/YNVlxeaDZDrzPerxw/X5eRUWGYqJllzooMKTVM+7\n\tHfFzX3fn8TD8nzJVXGEXkCvjKAzRklbnEDvKVdeqTyq3ui7EM23VtoyIGoiFrxb0cdpTH+E\n\tpqQZUq8sy0yxaJ0MrrMQw==","X-UI-Out-Filterresults":"notjunk:1; V01:K0:IVJDKHsvB8c=:7/Yj9ANpdyT8aPnF5tkjUN\n\tX9AmlLYa5dzyxvmnHFoIoewQkuHUiC9x4putmvTLyi0WvAUO9/uUyel1UoJhga9PiuGsGbGQr\n\tCiEIKAyVPDfiIanV3E29mvZdn9tK0Geg2XZ8cHP09rfIP2iYYsh0TBDjpdlcMfaoBtrnWOVZ0\n\tV4gAzQAaYbqV1Jrek+RDK6WTM1N6rc7xYlhN0F8vhBTPRXgp6Z/lW/5xyCaa00MBw/cHZ79/r\n\tZwuK2IBOE8z79jV1X15o4/l93jnvFuEM0nnGJLBrSu7VV7Vzj5zepLa/VEeQ4yq/fGtIe2Bie\n\tmdPa3/nyektRDolSiK1eAv8U7zUfxrjGzqrhmNYo/F/JxYGuQL5E5LYhHpLBP1ucv7GjqhXRJ\n\tBwSW7y41paU30GdGUSRwxvnDg4lATjzhJMbytklD5FvWO7uJWqy4sWISavrL96J8lPcGnbCWi\n\tpDU0kzsW8jMeYmy8E6erZhfz1LcGGPeLy63z5NNEQeJiuXqOYyq20KAZmPETN/bTQsVjS6nOe\n\tvPMY0B2DoN03LMR8VmeiVvJOsGheHU6dc/bAYtSSKmVZYZ25bFZIJxyKP8G6Po299zOKUY09G\n\tietScW1bdp9km3OeIP0Edk3zQ4sQR7g4Tn1hbsZjXw2C7YCAn/BG6TtQNyabLp0tIHvWHOITI\n\t7pDLVO1ZF/pN+RBcDj1Jeh6lccyvFQrG0iEAR6qcjBtLrzRpAuW5eM6V41qWYf0+LpaNp2x0E\n\tkHy86BS31C9qZlW/ipfS7D5O4N6zMnQ3NIiaW8LMpnRj1Fl0NGm2kIoSIyHxDRtE/R8D8RF2k\n\trMftYyKLQ2X9aIKGRzizet5DBdGG2+YNyS6RP4EVt/1N3Ujq28=","X-BeenThere":"linuxppc-dev@lists.ozlabs.org","X-Mailman-Version":"2.1.23","Precedence":"list","List-Id":"Linux on PowerPC Developers Mail List\n\t<linuxppc-dev.lists.ozlabs.org>","List-Unsubscribe":"<https://lists.ozlabs.org/options/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=unsubscribe>","List-Archive":"<http://lists.ozlabs.org/pipermail/linuxppc-dev/>","List-Post":"<mailto:linuxppc-dev@lists.ozlabs.org>","List-Help":"<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=help>","List-Subscribe":"<https://lists.ozlabs.org/listinfo/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=subscribe>","Cc":"kernel-janitors@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>","Errors-To":"linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org","Sender":"\"Linuxppc-dev\"\n\t<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>"},"content":"From: Markus Elfring <elfring@users.sourceforge.net>\nDate: Fri, 4 Aug 2017 16:37:56 +0200\n\nOmit an extra message for a memory allocation failure in these functions.\n\nThis issue was detected by using the Coccinelle software.\n\nLink: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf\nSigned-off-by: Markus Elfring <elfring@users.sourceforge.net>\n---\n arch/powerpc/kernel/eeh_dev.c   | 5 +----\n arch/powerpc/kernel/eeh_event.c | 5 ++---\n 2 files changed, 3 insertions(+), 7 deletions(-)","diff":"diff --git a/arch/powerpc/kernel/eeh_dev.c b/arch/powerpc/kernel/eeh_dev.c\nindex d6b2ca70d14d..2742ecbadf18 100644\n--- a/arch/powerpc/kernel/eeh_dev.c\n+++ b/arch/powerpc/kernel/eeh_dev.c\n@@ -55,11 +55,8 @@ struct eeh_dev *eeh_dev_init(struct pci_dn *pdn)\n \n \t/* Allocate EEH device */\n \tedev = kzalloc(sizeof(*edev), GFP_KERNEL);\n-\tif (!edev) {\n-\t\tpr_warn(\"%s: out of memory\\n\",\n-\t\t\t__func__);\n+\tif (!edev)\n \t\treturn NULL;\n-\t}\n \n \t/* Associate EEH device with OF node */\n \tpdn->edev = edev;\ndiff --git a/arch/powerpc/kernel/eeh_event.c b/arch/powerpc/kernel/eeh_event.c\nindex accbf8b5fd46..c62bd90e038f 100644\n--- a/arch/powerpc/kernel/eeh_event.c\n+++ b/arch/powerpc/kernel/eeh_event.c\n@@ -132,10 +132,9 @@ int eeh_send_failure_event(struct eeh_pe *pe)\n \tstruct eeh_event *event;\n \n \tevent = kzalloc(sizeof(*event), GFP_ATOMIC);\n-\tif (!event) {\n-\t\tpr_err(\"EEH: out of memory, event not handled\\n\");\n+\tif (!event)\n \t\treturn -ENOMEM;\n-\t}\n+\n \tevent->pe = pe;\n \n \t/* We may or may not be called in an interrupt context */\n","prefixes":[]}