Fixing checkpatch.pl warnings.
Most warnings are "Missing a blank line after declarations". I'm also
adding blank lines between multi-line comments and statements.
Ran with --ignore BRACES,SPDX_LICENSE_TAG,VOLATILE,SPLIT_STRING,
AVOID_EXTERNS,USE_SPINLOCK_T,NEW_TYPEDEFS,INITIALISED_STATIC,
FILE_PATH_CHANGES to reduce noise. Now there is only one type of
warning, with two instances:
WARNING: Prefer using '"%s...", __func__' to using 'dmb', this function's name, in a string
+ __asm__ volatile("dmb sy");
WARNING: Prefer using '"%s...", __func__' to using 'dsb', this function's name, in a string
+ __asm__ volatile("dsb sy");
Change-Id: Id837feef86dc81ba84de1809e76653ddce814422
diff --git a/src/dlog.c b/src/dlog.c
index 51ba6fb..322c054 100644
--- a/src/dlog.c
+++ b/src/dlog.c
@@ -222,6 +222,7 @@
/* Read minimum width from arguments. */
if (w == 0 && p[1] == '*') {
int v = va_arg(args, int);
+
if (v >= 0) {
w = v;
} else {
@@ -235,6 +236,7 @@
switch (p[1]) {
case 's': {
char *str = va_arg(args, char *);
+
print_string(str, str, w, flags, ' ');
p++;
} break;
@@ -242,6 +244,7 @@
case 'd':
case 'i': {
int v = va_arg(args, int);
+
if (v < 0) {
flags |= FLAG_NEG;
v = -v;