Changeset 8033f89 in mainline for uspace/drv/bus/usb/xhci/trb_ring.c


Ignore:
Timestamp:
2018-01-23T12:41:22Z (8 years ago)
Author:
Ondřej Hlavatý <aearsis@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
e7e1fd3
Parents:
e546142
Message:

xhci: cstyle

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/xhci/trb_ring.c

    re546142 r8033f89  
    156156
    157157        list_foreach_safe(ring->segments, cur, next) {
    158                 trb_segment_t *segment = list_get_instance(cur, trb_segment_t, segments_link);
     158                trb_segment_t *segment =
     159                    list_get_instance(cur, trb_segment_t, segments_link);
    159160                trb_segment_free(segment);
    160161        }
     
    171172static void trb_ring_resolve_link(xhci_trb_ring_t *ring)
    172173{
    173         link_t *next_segment = list_next(&ring->enqueue_segment->segments_link, &ring->segments);
     174        link_t *next_segment =
     175            list_next(&ring->enqueue_segment->segments_link, &ring->segments);
    174176        if (!next_segment)
    175177                next_segment = list_first(&ring->segments);
    176178        assert(next_segment);
    177179
    178         ring->enqueue_segment = list_get_instance(next_segment, trb_segment_t, segments_link);
     180        ring->enqueue_segment =
     181            list_get_instance(next_segment, trb_segment_t, segments_link);
    179182        ring->enqueue_trb = segment_begin(ring->enqueue_segment);
    180183}
     
    206209 * The copied TRBs must be contiguous in memory, and must not contain Link TRBs.
    207210 *
    208  * We cannot avoid the copying, because the TRB in ring should be updated atomically.
     211 * We cannot avoid the copying, because the TRB in ring should be updated
     212 * atomically.
    209213 *
    210214 * @param first_trb the first TRB
     
    405409        /* Wrapping around segment boundary */
    406410        if (index >= SEGMENT_TRB_COUNT) {
    407                 link_t *next_segment = list_next(&ring->dequeue_segment->segments_link, &ring->segments);
     411                link_t *next_segment =
     412                    list_next(&ring->dequeue_segment->segments_link, &ring->segments);
    408413
    409414                /* Wrapping around table boundary */
     
    413418                }
    414419
    415                 ring->dequeue_segment = list_get_instance(next_segment, trb_segment_t, segments_link);
     420                ring->dequeue_segment =
     421                    list_get_instance(next_segment, trb_segment_t, segments_link);
    416422                ring->dequeue_trb = segment_begin(ring->dequeue_segment);
    417423        }
Note: See TracChangeset for help on using the changeset viewer.