Changeset e247d83 in mainline for uspace/drv/uhci-hcd/transfer_list.c


Ignore:
Timestamp:
2011-05-23T14:04:51Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
563ead9
Parents:
8953514
Message:

Const, type-casting and other minor fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/uhci-hcd/transfer_list.c

    r8953514 re247d83  
    5858                return ENOMEM;
    5959        }
    60         uint32_t queue_head_pa = addr_to_phys(instance->queue_head);
     60        const uint32_t queue_head_pa = addr_to_phys(instance->queue_head);
    6161        usb_log_debug2("Transfer list %s setup with QH: %p (%#" PRIx32" ).\n",
    6262            name, instance->queue_head, queue_head_pa);
     
    9090{
    9191        assert(instance);
     92        assert(instance->queue_head);
    9293        assert(next);
    93         if (!instance->queue_head)
    94                 return;
    9594        /* Set queue_head.next to point to the follower */
    9695        qh_set_next_qh(instance->queue_head, next->queue_head);
     
    137136        write_barrier();
    138137
    139         /* Add to the driver list */
     138        /* Add to the driver's list */
    140139        list_append(&batch->link, &instance->batch_list);
    141140
     
    160159        link_t *current = instance->batch_list.next;
    161160        while (current != &instance->batch_list) {
    162                 link_t *next = current->next;
     161                link_t * const next = current->next;
    163162                usb_transfer_batch_t *batch =
    164163                    usb_transfer_batch_from_link(current);
     
    182181        fibril_mutex_lock(&instance->guard);
    183182        while (!list_empty(&instance->batch_list)) {
    184                 link_t *current = instance->batch_list.next;
     183                link_t * const current = instance->batch_list.next;
    185184                usb_transfer_batch_t *batch =
    186185                    usb_transfer_batch_from_link(current);
Note: See TracChangeset for help on using the changeset viewer.