From: Joel Stanley <joel@jms.id.au>
To: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
sparclinux@vger.kernel.org
Cc: rusty@rustcorp.com.au, fabf@skynet.be, jk@ozlabs.org,
akpm@linux-foundation.org, davem@davemloft.net
Subject: [PATCH v2 1/3] envctrl: Ignore orderly_poweroff return value
Date: Wed, 1 Apr 2015 17:34:46 +1030 [thread overview]
Message-ID: <1427871888-27331-1-git-send-email-joel@jms.id.au> (raw)
orderly_poweroff() unconditionally returns 0, so remove the dead code
that checks the return value.
A future patch will change the return type to void.
Signed-off-by: Joel Stanley <joel@jms.id.au>
---
drivers/sbus/char/bbc_envctrl.c | 3 +--
drivers/sbus/char/envctrl.c | 7 +------
2 files changed, 2 insertions(+), 8 deletions(-)
diff --git a/drivers/sbus/char/bbc_envctrl.c b/drivers/sbus/char/bbc_envctrl.c
index 0787b97..228c782 100644
--- a/drivers/sbus/char/bbc_envctrl.c
+++ b/drivers/sbus/char/bbc_envctrl.c
@@ -160,8 +160,7 @@ static void do_envctrl_shutdown(struct bbc_cpu_temperature *tp)
printk(KERN_CRIT "kenvctrld: Shutting down the system now.\n");
shutting_down = 1;
- if (orderly_poweroff(true) < 0)
- printk(KERN_CRIT "envctrl: shutdown execution failed\n");
+ orderly_poweroff(true);
}
#define WARN_INTERVAL (30 * HZ)
diff --git a/drivers/sbus/char/envctrl.c b/drivers/sbus/char/envctrl.c
index af15a2f..7946852 100644
--- a/drivers/sbus/char/envctrl.c
+++ b/drivers/sbus/char/envctrl.c
@@ -970,18 +970,13 @@ static struct i2c_child_t *envctrl_get_i2c_child(unsigned char mon_type)
static void envctrl_do_shutdown(void)
{
static int inprog = 0;
- int ret;
if (inprog != 0)
return;
inprog = 1;
printk(KERN_CRIT "kenvctrld: WARNING: Shutting down the system now.\n");
- ret = orderly_poweroff(true);
- if (ret < 0) {
- printk(KERN_CRIT "kenvctrld: WARNING: system shutdown failed!\n");
- inprog = 0; /* unlikely to succeed, but we could try again */
- }
+ orderly_poweroff(true);
}
static struct task_struct *kenvctrld_task;
--
2.1.4
next reply other threads:[~2015-04-01 7:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-01 7:04 Joel Stanley [this message]
2015-04-01 7:04 ` [PATCH v2 2/3] kernel/reboot.c: Add orderly_reboot for graceful reboot Joel Stanley
2015-04-01 22:27 ` Julian Calaby
2015-04-01 7:04 ` [PATCH v2 3/3] powerpc/powernv: Reboot when requested by firmware Joel Stanley
2015-04-01 16:18 ` [PATCH v2 1/3] envctrl: Ignore orderly_poweroff return value David Miller
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=1427871888-27331-1-git-send-email-joel@jms.id.au \
--to=joel@jms.id.au \
--cc=akpm@linux-foundation.org \
--cc=davem@davemloft.net \
--cc=fabf@skynet.be \
--cc=jk@ozlabs.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=rusty@rustcorp.com.au \
--cc=sparclinux@vger.kernel.org \
/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).