Changeset bc8bc6e in mainline for uspace/drv/bus/usb/uhci/uhci_rh.c


Ignore:
Timestamp:
2015-07-05T03:35:14Z (9 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
51cc6cef
Parents:
9e9d018e
Message:

uhci/rh: Fix debug printing macro format

Only print debug output on port status change.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/uhci/uhci_rh.c

    r9e9d018e rbc8bc6e  
    169169
    170170#define RH_DEBUG(hub, port, msg, ...) \
     171do { \
    171172        if ((int)port >= 0) \
    172173                usb_log_debug("RH(%p-%d): " msg, hub, port, ##__VA_ARGS__); \
    173174        else \
    174                 usb_log_debug("RH(%p):" msg, hub, ##__VA_ARGS__) \
     175                usb_log_debug("RH(%p):" msg, hub, ##__VA_ARGS__); \
     176} while (0)
    175177
    176178/** USB HUB port state request handler.
     
    411413            ((((status_b & STATUS_CHANGE_BITS) != 0) || hub->reset_changed[1]) ?
    412414                0x4 : 0);
    413 
    414         RH_DEBUG(hub, -1, "Event mask %" PRIx8
    415             " (status_a %" PRIx16 "%s),"
    416             " (status_b %" PRIx16 "%s)\n", status,
    417             status_a, hub->reset_changed[0] ? "-reset" : "",
    418             status_b, hub->reset_changed[1] ? "-reset" : "" );
     415        if (status)
     416                RH_DEBUG(hub, -1, "Event mask %" PRIx8
     417                    " (status_a %" PRIx16 "%s),"
     418                    " (status_b %" PRIx16 "%s)\n", status,
     419                    status_a, hub->reset_changed[0] ? "-reset" : "",
     420                    status_b, hub->reset_changed[1] ? "-reset" : "" );
    419421        ((uint8_t *)buffer)[0] = status;
    420422        *actual_size = 1;
Note: See TracChangeset for help on using the changeset viewer.