From e7b5920b107e22a42efe26c37bd71e8d817477c1 Mon Sep 17 00:00:00 2001 From: Marc Kleine-Budde Date: Sat, 15 Jan 2022 23:31:25 +0100 Subject: [PATCH] can-calc-bit-timing: beautify btr register printing Signed-off-by: Marc Kleine-Budde --- can-calc-bit-timing.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/can-calc-bit-timing.c b/can-calc-bit-timing.c index 5d4bc82..9cf215a 100644 --- a/can-calc-bit-timing.c +++ b/can-calc-bit-timing.c @@ -205,7 +205,7 @@ static void printf_btr_sja1000(struct can_bittiming *bt, bool hdr) uint8_t btr0, btr1; if (hdr) { - printf("BTR0 BTR1"); + printf("%9s", "BTR0 BTR1"); } else { btr0 = ((bt->brp - 1) & 0x3f) | (((bt->sjw - 1) & 0x3) << 6); btr1 = ((bt->prop_seg + bt->phase_seg1 - 1) & 0xf) | @@ -260,7 +260,7 @@ static void printf_btr_mcp251x(struct can_bittiming *bt, bool hdr) static void printf_btr_mcp251xfd(struct can_bittiming *bt, bool hdr) { if (hdr) { - printf("NBTCFG"); + printf("%10s", "NBTCFG"); } else { uint32_t nbtcfg = ((bt->brp - 1) << 24) | ((bt->prop_seg + bt->phase_seg1 - 1) << 16) | @@ -327,7 +327,7 @@ static void printf_btr_bxcan(struct can_bittiming *bt, bool hdr) static void printf_btr_c_can(struct can_bittiming *bt, bool hdr) { if (hdr) { - printf("%s", " BTR BRPEXT"); + printf("%13s", "BTR BRPEXT"); } else { uint32_t btr; uint32_t brpext;