Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: SF Markus Elfring <elfring@users.sourceforge.net>
To: linux-mips@linux-mips.org, "Ingo Molnar" <mingo@kernel.org>,
	"James Hogan" <james.hogan@imgtec.com>,
	"Kees Cook" <keescook@chromium.org>,
	"Marcin Nowakowski" <marcin.nowakowski@imgtec.com>,
	"Masahiro Yamada" <yamada.masahiro@socionext.com>,
	"Matt Redfearn" <matt.redfearn@imgtec.com>,
	"Paul Burton" <paul.burton@imgtec.com>,
	"Ralf Bächle" <ralf@linux-mips.org>,
	"Thomas Gleixner" <tglx@linutronix.de>
Cc: LKML <linux-kernel@vger.kernel.org>, kernel-janitors@vger.kernel.org
Subject: [PATCH 2/5] MIPS: smp-cps: Delete error messages for failed memory allocations in cps_prepare_cpus()
Date: Tue, 23 May 2017 22:52:20 +0200	[thread overview]
Message-ID: <3e8f04ae-8457-0531-e38e-0e682b99ed3f@users.sourceforge.net> (raw)
In-Reply-To: <e866716c-5ce4-3658-f944-e310007db127@users.sourceforge.net>

From: Markus Elfring <elfring@users.sourceforge.net>
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 <elfring@users.sourceforge.net>
---
 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

  parent reply	other threads:[~2017-05-23 20:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-23 20:50 [PATCH 0/5] MIPS-kernel: Adjustments for some function implementations SF Markus Elfring
2017-05-23 20:51 ` [PATCH 1/5] MIPS: pm-cps: Delete an error message for a failed memory allocation in cps_pm_online_cpu() SF Markus Elfring
2017-05-23 20:52 ` SF Markus Elfring [this message]
2017-05-23 20:53 ` [PATCH 3/5] MIPS: VPE: Delete an error message for a failed memory allocation in vpe_open() SF Markus Elfring
2017-05-23 20:54 ` [PATCH 4/5] MIPS: VPE: Improve a size determination in two functions SF Markus Elfring
2017-05-23 20:55 ` [PATCH 5/5] MIPS: VPE: Adjust 13 checks for null pointers SF Markus Elfring
2017-05-23 21:11 ` [PATCH 0/5] MIPS-kernel: Adjustments for some function implementations Joe Perches

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3e8f04ae-8457-0531-e38e-0e682b99ed3f@users.sourceforge.net \
    --to=elfring@users.sourceforge.net \
    --cc=james.hogan@imgtec.com \
    --cc=keescook@chromium.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=marcin.nowakowski@imgtec.com \
    --cc=matt.redfearn@imgtec.com \
    --cc=mingo@kernel.org \
    --cc=paul.burton@imgtec.com \
    --cc=ralf@linux-mips.org \
    --cc=tglx@linutronix.de \
    --cc=yamada.masahiro@socionext.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox