Skip to content

Commit 9f03c45

Browse files
committed
[ot] hw/opentitan: ot_usbdev: fix formatting
Signed-off-by: Amaury Pouly <[email protected]>
1 parent 8e47375 commit 9f03c45

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

hw/opentitan/ot_usbdev.c

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ REG32(COUNT_ERRORS, 0xa8u)
224224
#define REGS_COUNT (R_LAST_REG + 1u)
225225
#define USBDEV_REGS_SIZE (REGS_COUNT * sizeof(uint32_t))
226226

227-
#define USBDEV_INTR_NUM 18
227+
#define USBDEV_INTR_NUM 18u
228228

229229
#define USBDEV_INTR_RW1C_MASK \
230230
(USBDEV_INTR_DISCONNECTED_MASK | USBDEV_INTR_HOST_LOST_MASK | \
@@ -591,7 +591,10 @@ static void ot_usbdev_update_vbus(OtUsbdevState *s)
591591
if (vbus_sense) {
592592
/* See BFM (bus_connect) */
593593

594-
/* If we end up in a non-disconnected state here, something is very wrong */
594+
/*
595+
* If we end up in a non-disconnected state here, something is very
596+
* wrong
597+
*/
595598
g_assert(ot_usbdev_get_link_state(s) ==
596599
OT_USBDEV_LINK_STATE_DISCONNECTED);
597600
s->regs[R_USBDEV_INTR_STATE] |= USBDEV_INTR_POWERED_MASK;
@@ -984,7 +987,8 @@ static void ot_usbdev_server_write_packet(OtUsbdevState *s,
984987
.size = size,
985988
.id = id,
986989
};
987-
int res = qemu_chr_fe_write(&s->usb_chr, (const uint8_t *)&hdr, sizeof(hdr));
990+
int res =
991+
qemu_chr_fe_write(&s->usb_chr, (const uint8_t *)&hdr, sizeof(hdr));
988992
if (res < sizeof(hdr)) {
989993
qemu_log_mask(LOG_UNIMP, "%s: %s server: unhandled partial write\n",
990994
__func__, s->ot_id);
@@ -1079,7 +1083,8 @@ static void ot_usbdev_server_process_hello(OtUsbdevState *s)
10791083
resp_hello.major_version = OT_USBDEV_SERVER_MAJOR_VER;
10801084
resp_hello.minor_version = OT_USBDEV_SERVER_MINOR_VER;
10811085
ot_usbdev_server_write_packet(s, OT_USBDEV_SERVER_CMD_HELLO,
1082-
server->recv_pkt.id, (const void *)&resp_hello,
1086+
server->recv_pkt.id,
1087+
(const void *)&resp_hello,
10831088
sizeof(resp_hello));
10841089
}
10851090

0 commit comments

Comments
 (0)