subsys: Add MCTP as a subsystem, built on libmctp with bindings #148029
Annotations
4 errors, 1 warning, and 10 notices
|
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
|
Gitlint.txt#L1
See https://docs.zephyrproject.org/latest/contribute/guidelines.html#commit-guidelines for more details
Commit 7ecdbebedb:
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 930243cea9:
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"
|
|
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:
-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, c);
+ uart->rx_fcs_calc = crc_16_ccitt_byte(uart->rx_fcs_calc, c);
File:subsys/mctp/mctp_uart.c
Line:128
You may want to run clang-format on this change:
- 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;
+ }
File:subsys/mctp/mctp_uart.c
Line:140
You may want to run clang-format on this change:
- if (pkt->end - pkt->mctp_hdr_off == uart->rx_exp_len)
+ if (pkt->end - pkt->mctp_hdr_off == uart->rx_exp_len) {
uart->rx_state = STATE_WAIT_FCS1;
- else
+ } else {
uart->rx_state = STATE_DATA;
+ }
File:subsys/mctp/mctp_uart.c
Line:151
You may want to run clang-format on this change:
- LOG_DEBUG("invalid fcs : 0x%04x, expect 0x%04x",
- uart->rx_fcs, uart->rx_fcs_calc);
+ LOG_DEBUG("invalid fcs : 0x%04x, expect 0x%04x", uart->rx_fcs,
+ uart->rx_fcs_calc);
File:subsys/mctp/mctp_uart.c
Line:174
You may want to run clang-format on this change:
-
File:subsys/mctp/mctp_uart.c
Line:190
You may want to run clang-format on this change:
- if (len
|
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);
|
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,
|
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)
|
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)
|
subsys/mctp/mctp_uart.c#L56
subsys/mctp/mctp_uart.c:56
- if (buf)
+ if (buf) {
buf[j] = 0x7d;
+ }
|
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);
+ }
|
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)) {
|
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);
|
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;
+ }
|
subsys/mctp/mctp_uart.c#L151
subsys/mctp/mctp_uart.c:151
- if (pkt->end - pkt->mctp_hdr_off == uart->rx_exp_len)
+ if (pkt->end - pkt->mctp_hdr_off == uart->rx_exp_len) {
uart->rx_state = STATE_WAIT_FCS1;
- else
+ } else {
uart->rx_state = STATE_DATA;
+ }
|
This job failed
Loading