From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161407AbdEWUwl (ORCPT ); Tue, 23 May 2017 16:52:41 -0400 Received: from mout.web.de ([212.227.15.4]:63542 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1033892AbdEWUwf (ORCPT ); Tue, 23 May 2017 16:52:35 -0400 Subject: [PATCH 2/5] MIPS: smp-cps: Delete error messages for failed memory allocations in cps_prepare_cpus() From: SF Markus Elfring To: linux-mips@linux-mips.org, Ingo Molnar , James Hogan , Kees Cook , Marcin Nowakowski , Masahiro Yamada , Matt Redfearn , Paul Burton , =?UTF-8?Q?Ralf_B=c3=a4chle?= , Thomas Gleixner Cc: LKML , kernel-janitors@vger.kernel.org References: Message-ID: <3e8f04ae-8457-0531-e38e-0e682b99ed3f@users.sourceforge.net> Date: Tue, 23 May 2017 22:52:20 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:m34kLJpDdHW9AmSk1aJ3P+5DZSpxu/YjTp8w653DF8bBd6gOF3o 1bEo6sqQxkHE2BKn7w3ibxdpBZ5ZQIkw/NrOi8+98zOmFXtA/4fyJxenqchiAdAb3I0Kmnx e0VlRl1eDEuV40+GHUNagL5a4pgTu3BqGB00MgTJOSeV6Rflr2zWosuGEKtOG40s+5f0Off DWFR3psOfh9Q/R0YL5dYA== X-UI-Out-Filterresults: notjunk:1;V01:K0:mcGrjD4rc3Y=:d2+plXL91iQr0OBJjuEZfy 7qQd09kOXjvOwaFmRtiIJbw4xpQl7x/Rjh57SvX4J0Sagwn/GeytCTINblbmyJ5V565Nye5St EFEtD4Woz8ictoFcLN+JAI3ZnU1iYQ2q1FX39mD9zK4DuzXkT3JPn7kxiG8bOcwxgY40wrTPT bxtfd8MloowFTuZj6rtl1/bHercMs5JRIi/AhsczWVEDtja7uPjZM0uanFewUu/GTTGcRIo4Y FnGD6dhuz+zhlo6oELqiZP5r4lRuMw4LL0t/wkfjSMEp/XnF+fHpLZIJU1pu4jzz1ReqbhnN/ 0BIzT0SOAKeuRxMYMkIgxOrysDxY1xFvYksVvogvdh53Aj171GwFkBMIwbfbjrdPhlPrqvylG T105BRFUw2lNrugL3r3hXqnNlWdxy5v0ZT+Ly0PqDw+6Zmk2zPik/7DP4XQ7lORE/+9X0uv0K 657siaR55/kFjmk77ekq0M7xQnIoERzUi5Kw/RUI30ag1DDbOcHmp3o99rgXKrn8o5U9gri9P YKefdd0cUAGF4SbLxh528pd3LDzP3O83hM+reapwlDewNbo9L5IrYtIQqlvA8vuzYX9zx4RtU bu2HE5Vos5JGjq+njzm/s4VAD45olS2A2Dn5049C7Kzx1+CIZ9ZL19/kaf8zKoAU4XNibezt1 vd2hcvvj3wJX8880twT29NMBumTfzO+oDj0i/8IwSY2CqO0vi6u/XpL0hZZqSx265ZzaKP6fY O4AxA0qp6GLAQ/VPXYjm0JQc04wbl/fmRNqEKjGRcYeMc8cgKM+f0gDvcxPUTpCeTdtjrtm0G xN98MAV Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Markus Elfring Date: Tue, 23 May 2017 21:41:32 +0200 Omit two extra messages for memory allocation failures in this function. This issue was detected by using the Coccinelle software. Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf Signed-off-by: Markus Elfring --- arch/mips/kernel/smp-cps.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/arch/mips/kernel/smp-cps.c b/arch/mips/kernel/smp-cps.c index 36954ddd0b9f..bc8d7f6a62c2 100644 --- a/arch/mips/kernel/smp-cps.c +++ b/arch/mips/kernel/smp-cps.c @@ -171,7 +171,5 @@ static void __init cps_prepare_cpus(unsigned int max_cpus) - if (!mips_cps_core_bootcfg) { - pr_err("Failed to allocate boot config for %u cores\n", ncores); + if (!mips_cps_core_bootcfg) goto err_out; - } /* Allocate VPE boot configuration structs */ for (c = 0; c < ncores; c++) { @@ -182,8 +180,5 @@ static void __init cps_prepare_cpus(unsigned int max_cpus) - if (!mips_cps_core_bootcfg[c].vpe_config) { - pr_err("Failed to allocate %u VPE boot configs\n", - core_vpes); + if (!mips_cps_core_bootcfg[c].vpe_config) goto err_out; - } } /* Mark this CPU as booted */ -- 2.13.0