Skip to content

subsys: Add MCTP as a subsystem, built on libmctp with bindings #147969

subsys: Add MCTP as a subsystem, built on libmctp with bindings

subsys: Add MCTP as a subsystem, built on libmctp with bindings #147969

Triggered via pull request September 6, 2024 13:55
Status Failure
Total duration 2m 22s
Artifacts 1

compliance.yml

on: pull_request
Run compliance checks on patch series (PR)
2m 15s
Run compliance checks on patch series (PR)
Fit to window
Zoom out
Zoom in

Annotations

4 errors, 1 warning, and 10 notices
Run compliance checks on patch series (PR)
Process completed with exit code 3.
Run compliance checks on patch series (PR): Kconfig.txt#L1
See https://docs.zephyrproject.org/latest/build/kconfig/tips.html for more details. Found references to undefined Kconfig symbols. If any of these are false positives, then add them to UNDEF_KCONFIG_ALLOWLIST in /home/runner/work/zephyr/zephyr/./scripts/ci/check_compliance.py. If the reference is for a comment like /* CONFIG_FOO_* */ (or /* CONFIG_FOO_*_... */), then please use exactly that form (with the '*'). The CI check knows not to flag it. More generally, a reference followed by $, @, {, (, ., *, or ## will never be flagged. CONFIG_MCTP_LOG_LEVEL subsys/mctp/mctp_uart.c:13 CONFIG_MCTP_UART subsys/mctp/CMakeLists.txt:2
Run compliance checks on patch series (PR): Gitlint.txt#L1
See https://docs.zephyrproject.org/latest/contribute/guidelines.html#commit-guidelines for more details Commit 29717fbdf7: 1: T5 Title contains the word 'wip' (case-insensitive): "WIP: uart binding" 1: UC6 Commit message body is empty, should at least have 1 line(s). Commit 7da00bb6ae: 1: UC3 Commit title does not follow [subsystem]: [subject] (and should not start with literal subsys or treewide): "subsys: Add mctp subsystem for native bindings"
Run compliance checks on patch series (PR)
Process completed with exit code 1.
Run compliance checks on patch series (PR): ClangFormat.txt#L1
See https://docs.zephyrproject.org/latest/contribute/guidelines.html#clang-format for more details. You may want to run clang-format on this change: -#define MCTP_UART_DT_DEFINE(name, dt_node) \ - struct mctp_uart name = { \ - .binding = { \ - .name = STRINGIFY(name), \ - .version = 1, \ - .pkt_size = MCTP_PACKET_SIZE(MCTP_BTU), \ - .pkt_header = 0, \ - .pkt_trailer = 0, \ - .start = mctp_uart_start, \ - .tx = mctp_uart_tx, \ - }, \ - .uart = DEVICE_DT_GET(dt_node), \ +#define MCTP_UART_DT_DEFINE(name, dt_node) \ + struct mctp_uart name = { \ + .binding = \ + { \ + .name = STRINGIFY(name), .version = 1, \ + .pkt_size = MCTP_PACKET_SIZE(MCTP_BTU), \ + .pkt_header = 0, .pkt_trailer = 0, \ + .start = mctp_uart_start, .tx = mctp_uart_tx, \ + }, \ + .uart = DEVICE_DT_GET(dt_node), \ File:include/zephyr/mctp/mctp_uart.h Line:42 You may want to run clang-format on this change: -static void rx_message(uint8_t eid, bool tag_owner, - uint8_t msg_tag, void *data, void *msg, +static void rx_message(uint8_t eid, bool tag_owner, uint8_t msg_tag, void *data, void *msg, size_t len) { switch (eid) { case REMOTE_HELLO_EID: - LOG_INF("got mctp message %s for eid %d, replying to 5 with \"world\"", - (char *)msg, eid); + LOG_INF("got mctp message %s for eid %d, replying to 5 with \"world\"", (char *)msg, + eid); File:samples/modules/mctp/mctp_endpoint/src/main.c Line:46 You may want to run clang-format on this change: -static void rx_message(uint8_t eid, bool tag_owner, - uint8_t msg_tag, void *data, void *msg, +static void rx_message(uint8_t eid, bool tag_owner, uint8_t msg_tag, void *data, void *msg, File:samples/modules/mctp/mctp_host/src/main.c Line:24 You may want to run clang-format on this change: -static void mctp_uart_finish_pkt(struct mctp_binding_uart *uart, - bool valid) +static void mctp_uart_finish_pkt(struct mctp_binding_uart *uart, bool valid) File:subsys/mctp/mctp_uart.c Line:22 You may want to run clang-format on this change: -static void mctp_uart_start_pkt(struct mctp_binding_uart *uart, - uint8_t len) +static void mctp_uart_start_pkt(struct mctp_binding_uart *uart, uint8_t len) File:subsys/mctp/mctp_uart.c Line:36 You may want to run clang-format on this change: - if (buf) + if (buf) { buf[j] = 0x7d; + } File:subsys/mctp/mctp_uart.c Line:56 You may want to run clang-format on this change: - uart->rx_state == STATE_WAIT_REVISION || - uart->rx_state == STATE_WAIT_LEN)); + uart->rx_state == STATE_WAIT_REVISION || + uart->rx_state == STATE_WAIT_LEN)); switch (uart->rx_state) { case STATE_WAIT_SYNC_START: if (c != MCTP_SERIAL_FRAMING_FLAG) { LOG_DBG("lost sync, dropping packet"); - if (pkt) + if (pkt) { mctp_uart_finish_pkt(uart, false); + } File:subsys/mctp/mctp_uart.c Line:90 You may want to run clang-format on this change: - LOG_DEBUG( - "Received serial framing flag 0x%02x while waiting" - " for serial revision 0x%02x.", - c, MCTP_SERIAL_REVISION); + LOG_DEBUG("Received serial framing flag 0x%02x while waiting" + " for serial revision 0x%02x.", + c, MCTP_SERIAL_REVISION); } else { LOG_DEBUG("invalid revision 0x%02x", c); uart->rx_state = STATE_WAIT_SYNC_START; } break; case STATE_WAIT_LEN: - if (c > uart->binding.pkt_size || - c < sizeof(struct mctp_hdr)) { + if (c > uart->binding.pkt_size || c < sizeof(struct mctp_hdr)) { File:subsys/mctp/mctp_uart.c Line:119 You may want to run clang-format on this change: - uart->rx_fcs_calc = - crc_16_ccitt_byte(uart->rx_fcs_calc,
You may want to run clang-format on this change: include/zephyr/mctp/mctp_uart.h#L42
include/zephyr/mctp/mctp_uart.h:42 -#define MCTP_UART_DT_DEFINE(name, dt_node) \ - struct mctp_uart name = { \ - .binding = { \ - .name = STRINGIFY(name), \ - .version = 1, \ - .pkt_size = MCTP_PACKET_SIZE(MCTP_BTU), \ - .pkt_header = 0, \ - .pkt_trailer = 0, \ - .start = mctp_uart_start, \ - .tx = mctp_uart_tx, \ - }, \ - .uart = DEVICE_DT_GET(dt_node), \ +#define MCTP_UART_DT_DEFINE(name, dt_node) \ + struct mctp_uart name = { \ + .binding = \ + { \ + .name = STRINGIFY(name), .version = 1, \ + .pkt_size = MCTP_PACKET_SIZE(MCTP_BTU), \ + .pkt_header = 0, .pkt_trailer = 0, \ + .start = mctp_uart_start, .tx = mctp_uart_tx, \ + }, \ + .uart = DEVICE_DT_GET(dt_node), \
You may want to run clang-format on this change: samples/modules/mctp/mctp_endpoint/src/main.c#L46
samples/modules/mctp/mctp_endpoint/src/main.c:46 -static void rx_message(uint8_t eid, bool tag_owner, - uint8_t msg_tag, void *data, void *msg, +static void rx_message(uint8_t eid, bool tag_owner, uint8_t msg_tag, void *data, void *msg, size_t len) { switch (eid) { case REMOTE_HELLO_EID: - LOG_INF("got mctp message %s for eid %d, replying to 5 with \"world\"", - (char *)msg, eid); + LOG_INF("got mctp message %s for eid %d, replying to 5 with \"world\"", (char *)msg, + eid);
You may want to run clang-format on this change: samples/modules/mctp/mctp_host/src/main.c#L24
samples/modules/mctp/mctp_host/src/main.c:24 -static void rx_message(uint8_t eid, bool tag_owner, - uint8_t msg_tag, void *data, void *msg, +static void rx_message(uint8_t eid, bool tag_owner, uint8_t msg_tag, void *data, void *msg,
You may want to run clang-format on this change: subsys/mctp/mctp_uart.c#L22
subsys/mctp/mctp_uart.c:22 -static void mctp_uart_finish_pkt(struct mctp_binding_uart *uart, - bool valid) +static void mctp_uart_finish_pkt(struct mctp_binding_uart *uart, bool valid)
You may want to run clang-format on this change: subsys/mctp/mctp_uart.c#L36
subsys/mctp/mctp_uart.c:36 -static void mctp_uart_start_pkt(struct mctp_binding_uart *uart, - uint8_t len) +static void mctp_uart_start_pkt(struct mctp_binding_uart *uart, uint8_t len)
You may want to run clang-format on this change: subsys/mctp/mctp_uart.c#L56
subsys/mctp/mctp_uart.c:56 - if (buf) + if (buf) { buf[j] = 0x7d; + }
You may want to run clang-format on this change: subsys/mctp/mctp_uart.c#L90
subsys/mctp/mctp_uart.c:90 - uart->rx_state == STATE_WAIT_REVISION || - uart->rx_state == STATE_WAIT_LEN)); + uart->rx_state == STATE_WAIT_REVISION || + uart->rx_state == STATE_WAIT_LEN)); switch (uart->rx_state) { case STATE_WAIT_SYNC_START: if (c != MCTP_SERIAL_FRAMING_FLAG) { LOG_DBG("lost sync, dropping packet"); - if (pkt) + if (pkt) { mctp_uart_finish_pkt(uart, false); + }
You may want to run clang-format on this change: subsys/mctp/mctp_uart.c#L119
subsys/mctp/mctp_uart.c:119 - LOG_DEBUG( - "Received serial framing flag 0x%02x while waiting" - " for serial revision 0x%02x.", - c, MCTP_SERIAL_REVISION); + LOG_DEBUG("Received serial framing flag 0x%02x while waiting" + " for serial revision 0x%02x.", + c, MCTP_SERIAL_REVISION); } else { LOG_DEBUG("invalid revision 0x%02x", c); uart->rx_state = STATE_WAIT_SYNC_START; } break; case STATE_WAIT_LEN: - if (c > uart->binding.pkt_size || - c < sizeof(struct mctp_hdr)) { + if (c > uart->binding.pkt_size || c < sizeof(struct mctp_hdr)) {
You may want to run clang-format on this change: subsys/mctp/mctp_uart.c#L128
subsys/mctp/mctp_uart.c:128 - uart->rx_fcs_calc = - crc_16_ccitt_byte(uart->rx_fcs_calc, c); + uart->rx_fcs_calc = crc_16_ccitt_byte(uart->rx_fcs_calc, c);
You may want to run clang-format on this change: subsys/mctp/mctp_uart.c#L140
subsys/mctp/mctp_uart.c:140 - uart->rx_fcs_calc = - crc_16_ccitt_byte(uart->rx_fcs_calc, c); - if (pkt->end - pkt->mctp_hdr_off == uart->rx_exp_len) + uart->rx_fcs_calc = crc_16_ccitt_byte(uart->rx_fcs_calc, c); + if (pkt->end - pkt->mctp_hdr_off == uart->rx_exp_len) { uart->rx_state = STATE_WAIT_FCS1; + }

Artifacts

Produced during runtime
Name Size
compliance.xml Expired
2.48 KB