linux-kernel.vger.kernel.org archive mirror
 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 1/5] MIPS: pm-cps: Delete an error message for a failed memory allocation in cps_pm_online_cpu()
Date: Tue, 23 May 2017 22:51:20 +0200	[thread overview]
Message-ID: <b4a16560-9557-8d4c-d46c-2dd658bfa036@users.sourceforge.net> (raw)
In-Reply-To: <e866716c-5ce4-3658-f944-e310007db127@users.sourceforge.net>

>From c7eaa7be6235b37023b23b40b36737f72e5b4b3f Mon Sep 17 00:00:00 2001
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Tue, 23 May 2017 21:30:11 +0200
Subject: [PATCH 1/5] MIPS: pm-cps: Delete an error message for a failed memory allocation in cps_pm_online_cpu()

Omit an extra message for a memory allocation failure 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/pm-cps.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/arch/mips/kernel/pm-cps.c b/arch/mips/kernel/pm-cps.c
index 5f928c34c148..d662838e418f 100644
--- a/arch/mips/kernel/pm-cps.c
+++ b/arch/mips/kernel/pm-cps.c
@@ -666,7 +666,6 @@ static int cps_pm_online_cpu(unsigned int cpu)
-		if (!core_rc) {
-			pr_err("Failed allocate core %u ready_count\n", core);
+		if (!core_rc)
 			return -ENOMEM;
-		}
+
 		per_cpu(ready_count_alloc, core) = core_rc;
 
 		/* Ensure ready_count is aligned to a cacheline boundary */
-- 
2.13.0

  reply	other threads:[~2017-05-23 20:51 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 ` SF Markus Elfring [this message]
2017-05-23 20:52 ` [PATCH 2/5] MIPS: smp-cps: Delete error messages for failed memory allocations in cps_prepare_cpus() SF Markus Elfring
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=b4a16560-9557-8d4c-d46c-2dd658bfa036@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;
as well as URLs for NNTP newsgroup(s).