[coreboot-gerrit] Patch set updated for coreboot: 54c590d src/console: Sanitize headers and IS_ENABLED usage

Edward O'Callaghan (eocallaghan@alterapraxis.com) gerrit at coreboot.org
Sun Jun 22 12:01:27 CEST 2014


Edward O'Callaghan (eocallaghan at alterapraxis.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/6057

-gerrit

commit 54c590dec8d49a00c7f6f4955cae7ea396856eb2
Author: Edward O'Callaghan <eocallaghan at alterapraxis.com>
Date:   Tue Jun 17 18:37:08 2014 +1000

    src/console: Sanitize headers and IS_ENABLED usage
    
    Alphabetise headers and remove any #if CONFIG_ guards around them.
    Use #if IS_ENABLED(CONFIG_FOO) over #if CONFIG_FOO where applicable.
    
    Change-Id: I2a616bcfb8470a1fa21c9e26271e81cca835272a
    Signed-off-by: Edward O'Callaghan <eocallaghan at alterapraxis.com>
---
 src/console/console.c   | 10 +++++-----
 src/console/printk.c    | 14 +++++++-------
 src/console/vsprintf.c  |  2 +-
 src/console/vtxprintf.c |  2 +-
 4 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/src/console/console.c b/src/console/console.c
index bd03144..ff4b3e4 100644
--- a/src/console/console.c
+++ b/src/console/console.c
@@ -17,14 +17,14 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
-#include <rules.h>
-#include <console/streams.h>
 #include <console/cbmem_console.h>
-#include <console/uart.h>
-#include <console/usb.h>
 #include <console/ne2k.h>
-#include <console/spkmodem.h>
 #include <console/qemu_debugcon.h>
+#include <console/spkmodem.h>
+#include <console/streams.h>
+#include <console/uart.h>
+#include <console/usb.h>
+#include <rules.h>
 
 void console_hw_init(void)
 {
diff --git a/src/console/printk.c b/src/console/printk.c
index 40ea404..b6777e1 100644
--- a/src/console/printk.c
+++ b/src/console/printk.c
@@ -5,12 +5,12 @@
  *
  */
 
-#include <stddef.h>
-#include <smp/node.h>
-#include <smp/spinlock.h>
-#include <console/vtxprintf.h>
 #include <console/console.h>
 #include <console/streams.h>
+#include <console/vtxprintf.h>
+#include <smp/spinlock.h>
+#include <smp/node.h>
+#include <stddef.h>
 #include <trace.h>
 
 DECLARE_SPIN_LOCK(console_lock)
@@ -35,7 +35,7 @@ int do_printk(int msg_level, const char *fmt, ...)
 	if (!console_log_level(msg_level))
 		return 0;
 
-#if CONFIG_SQUELCH_EARLY_SMP && defined(__PRE_RAM__)
+#if IS_ENABLED (CONFIG_SQUELCH_EARLY_SMP) && defined(__PRE_RAM__)
 	if (!boot_cpu())
 		return 0;
 #endif
@@ -55,10 +55,10 @@ int do_printk(int msg_level, const char *fmt, ...)
 	return i;
 }
 
-#if CONFIG_CHROMEOS
+#if IS_ENABLED (CONFIG_CHROMEOS)
 void do_vtxprintf(const char *fmt, va_list args)
 {
 	vtxprintf(wrap_putchar, fmt, args, NULL);
 	console_tx_flush();
 }
-#endif
+#endif /* CONFIG_CHROMEOS */
diff --git a/src/console/vsprintf.c b/src/console/vsprintf.c
index fd6646b..d0ddfc1 100644
--- a/src/console/vsprintf.c
+++ b/src/console/vsprintf.c
@@ -19,8 +19,8 @@
  * MA 02110-1301 USA
  */
 
-#include <string.h>
 #include <console/vtxprintf.h>
+#include <string.h>
 #include <trace.h>
 
 struct vsnprintf_context
diff --git a/src/console/vtxprintf.c b/src/console/vtxprintf.c
index 23db037..b515fb8 100644
--- a/src/console/vtxprintf.c
+++ b/src/console/vtxprintf.c
@@ -4,9 +4,9 @@
  *  Copyright (C) 1991, 1992  Linus Torvalds
  */
 
-#include <string.h>
 #include <console/console.h>
 #include <console/vtxprintf.h>
+#include <string.h>
 
 #define call_tx(x) tx_byte(x, data)
 



More information about the coreboot-gerrit mailing list