Skip to content

Commit

Permalink
modem: cmux: optimize modem_cmux_frame structure padding
Browse files Browse the repository at this point in the history
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 <pisit@ndrsolution.com>
  • Loading branch information
ndrs-pst authored and nashif committed Jul 27, 2024
1 parent c43b20e commit b5fdbc2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/zephyr/modem/cmux.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b5fdbc2

Please sign in to comment.