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/uhci/uhci_batch.c

    rc1a966e ra1732929  
    7575            calloc(1, sizeof(uhci_transfer_batch_t));
    7676        if (!uhci_batch) {
    77                 usb_log_error("Failed to allocate UHCI batch.\n");
     77                usb_log_error("Failed to allocate UHCI batch.");
    7878                return NULL;
    7979        }
     
    112112        uhci_batch->device_buffer = malloc32(total_size);
    113113        if (!uhci_batch->device_buffer) {
    114                 usb_log_error("Failed to allocate UHCI buffer.\n");
     114                usb_log_error("Failed to allocate UHCI buffer.");
    115115                return ENOMEM;
    116116        }
     
    135135        }
    136136        usb_log_debug2("Batch %p " USB_TRANSFER_BATCH_FMT
    137             " memory structures ready.\n", usb_batch,
     137            " memory structures ready.", usb_batch,
    138138            USB_TRANSFER_BATCH_ARGS(*usb_batch));
    139139
     
    159159
    160160        usb_log_debug2("Batch %p " USB_TRANSFER_BATCH_FMT
    161             " checking %zu transfer(s) for completion.\n",
     161            " checking %zu transfer(s) for completion.",
    162162            uhci_batch, USB_TRANSFER_BATCH_ARGS(*batch),
    163163            uhci_batch->td_count);
     
    174174
    175175                        usb_log_debug("Batch %p found error TD(%zu->%p):%"
    176                             PRIx32 ".\n", uhci_batch, i,
     176                            PRIx32 ".", uhci_batch, i,
    177177                            &uhci_batch->tds[i], uhci_batch->tds[i].status);
    178178                        td_print_status(&uhci_batch->tds[i]);
     
    260260        uhci_batch->base.ep->toggle = toggle;
    261261        usb_log_debug2(
    262             "Batch %p %s %s " USB_TRANSFER_BATCH_FMT " initialized.\n", \
     262            "Batch %p %s %s " USB_TRANSFER_BATCH_FMT " initialized.", \
    263263            uhci_batch,
    264264            usb_str_transfer_type(uhci_batch->base.ep->transfer_type),
     
    333333        td_set_ioc(&uhci_batch->tds[td]);
    334334
    335         usb_log_debug2("Control last TD status: %x.\n",
     335        usb_log_debug2("Control last TD status: %x.",
    336336            uhci_batch->tds[td].status);
    337337}
Note: See TracChangeset for help on using the changeset viewer.