summaryrefslogtreecommitdiff
path: root/src/lib/gcov-glue.c
diff options
context:
space:
mode:
authorMartin Roth <martinroth@google.com>2017-06-24 14:16:38 -0600
committerMartin Roth <martinroth@google.com>2017-07-06 00:19:37 +0000
commit1bf55b4070bef2be8259f3153cade27121127b4a (patch)
tree01df7a81ffbc396d15d1d91ce0de0e54f59573b4 /src/lib/gcov-glue.c
parent5764cbbf91cf80c21f7e6b819526ebd074049551 (diff)
downloadcoreboot-1bf55b4070bef2be8259f3153cade27121127b4a.tar.xz
src/lib: add IS_ENABLED() around Kconfig symbol references
Some of these can be changed from #if to if(), but that will happen in a follow-on commmit. Change-Id: Idcea3f8b1a4246cb6b29999a84a191a3133e5c78 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/20341 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'src/lib/gcov-glue.c')
-rw-r--r--src/lib/gcov-glue.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/lib/gcov-glue.c b/src/lib/gcov-glue.c
index a002ea790f..7edc90a221 100644
--- a/src/lib/gcov-glue.c
+++ b/src/lib/gcov-glue.c
@@ -41,7 +41,7 @@ static FILE *previous_file = NULL;
static FILE *fopen(const char *path, const char *mode)
{
-#if CONFIG_DEBUG_COVERAGE
+#if IS_ENABLED(CONFIG_DEBUG_COVERAGE)
printk(BIOS_DEBUG, "fopen %s with mode %s\n",
path, mode);
#endif
@@ -74,7 +74,7 @@ static FILE *fopen(const char *path, const char *mode)
static int fclose(FILE *stream)
{
-#if CONFIG_DEBUG_COVERAGE
+#if IS_ENABLED(CONFIG_DEBUG_COVERAGE)
printk(BIOS_DEBUG, "fclose %s\n", stream->filename);
#endif
return 0;
@@ -85,7 +85,7 @@ static int fseek(FILE *stream, long offset, int whence)
/* fseek should only be called with offset==0 and whence==SEEK_SET
* to a freshly opened file. */
gcc_assert(offset == 0 && whence == SEEK_SET);
-#if CONFIG_DEBUG_COVERAGE
+#if IS_ENABLED(CONFIG_DEBUG_COVERAGE)
printk(BIOS_DEBUG, "fseek %s offset=%ld whence=%d\n",
stream->filename, offset, whence);
#endif
@@ -96,7 +96,7 @@ static long ftell(FILE *stream)
{
/* ftell should currently not be called */
gcc_assert(0);
-#if CONFIG_DEBUG_COVERAGE
+#if IS_ENABLED(CONFIG_DEBUG_COVERAGE)
printk(BIOS_DEBUG, "ftell %s\n", stream->filename);
#endif
return 0;
@@ -104,7 +104,7 @@ static long ftell(FILE *stream)
static size_t fread(void *ptr, size_t size, size_t nmemb, FILE *stream)
{
-#if CONFIG_DEBUG_COVERAGE
+#if IS_ENABLED(CONFIG_DEBUG_COVERAGE)
printk(BIOS_DEBUG, "fread: ptr=%p size=%zd nmemb=%zd FILE*=%p\n",
ptr, size, nmemb, stream);
#endif
@@ -113,7 +113,7 @@ static size_t fread(void *ptr, size_t size, size_t nmemb, FILE *stream)
static size_t fwrite(const void *ptr, size_t size, size_t nmemb, FILE *stream)
{
-#if CONFIG_DEBUG_COVERAGE
+#if IS_ENABLED(CONFIG_DEBUG_COVERAGE)
printk(BIOS_DEBUG, "fwrite: %zd * %zd bytes to file %s\n",
nmemb, size, stream->filename);
#endif
@@ -145,7 +145,7 @@ static void coverage_init(void *unused)
void __gcov_flush(void);
static void coverage_exit(void *unused)
{
-#if CONFIG_DEBUG_COVERAGE
+#if IS_ENABLED(CONFIG_DEBUG_COVERAGE)
printk(BIOS_DEBUG, "Syncing coverage data.\n");
#endif
__gcov_flush();