From b5fdbc21bf7c86e6b11d67cf941b4efed36280fb Mon Sep 17 00:00:00 2001 From: Pisit Sawangvonganan Date: Sat, 29 Jun 2024 01:28:05 +0700 Subject: [PATCH] modem: cmux: optimize `modem_cmux_frame` structure padding Downsize `dlci_address` field from `uint16_t` to `uint8_t` in `modem_cmux_frame` for better memory alignment. Note: The maximum value of `dlci_address` is 63, which fits within `uint8_t`. Signed-off-by: Pisit Sawangvonganan --- include/zephyr/modem/cmux.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/zephyr/modem/cmux.h b/include/zephyr/modem/cmux.h index 3d655db04a4188..f1fa0beec32a54 100644 --- a/include/zephyr/modem/cmux.h +++ b/include/zephyr/modem/cmux.h @@ -111,7 +111,7 @@ struct modem_cmux_dlci { }; struct modem_cmux_frame { - uint16_t dlci_address; + uint8_t dlci_address; bool cr; bool pf; uint8_t type;