Changeset 45457265 in mainline for uspace/drv/bus/usb/xhci/streams.c


Ignore:
Timestamp:
2018-02-03T02:14:26Z (7 years ago)
Author:
Jenda <jenda.jzqk73@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
eb862fd
Parents:
961a5ee
Message:

errno_t all the things!

File:
1 edited

Legend:

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

    r961a5ee r45457265  
    8585 * @param[in] count Amount of primary streams.
    8686 */
    87 static int initialize_primary_structures(xhci_endpoint_t *xhci_ep, unsigned count)
     87static errno_t initialize_primary_structures(xhci_endpoint_t *xhci_ep, unsigned count)
    8888{
    8989        usb_log_debug("Allocating primary stream context array of size %u "
     
    152152 * @param[in] index index of the initialized stream structure.
    153153 */
    154 static int initialize_primary_stream(xhci_hc_t *hc, xhci_endpoint_t *xhci_ep,
    155     unsigned index)
     154static errno_t initialize_primary_stream(xhci_hc_t *hc, xhci_endpoint_t *xhci_ep,
     155        unsigned index)
    156156{
    157157        xhci_stream_ctx_t *ctx = &xhci_ep->primary_stream_ctx_array[index];
     
    159159        memset(data, 0, sizeof(xhci_stream_data_t));
    160160
    161         int err = EOK;
     161        errno_t err = EOK;
    162162
    163163        /* Init and register TRB ring for the primary stream */
     
    178178 * @param[in] xhci_ep XHCI bulk endpoint to use.
    179179 */
    180 static int initialize_primary_streams(xhci_hc_t *hc, xhci_endpoint_t *xhci_ep)
    181 {
    182         int err = EOK;
     180static errno_t initialize_primary_streams(xhci_hc_t *hc, xhci_endpoint_t *xhci_ep)
     181{
     182        errno_t err = EOK;
    183183        size_t index;
    184184        for (index = 0; index < xhci_ep->primary_stream_data_size; ++index) {
     
    205205 * @param[in] count Number of secondary streams to initialize.
    206206 */
    207 static int initialize_secondary_streams(xhci_hc_t *hc, xhci_endpoint_t *xhci_ep,
    208     unsigned idx, unsigned count)
     207static errno_t initialize_secondary_streams(xhci_hc_t *hc, xhci_endpoint_t *xhci_ep,
     208        unsigned idx, unsigned count)
    209209{
    210210        if (count == 0) {
     
    243243
    244244        /* Initialize all the rings. */
    245         int err = EOK;
     245        errno_t err = EOK;
    246246        size_t index;
    247247        for (index = 0; index < count; ++index) {
     
    275275 */
    276276static void setup_stream_context(xhci_endpoint_t *xhci_ep, xhci_ep_ctx_t *ctx,
    277     unsigned pstreams, unsigned lsa)
     277        unsigned pstreams, unsigned lsa)
    278278{
    279279        XHCI_EP_TYPE_SET(*ctx, xhci_endpoint_type(xhci_ep));
     
    294294 * @param[in] count Amount of primary streams requested.
    295295 */
    296 static int verify_stream_conditions(xhci_hc_t *hc, xhci_device_t *dev,
     296static errno_t verify_stream_conditions(xhci_hc_t *hc, xhci_device_t *dev,
    297297        xhci_endpoint_t *xhci_ep, unsigned count)
    298298{
     
    345345 * @param[in] xhci_ep Associated XHCI bulk endpoint.
    346346 */
    347 int xhci_endpoint_remove_streams(xhci_hc_t *hc, xhci_device_t *dev,
    348     xhci_endpoint_t *xhci_ep)
     347errno_t xhci_endpoint_remove_streams(xhci_hc_t *hc, xhci_device_t *dev,
     348        xhci_endpoint_t *xhci_ep)
    349349{
    350350        if (!xhci_ep->primary_stream_data_size) {
     
    357357
    358358        /* Streams are now removed, proceed with reconfiguring endpoint. */
    359         int err;
     359        errno_t err;
    360360        if ((err = xhci_trb_ring_init(&xhci_ep->ring, 0))) {
    361361                usb_log_error("Failed to initialize a transfer ring.");
     
    373373 * @param[in] count Amount of primary streams requested.
    374374 */
    375 int xhci_endpoint_request_primary_streams(xhci_hc_t *hc, xhci_device_t *dev,
     375errno_t xhci_endpoint_request_primary_streams(xhci_hc_t *hc, xhci_device_t *dev,
    376376        xhci_endpoint_t *xhci_ep, unsigned count)
    377377{
    378         int err = verify_stream_conditions(hc, dev, xhci_ep, count);
     378        errno_t err = verify_stream_conditions(hc, dev, xhci_ep, count);
    379379        if (err) {
    380380                return err;
     
    421421 * @param[in] count Amount of primary streams requested.
    422422 */
    423 int xhci_endpoint_request_secondary_streams(xhci_hc_t *hc, xhci_device_t *dev,
     423errno_t xhci_endpoint_request_secondary_streams(xhci_hc_t *hc, xhci_device_t *dev,
    424424        xhci_endpoint_t *xhci_ep, unsigned *sizes, unsigned count)
    425425{
     
    430430        }
    431431
    432         int err = verify_stream_conditions(hc, dev, xhci_ep, count);
     432        errno_t err = verify_stream_conditions(hc, dev, xhci_ep, count);
    433433        if (err) {
    434434                return err;
Note: See TracChangeset for help on using the changeset viewer.