<p>Martin Roth has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/20352">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">src/drivers: add IS_ENABLED() around Kconfig symbol references<br><br>Some of these can be changed from #if to if(), but that will happen<br>in a follow-on commmit.<br><br>Change-Id: Ib3a1cf04482a8f19b159c31cfb16a7b492748d91<br>Signed-off-by: Martin Roth <martinroth@google.com><br>---<br>M src/drivers/elog/boot_count.c<br>M src/drivers/elog/elog.c<br>M src/drivers/intel/gma/int15.h<br>M src/drivers/pc80/pc/i8254.c<br>M src/drivers/pc80/rtc/mc146818rtc.c<br>M src/drivers/pc80/rtc/mc146818rtc_romcc.c<br>M src/drivers/uart/util.c<br>M src/drivers/usb/ehci_debug.c<br>8 files changed, 19 insertions(+), 19 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/52/20352/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/src/drivers/elog/boot_count.c b/src/drivers/elog/boot_count.c<br>index 9d717d8..8988287 100644<br>--- a/src/drivers/elog/boot_count.c<br>+++ b/src/drivers/elog/boot_count.c<br>@@ -26,7 +26,7 @@<br>  * This can either be declared as part of the option<br>  * table or statically defined in the board config.<br>  */<br>-#if CONFIG_USE_OPTION_TABLE<br>+#if IS_ENABLED(CONFIG_USE_OPTION_TABLE)<br> # include "option_table.h"<br> # define BOOT_COUNT_CMOS_OFFSET (CMOS_VSTART_boot_count_offset >> 3)<br> #else<br>diff --git a/src/drivers/elog/elog.c b/src/drivers/elog/elog.c<br>index 27b6e29..1c17561 100644<br>--- a/src/drivers/elog/elog.c<br>+++ b/src/drivers/elog/elog.c<br>@@ -13,13 +13,13 @@<br>  * GNU General Public License for more details.<br>  */<br> <br>-#if CONFIG_HAVE_ACPI_RESUME == 1<br>+#if IS_ENABLED(CONFIG_HAVE_ACPI_RESUME)<br> #include <arch/acpi.h><br> #endif<br> #include <bootstate.h><br> #include <cbmem.h><br> #include <console/console.h><br>-#if CONFIG_ARCH_X86<br>+#if IS_ENABLED(CONFIG_ARCH_X86)<br> #include <pc80/mc146818rtc.h><br> #endif<br> #include <bcd.h><br>@@ -786,8 +786,8 @@<br> <br> #if !defined(__SMM__)<br>   /* Log boot count event except in S3 resume */<br>-#if CONFIG_ELOG_BOOT_COUNT == 1<br>-#if CONFIG_HAVE_ACPI_RESUME == 1<br>+#if IS_ENABLED(CONFIG_ELOG_BOOT_COUNT)<br>+#if IS_ENABLED(CONFIG_HAVE_ACPI_RESUME)<br>                if (!acpi_is_wakeup_s3())<br> #endif<br>            elog_add_event_dword(ELOG_TYPE_BOOT, boot_count_read());<br>@@ -796,9 +796,9 @@<br>                 elog_add_event_dword(ELOG_TYPE_BOOT, 0);<br> #endif<br> <br>-#if CONFIG_ARCH_X86<br>+#if IS_ENABLED(CONFIG_ARCH_X86)<br>  /* Check and log POST codes from previous boot */<br>-    if (CONFIG_CMOS_POST)<br>+        if (IS_ENABLED(CONFIG_CMOS_POST))<br>             cmos_post_log();<br> #endif<br> #endif<br>diff --git a/src/drivers/intel/gma/int15.h b/src/drivers/intel/gma/int15.h<br>index db83f6a..4a445e5 100644<br>--- a/src/drivers/intel/gma/int15.h<br>+++ b/src/drivers/intel/gma/int15.h<br>@@ -26,7 +26,7 @@<br> };<br> <br> <br>-#if CONFIG_VGA_ROM_RUN<br>+#if IS_ENABLED(CONFIG_VGA_ROM_RUN)<br> /* Install custom int15 handler for VGA OPROM */<br> void install_intel_vga_int15_handler(int active_lfp, int pfit, int display, int panel_type);<br> #else<br>diff --git a/src/drivers/pc80/pc/i8254.c b/src/drivers/pc80/pc/i8254.c<br>index 5851ec0..eb91bf6 100644<br>--- a/src/drivers/pc80/pc/i8254.c<br>+++ b/src/drivers/pc80/pc/i8254.c<br>@@ -32,7 +32,7 @@<br>         outb(0x12, TIMER1_PORT);<br> }<br> <br>-#if CONFIG_UDELAY_TIMER2<br>+#if IS_ENABLED(CONFIG_UDELAY_TIMER2)<br> static void load_timer2(unsigned int ticks)<br> {<br>   /* Set up the timer gate, turn off the speaker */<br>diff --git a/src/drivers/pc80/rtc/mc146818rtc.c b/src/drivers/pc80/rtc/mc146818rtc.c<br>index 33860b8..0e9a88a 100644<br>--- a/src/drivers/pc80/rtc/mc146818rtc.c<br>+++ b/src/drivers/pc80/rtc/mc146818rtc.c<br>@@ -28,7 +28,7 @@<br> #include <cbfs.h><br> <br> /* There's no way around this include guard. option_table.h is autogenerated */<br>-#if CONFIG_USE_OPTION_TABLE<br>+#if IS_ENABLED(CONFIG_USE_OPTION_TABLE)<br> #include "option_table.h"<br> #else<br> #define LB_CKS_RANGE_START     0<br>diff --git a/src/drivers/pc80/rtc/mc146818rtc_romcc.c b/src/drivers/pc80/rtc/mc146818rtc_romcc.c<br>index 8bebc42..dc4f2ef 100644<br>--- a/src/drivers/pc80/rtc/mc146818rtc_romcc.c<br>+++ b/src/drivers/pc80/rtc/mc146818rtc_romcc.c<br>@@ -1,7 +1,7 @@<br> #include <stdint.h><br> #include <pc80/mc146818rtc.h><br> #include <fallback.h><br>-#if CONFIG_USE_OPTION_TABLE<br>+#if IS_ENABLED(CONFIG_USE_OPTION_TABLE)<br> #include "option_table.h"<br> #endif<br> <br>@@ -19,7 +19,7 @@<br> <br> static int cmos_chksum_valid(void)<br> {<br>-#if CONFIG_USE_OPTION_TABLE<br>+#if IS_ENABLED(CONFIG_USE_OPTION_TABLE)<br>  unsigned char addr;<br>   u16 sum, old_sum;<br> <br>@@ -93,7 +93,7 @@<br> <br> unsigned read_option_lowlevel(unsigned start, unsigned size, unsigned def)<br> {<br>-#if CONFIG_USE_OPTION_TABLE<br>+#if IS_ENABLED(CONFIG_USE_OPTION_TABLE)<br>   unsigned byte;<br> <br>     byte = cmos_read(start/8);<br>diff --git a/src/drivers/uart/util.c b/src/drivers/uart/util.c<br>index e1b83ba..f0f885d 100644<br>--- a/src/drivers/uart/util.c<br>+++ b/src/drivers/uart/util.c<br>@@ -13,14 +13,14 @@<br> <br> #include <console/console.h><br> #include <console/uart.h><br>-#if CONFIG_USE_OPTION_TABLE<br>+#if IS_ENABLED(CONFIG_USE_OPTION_TABLE)<br> #include <option.h><br> #include "option_table.h"<br> #endif<br> <br> unsigned int default_baudrate(void)<br> {<br>-#if !defined(__SMM__) && CONFIG_USE_OPTION_TABLE<br>+#if !defined(__SMM__) && IS_ENABLED(CONFIG_USE_OPTION_TABLE)<br>      static const unsigned baud[8] =<br>               { 115200, 57600, 38400, 19200, 9600, 4800, 2400, 1200 };<br>      unsigned b_index = 0;<br>diff --git a/src/drivers/usb/ehci_debug.c b/src/drivers/usb/ehci_debug.c<br>index cac043e..6fcf683 100644<br>--- a/src/drivers/usb/ehci_debug.c<br>+++ b/src/drivers/usb/ehci_debug.c<br>@@ -33,7 +33,7 @@<br>     struct dbgp_pipe ep_pipe[DBGP_MAX_ENDPOINTS];<br> };<br> <br>-#if CONFIG_DEBUG_USBDEBUG<br>+#if IS_ENABLED(CONFIG_DEBUG_USBDEBUG)<br> static void dbgp_print_data(struct ehci_dbg_port *ehci_debug);<br> static int dbgp_enabled(void);<br> # define dprintk(LEVEL, args...) \<br>@@ -197,7 +197,7 @@<br>                 bytes[i] = (hi >> (8*(i - 4))) & 0xff;<br> }<br> <br>-#if CONFIG_DEBUG_USBDEBUG<br>+#if IS_ENABLED(CONFIG_DEBUG_USBDEBUG)<br> static void dbgp_print_data(struct ehci_dbg_port *ehci_debug)<br> {<br>       u32 ctrl = read32(&ehci_debug->control);<br>@@ -578,7 +578,7 @@<br>  //return ret;<br> <br> next_debug_port:<br>-#if CONFIG_USBDEBUG_DEFAULT_PORT==0<br>+#if CONFIG_USBDEBUG_DEFAULT_PORT == 0<br>     port_map_tried |= (1 << (debug_port - 1));<br>      new_debug_port = ((debug_port-1 + 1) % n_ports) + 1;<br>  if (port_map_tried != ((1 << n_ports) - 1)) {<br>@@ -599,7 +599,7 @@<br>      return -10;<br> }<br> <br>-#if CONFIG_DEBUG_USBDEBUG<br>+#if IS_ENABLED(CONFIG_DEBUG_USBDEBUG)<br> static int dbgp_enabled(void)<br> {<br>    struct dbgp_pipe *globals = &dbgp_ehci_info()->ep_pipe[DBGP_SETUP_EP0];<br></pre><p>To view, visit <a href="https://review.coreboot.org/20352">change 20352</a>. To unsubscribe, visit <a href="https://review.coreboot.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://review.coreboot.org/20352"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: coreboot </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: Ib3a1cf04482a8f19b159c31cfb16a7b492748d91 </div>
<div style="display:none"> Gerrit-Change-Number: 20352 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Martin Roth <martinroth@google.com> </div>