diff options
author | Philippe Schenker | 2022-06-13 19:35:22 +0200 |
---|---|---|
committer | Tom Rini | 2022-07-06 14:30:08 -0400 |
commit | 494ef10c3bf7859e7d21d9e1d608dc0b634451c2 (patch) | |
tree | 1152e6404949b53febb95928b69be0e2369c748d /board | |
parent | 39ff0624bc5ad287fced0f60be9b977d07b1813a (diff) |
toradex: tdx-cfg-block: use defines for string length
With those defines the length can be reused and is in one place
extendable.
Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
Reviewed-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Diffstat (limited to 'board')
-rw-r--r-- | board/toradex/common/tdx-common.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/board/toradex/common/tdx-common.c b/board/toradex/common/tdx-common.c index 2207818447a..94e603c14f4 100644 --- a/board/toradex/common/tdx-common.c +++ b/board/toradex/common/tdx-common.c @@ -22,13 +22,17 @@ #define TORADEX_OUI 0x00142dUL +#define SERIAL_STR_LEN 8 +#define MODULE_VER_STR_LEN 4 // V1.1 +#define MODULE_REV_STR_LEN 1 // [A-Z] + #ifdef CONFIG_TDX_CFG_BLOCK -static char tdx_serial_str[9]; -static char tdx_board_rev_str[6]; +static char tdx_serial_str[SERIAL_STR_LEN + 1]; +static char tdx_board_rev_str[MODULE_VER_STR_LEN + MODULE_REV_STR_LEN + 1]; #ifdef CONFIG_TDX_CFG_BLOCK_EXTRA -static char tdx_car_serial_str[9]; -static char tdx_car_rev_str[6]; +static char tdx_car_serial_str[SERIAL_STR_LEN + 1]; +static char tdx_car_rev_str[MODULE_VER_STR_LEN + MODULE_REV_STR_LEN + 1]; static char *tdx_carrier_board_name; #endif |