mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Antony Pavlov <antonynpavlov@gmail.com>
To: barebox@lists.infradead.org
Subject: [PATCH 2/2] CONFIG_PANIC_HANG: replace #ifdef with IS_ENABLED()
Date: Sun,  4 Aug 2013 12:46:02 +0400	[thread overview]
Message-ID: <1375605962-4683-3-git-send-email-antonynpavlov@gmail.com> (raw)
In-Reply-To: <1375605962-4683-1-git-send-email-antonynpavlov@gmail.com>

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
---
 lib/vsprintf.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/lib/vsprintf.c b/lib/vsprintf.c
index d931340..c73db73 100644
--- a/lib/vsprintf.c
+++ b/lib/vsprintf.c
@@ -630,11 +630,11 @@ void __noreturn panic(const char *fmt, ...)
 
 	led_trigger(LED_TRIGGER_PANIC, TRIGGER_ENABLE);
 
-#if defined (CONFIG_PANIC_HANG)
-	hang();
-#else
-	udelay(100000);	/* allow messages to go out */
-	reset_cpu(0);
-#endif
+	if (IS_ENABLED(CONFIG_PANIC_HANG)) {
+		hang();
+	} else {
+		udelay(100000);	/* allow messages to go out */
+		reset_cpu(0);
+	}
 }
 EXPORT_SYMBOL(panic);
-- 
1.8.3.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2013-08-04  8:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-04  8:46 [PATCH 0/2] resurrect CONFIG_PANIC_HANG option Antony Pavlov
2013-08-04  8:46 ` [PATCH 1/2] " Antony Pavlov
2013-08-04  8:46 ` Antony Pavlov [this message]
2013-08-05 10:14 ` [PATCH 0/2] " Sascha Hauer

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=1375605962-4683-3-git-send-email-antonynpavlov@gmail.com \
    --to=antonynpavlov@gmail.com \
    --cc=barebox@lists.infradead.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