Ignore:
Timestamp:
2018-01-15T17:04:34Z (6 years ago)
Author:
Ondřej Hlavatý <aearsis@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
9ff99e8
Parents:
c1a966e
git-author:
Ondřej Hlavatý <aearsis@…> (2018-01-15 17:04:32)
git-committer:
Ondřej Hlavatý <aearsis@…> (2018-01-15 17:04:34)
Message:

usb: unified logging

Use logger instead of printf. Logger adds newlines automatically.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/ohci/ohci_batch.c

    rc1a966e ra1732929  
    175175        assert(ohci_batch);
    176176
    177         usb_log_debug("Batch %p checking %zu td(s) for completion.\n",
     177        usb_log_debug("Batch %p checking %zu td(s) for completion.",
    178178            &ohci_batch->base, ohci_batch->td_count);
    179         usb_log_debug2("ED: %08x:%08x:%08x:%08x.\n",
     179        usb_log_debug2("ED: %08x:%08x:%08x:%08x.",
    180180            ohci_batch->ed->status, ohci_batch->ed->td_head,
    181181            ohci_batch->ed->td_tail, ohci_batch->ed->next);
     
    196196        for (size_t i = 0; i < ohci_batch->td_count; ++i) {
    197197                assert(ohci_batch->tds[i] != NULL);
    198                 usb_log_debug("TD %zu: %08x:%08x:%08x:%08x.\n", i,
     198                usb_log_debug("TD %zu: %08x:%08x:%08x:%08x.", i,
    199199                    ohci_batch->tds[i]->status, ohci_batch->tds[i]->cbp,
    200200                    ohci_batch->tds[i]->next, ohci_batch->tds[i]->be);
     
    217217                            -= td_remain_size(ohci_batch->tds[i]);
    218218                } else {
    219                         usb_log_debug("Batch %p found error TD(%zu):%08x.\n",
     219                        usb_log_debug("Batch %p found error TD(%zu):%08x.",
    220220                            &ohci_batch->base, i,
    221221                            ohci_batch->tds[i]->status);
     
    295295        assert(dir == USB_DIRECTION_IN || dir == USB_DIRECTION_OUT);
    296296
    297         usb_log_debug("Using ED(%p): %08x:%08x:%08x:%08x.\n", ohci_batch->ed,
     297        usb_log_debug("Using ED(%p): %08x:%08x:%08x:%08x.", ohci_batch->ed,
    298298            ohci_batch->ed->status, ohci_batch->ed->td_tail,
    299299            ohci_batch->ed->td_head, ohci_batch->ed->next);
     
    312312            ohci_batch->tds[0], ohci_batch->tds[1], USB_DIRECTION_BOTH,
    313313            buffer, USB_SETUP_PACKET_SIZE, toggle);
    314         usb_log_debug("Created CONTROL SETUP TD: %08x:%08x:%08x:%08x.\n",
     314        usb_log_debug("Created CONTROL SETUP TD: %08x:%08x:%08x:%08x.",
    315315            ohci_batch->tds[0]->status, ohci_batch->tds[0]->cbp,
    316316            ohci_batch->tds[0]->next, ohci_batch->tds[0]->be);
     
    328328                    ohci_batch->tds[td_current + 1],
    329329                    data_dir, buffer, transfer_size, toggle);
    330                 usb_log_debug("Created CONTROL DATA TD: %08x:%08x:%08x:%08x.\n",
     330                usb_log_debug("Created CONTROL DATA TD: %08x:%08x:%08x:%08x.",
    331331                    ohci_batch->tds[td_current]->status,
    332332                    ohci_batch->tds[td_current]->cbp,
     
    344344        td_init(ohci_batch->tds[td_current], ohci_batch->tds[td_current + 1],
    345345            status_dir, NULL, 0, 1);
    346         usb_log_debug("Created CONTROL STATUS TD: %08x:%08x:%08x:%08x.\n",
     346        usb_log_debug("Created CONTROL STATUS TD: %08x:%08x:%08x:%08x.",
    347347            ohci_batch->tds[td_current]->status,
    348348            ohci_batch->tds[td_current]->cbp,
     
    350350            ohci_batch->tds[td_current]->be);
    351351        usb_log_debug2(
    352             "Batch %p %s %s " USB_TRANSFER_BATCH_FMT " initialized.\n", \
     352            "Batch %p %s %s " USB_TRANSFER_BATCH_FMT " initialized.", \
    353353            &ohci_batch->base,
    354354            usb_str_transfer_type(ohci_batch->base.ep->transfer_type),
     
    371371        usb_direction_t dir = ohci_batch->base.dir;
    372372        assert(dir == USB_DIRECTION_IN || dir == USB_DIRECTION_OUT);
    373         usb_log_debug("Using ED(%p): %08x:%08x:%08x:%08x.\n", ohci_batch->ed,
     373        usb_log_debug("Using ED(%p): %08x:%08x:%08x:%08x.", ohci_batch->ed,
    374374            ohci_batch->ed->status, ohci_batch->ed->td_tail,
    375375            ohci_batch->ed->td_head, ohci_batch->ed->next);
     
    386386                    dir, buffer, transfer_size, -1);
    387387
    388                 usb_log_debug("Created DATA TD: %08x:%08x:%08x:%08x.\n",
     388                usb_log_debug("Created DATA TD: %08x:%08x:%08x:%08x.",
    389389                    ohci_batch->tds[td_current]->status,
    390390                    ohci_batch->tds[td_current]->cbp,
     
    398398        }
    399399        usb_log_debug2(
    400             "Batch %p %s %s " USB_TRANSFER_BATCH_FMT " initialized.\n", \
     400            "Batch %p %s %s " USB_TRANSFER_BATCH_FMT " initialized.", \
    401401            &ohci_batch->base,
    402402            usb_str_transfer_type(ohci_batch->base.ep->transfer_type),
Note: See TracChangeset for help on using the changeset viewer.