diff options
-rw-r--r-- | hw/ads7846.c | 2 | ||||
-rw-r--r-- | hw/usb-ohci.c | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/hw/ads7846.c b/hw/ads7846.c index 2f891b1251..c26ce25838 100644 --- a/hw/ads7846.c +++ b/hw/ads7846.c @@ -1,5 +1,5 @@ /* - * TI ADS7846 chip emulation. + * TI ADS7846 / TSC2046 chip emulation. * * Copyright (c) 2006 Openedhand Ltd. * Written by Andrzej Zaborowski <balrog@zabor.org> diff --git a/hw/usb-ohci.c b/hw/usb-ohci.c index 287c45eb09..a85d38e44f 100644 --- a/hw/usb-ohci.c +++ b/hw/usb-ohci.c @@ -739,7 +739,7 @@ static int ohci_service_iso_td(OHCIState *ohci, struct ohci_ed *ed, OHCI_CC_NOERROR); OHCI_SET_BM(iso_td.offset[relative_frame_number], TD_PSW_SIZE, 0); } else { - if (ret > len) { + if (ret > (ssize_t) len) { printf("usb-ohci: DataOverrun %d > %zu\n", ret, len); OHCI_SET_BM(iso_td.offset[relative_frame_number], TD_PSW_CC, OHCI_CC_DATAOVERRUN); @@ -865,7 +865,7 @@ static int ohci_service_td(OHCIState *ohci, struct ohci_ed *ed) dprintf(" TD @ 0x%.8x %u bytes %s r=%d cbp=0x%.8x be=0x%.8x\n", addr, len, str, flag_r, td.cbp, td.be); - if (len >= 0 && dir != OHCI_TD_DIR_IN) { + if (len > 0 && dir != OHCI_TD_DIR_IN) { dprintf(" data:"); for (i = 0; i < len; i++) printf(" %.2x", ohci->usb_buf[i]); @@ -1062,7 +1062,8 @@ static void ohci_process_lists(OHCIState *ohci, int completion) { if ((ohci->ctl & OHCI_CTL_CLE) && (ohci->status & OHCI_STATUS_CLF)) { if (ohci->ctrl_cur && ohci->ctrl_cur != ohci->ctrl_head) - dprintf("usb-ohci: head %x, cur %x\n", ohci->ctrl_head, ohci->ctrl_cur); + dprintf("usb-ohci: head %x, cur %x\n", + ohci->ctrl_head, ohci->ctrl_cur); if (!ohci_service_ed_list(ohci, ohci->ctrl_head, completion)) { ohci->ctrl_cur = 0; ohci->status &= ~OHCI_STATUS_CLF; |