On 11/5/20 2:41 PM, Gerd Hoffmann wrote: > Replace most DPRINTF macros with trace events. > Drop some DPRINTF macros. > > Signed-off-by: Gerd Hoffmann <kra...@redhat.com> > --- > hw/usb/dev-storage.c | 42 +++++++++++++++++------------------------- > hw/usb/trace-events | 12 ++++++++++++ > 2 files changed, 29 insertions(+), 25 deletions(-) ...
> diff --git a/hw/usb/trace-events b/hw/usb/trace-events > index a3292d46248f..38e05fc7f4db 100644 > --- a/hw/usb/trace-events > +++ b/hw/usb/trace-events > @@ -252,6 +252,18 @@ usb_hub_attach(int addr, int nr) "dev %d, port %d" > usb_hub_detach(int addr, int nr) "dev %d, port %d" > usb_hub_status_report(int addr, int status) "dev %d, status 0x%x" > > +# dev-storage.c > +usb_msd_reset(void) "" > +usb_msd_maxlun(unsigned maxlun) "%d" > +usb_msd_send_status(unsigned status, unsigned tag, size_t size) "status %d, > tag 0x%x, len %zd" > +usb_msd_data_in(unsigned packet, unsigned remaining, unsigned total) "%d/%d > (scsi %d)" > +usb_msd_data_out(unsigned packet, unsigned remaining) "%d/%d" > +usb_msd_packet_async(void) "" > +usb_msd_packet_complete(void) "" > +usb_msd_cmd_submit(unsigned lun, unsigned tag, unsigned flags, unsigned len, > unsigned data_len) "lun %u, tag 0x%x, flags 0x%08x, len %d, data-len %d" > +usb_msd_cmd_complete(unsigned status, unsigned tag) "status %d, tag 0x%x" Using '%u' format for unsigned type: Reviewed-by: Philippe Mathieu-Daudé <phi...@redhat.com>