src/console: Reformat code

Most of these changes are suggested by clang-format(13.0-54) tool on
Debian testing.

Change-Id: I68a288b3f7e911331e7324bf13cf9bde259a29de
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/64781
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
This commit is contained in:
Elyes Haouas
2022-05-29 15:34:41 +02:00
committed by Felix Held
parent c705ecd2eb
commit d0033e363f
2 changed files with 23 additions and 26 deletions

View File

@@ -64,6 +64,5 @@ void console_init(void)
cbmem_dump_console();
printk(BIOS_NOTICE, "\n\ncoreboot-%s%s %s " ENV_STRING " starting (log level: %i)...\n",
coreboot_version, coreboot_extra_version, coreboot_build,
get_log_level());
coreboot_version, coreboot_extra_version, coreboot_build, get_log_level());
}

View File

@@ -19,9 +19,8 @@
#define SPECIAL 32 /* 0x */
#define LARGE 64 /* use 'ABCDEF' instead of 'abcdef' */
static int number(void (*tx_byte)(unsigned char byte, void *data),
unsigned long long inum, int base, int size, int precision, int type,
void *data)
static int number(void (*tx_byte)(unsigned char byte, void *data), unsigned long long inum,
int base, int size, int precision, int type, void *data)
{
char c, sign, tmp[66];
const char *digits = "0123456789abcdef";
@@ -99,8 +98,8 @@ static int number(void (*tx_byte)(unsigned char byte, void *data),
return count;
}
int vtxprintf(void (*tx_byte)(unsigned char byte, void *data),
const char *fmt, va_list args, void *data)
int vtxprintf(void (*tx_byte)(unsigned char byte, void *data), const char *fmt, va_list args,
void *data)
{
int len;
unsigned long long num;
@@ -215,8 +214,7 @@ repeat:
if (field_width == -1 && precision == -1)
precision = 2 * sizeof(uint32_t);
flags |= SPECIAL;
count += number(tx_byte,
(unsigned long) va_arg(args, void *), 16,
count += number(tx_byte, (unsigned long)va_arg(args, void *), 16,
field_width, precision, flags, data);
continue;