Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ jobs:
uses: actions/checkout@v4
- name: Check C code format
run: |
scripts/opentitan/ot-format.sh --ci -i
scripts/opentitan/ot-format.sh --ci --Werror --dry-run

lint-python:
runs-on: ubuntu-latest
Expand Down
5 changes: 1 addition & 4 deletions .gitlab-ci.d/opentitan/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,7 @@ format:
- qemu_ot
stage: build
script:
- scripts/opentitan/ot-format.sh --ci -i
- git status -s
- test -z "$(git status -s)" || git diff
- test -z "$(git status -s)"
- scripts/opentitan/ot-format.sh --ci --Werror --dry-run

tidy:
tags:
Expand Down
13 changes: 9 additions & 4 deletions hw/opentitan/ot_usbdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ REG32(COUNT_ERRORS, 0xa8u)
#define REGS_COUNT (R_LAST_REG + 1u)
#define USBDEV_REGS_SIZE (REGS_COUNT * sizeof(uint32_t))

#define USBDEV_INTR_NUM 18
#define USBDEV_INTR_NUM 18u

#define USBDEV_INTR_RW1C_MASK \
(USBDEV_INTR_DISCONNECTED_MASK | USBDEV_INTR_HOST_LOST_MASK | \
Expand Down Expand Up @@ -591,7 +591,10 @@ static void ot_usbdev_update_vbus(OtUsbdevState *s)
if (vbus_sense) {
/* See BFM (bus_connect) */

/* If we end up in a non-disconnected state here, something is very wrong */
/*
* If we end up in a non-disconnected state here, something is very
* wrong
*/
g_assert(ot_usbdev_get_link_state(s) ==
OT_USBDEV_LINK_STATE_DISCONNECTED);
s->regs[R_USBDEV_INTR_STATE] |= USBDEV_INTR_POWERED_MASK;
Expand Down Expand Up @@ -984,7 +987,8 @@ static void ot_usbdev_server_write_packet(OtUsbdevState *s,
.size = size,
.id = id,
};
int res = qemu_chr_fe_write(&s->usb_chr, (const uint8_t *)&hdr, sizeof(hdr));
int res =
qemu_chr_fe_write(&s->usb_chr, (const uint8_t *)&hdr, sizeof(hdr));
if (res < sizeof(hdr)) {
qemu_log_mask(LOG_UNIMP, "%s: %s server: unhandled partial write\n",
__func__, s->ot_id);
Expand Down Expand Up @@ -1079,7 +1083,8 @@ static void ot_usbdev_server_process_hello(OtUsbdevState *s)
resp_hello.major_version = OT_USBDEV_SERVER_MAJOR_VER;
resp_hello.minor_version = OT_USBDEV_SERVER_MINOR_VER;
ot_usbdev_server_write_packet(s, OT_USBDEV_SERVER_CMD_HELLO,
server->recv_pkt.id, (const void *)&resp_hello,
server->recv_pkt.id,
(const void *)&resp_hello,
sizeof(resp_hello));
}

Expand Down
Loading