aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDimitris Papastamos <dimitris.papastamos@arm.com>2018-09-12 11:19:05 +0100
committerGitHub <noreply@github.com>2018-09-12 11:19:05 +0100
commite52ed092cde21d13533df32eb68629a980d69b4b (patch)
treed5512b480d1ca8a8a084d1025a3760612f4b43f5
parent072063bc8bc36e289100b8b7e35acd83b3f7ee0f (diff)
parent2adb7867077cb25a2f9d127f5f7c1c775dd6d92a (diff)
downloadplatform_external_arm-trusted-firmware-e52ed092cde21d13533df32eb68629a980d69b4b.tar.gz
platform_external_arm-trusted-firmware-e52ed092cde21d13533df32eb68629a980d69b4b.tar.bz2
platform_external_arm-trusted-firmware-e52ed092cde21d13533df32eb68629a980d69b4b.zip
Merge pull request #1572 from iq250vip/tf_log
Allow setting log level back to compile time value
-rw-r--r--common/tf_log.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/common/tf_log.c b/common/tf_log.c
index 422959f60..070218564 100644
--- a/common/tf_log.c
+++ b/common/tf_log.c
@@ -49,7 +49,7 @@ void tf_log(const char *fmt, ...)
/*
* The helper function to set the log level dynamically by platform. The
* maximum log level is determined by `LOG_LEVEL` build flag at compile time
- * and this helper can set a lower log level than the one at compile.
+ * and this helper can set a lower (or equal) log level than the one at compile.
*/
void tf_log_set_max_level(unsigned int log_level)
{
@@ -57,6 +57,6 @@ void tf_log_set_max_level(unsigned int log_level)
assert((log_level % 10U) == 0U);
/* Cap log_level to the compile time maximum. */
- if (log_level < (unsigned int)LOG_LEVEL)
+ if (log_level <= (unsigned int)LOG_LEVEL)
max_log_level = log_level;
}