Changeset 1433ecda in mainline for uspace/lib/usbhost


Ignore:
Timestamp:
2018-04-04T15:42:37Z (7 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
2c4e1cc
Parents:
47b2d7e3
Message:

Fix cstyle: make ccheck-fix and commit only files where all the changes are good.

Location:
uspace/lib/usbhost
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usbhost/include/usb/host/endpoint.h

    r47b2d7e3 r1433ecda  
    133133static inline bus_t *endpoint_get_bus(endpoint_t *ep)
    134134{
    135         device_t * const device = ep->device;
     135        device_t *const device = ep->device;
    136136        return device ? device->bus : NULL;
    137137}
  • uspace/lib/usbhost/include/usb/host/utils/malloc32.h

    r47b2d7e3 r1433ecda  
    7272 * @return Address of the aligned and big enough memory place, NULL on failure.
    7373 */
    74 static inline void * malloc32(size_t size)
     74static inline void *malloc32(size_t size)
    7575{
    7676        uintptr_t phys;
  • uspace/lib/usbhost/src/bus.c

    r47b2d7e3 r1433ecda  
    114114                dev->tt.dev = dev->hub;
    115115                dev->tt.port = dev->port;
    116         }
    117         else {
     116        } else {
    118117                /* Inherit hub's TT */
    119118                dev->tt = dev->hub->tt;
     
    172171                    ddf_fun_get_name(dev->fun), i, op);
    173172
    174                 endpoint_t * const ep = dev->endpoints[i];
     173                endpoint_t *const ep = dev->endpoints[i];
    175174                endpoint_add_ref(ep);
    176175
     
    190189        /* Remove also orphaned children. */
    191190        while (!list_empty(&dev->devices)) {
    192                 device_t * const child = list_get_instance(list_first(&dev->devices), device_t, link);
     191                device_t *const child = list_get_instance(list_first(&dev->devices), device_t, link);
    193192
    194193                /*
     
    405404        if (ep->max_transfer_size == 0) {
    406405                usb_log_warning("Invalid endpoint description (mps %zu, "
    407                         "%u packets)", ep->max_packet_size, ep->packets_per_uframe);
     406                    "%u packets)", ep->max_packet_size, ep->packets_per_uframe);
    408407                goto drop;
    409408        }
  • uspace/lib/usbhost/src/usb_transfer_batch.c

    r47b2d7e3 r1433ecda  
    9393                    batch, USB_TRANSFER_BATCH_ARGS(*batch));
    9494                bus->ops->batch_destroy(batch);
    95         }
    96         else {
     95        } else {
    9796                usb_log_debug2("Batch %p " USB_TRANSFER_BATCH_FMT " disposing.",
    9897                    batch, USB_TRANSFER_BATCH_ARGS(*batch));
     
    118117        size_t chunk_mask = dma_policy_chunk_mask(batch->dma_buffer.policy);
    119118        size_t required_chunk_mask =
    120              dma_policy_chunk_mask(batch->ep->required_transfer_buffer_policy);
     119            dma_policy_chunk_mask(batch->ep->required_transfer_buffer_policy);
    121120
    122121        /* If the chunks are at least as large as required, we're good */
     
    180179                        /* We we're forced to use bounce buffer, copy it back */
    181180                        if (batch->dir == USB_DIRECTION_IN)
    182                         memcpy(batch->original_buffer,
    183                             batch->dma_buffer.virt,
    184                             batch->transferred_size);
     181                                memcpy(batch->original_buffer,
     182                                    batch->dma_buffer.virt,
     183                                    batch->transferred_size);
    185184
    186185                        dma_buffer_free(&batch->dma_buffer);
    187                 }
    188                 else {
     186                } else {
    189187                        dma_buffer_release(&batch->dma_buffer);
    190188                }
Note: See TracChangeset for help on using the changeset viewer.