Changeset 80f7c54 in mainline


Ignore:
Timestamp:
2018-01-27T14:37:17Z (7 years ago)
Author:
Ondřej Hlavatý <aearsis@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
bf0398c
Parents:
77733a9
git-author:
Ondřej Hlavatý <aearsis@…> (2018-01-27 14:37:07)
git-committer:
Ondřej Hlavatý <aearsis@…> (2018-01-27 14:37:17)
Message:

usb: make the code compile on 32-bit architecture

Location:
uspace
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/tmon/burst_tests.c

    r77733a9 r80f7c54  
    128128/** Static array of units with decreasing factors. */
    129129static const tmon_unit_t units[] = {
    130         { .prefix = 'E', .factor = 1ul << 60 },
    131         { .prefix = 'P', .factor = 1ul << 50 },
    132         { .prefix = 'T', .factor = 1ul << 40 },
    133         { .prefix = 'G', .factor = 1ul << 30 },
    134         { .prefix = 'M', .factor = 1ul << 20 },
    135         { .prefix = 'k', .factor = 1ul << 10 }
     130        { .prefix = 'E', .factor = ((uint64_t) 1) << 60 },
     131        { .prefix = 'P', .factor = ((uint64_t) 1) << 50 },
     132        { .prefix = 'T', .factor = ((uint64_t) 1) << 40 },
     133        { .prefix = 'G', .factor = ((uint64_t) 1) << 30 },
     134        { .prefix = 'M', .factor = ((uint64_t) 1) << 20 },
     135        { .prefix = 'k', .factor = ((uint64_t) 1) << 10 }
    136136};
    137137
  • uspace/app/tmon/list.c

    r77733a9 r80f7c54  
    5353
    5454        if ((rc = devman_fun_sid_to_handle(svc, &diag_handle))) {
    55                 printf(NAME ": Error resolving handle of device with SID %ld, skipping.\n", svc);
     55                printf(NAME ": Error resolving handle of device with SID %" PRIun ", skipping.\n", svc);
    5656                return;
    5757        }
     
    5959        char path[MAX_PATH_LENGTH];
    6060        if ((rc = devman_fun_get_path(diag_handle, path, sizeof(path)))) {
    61                 printf(NAME ": Error resolving path of device with SID %ld, skipping.\n", svc);
     61                printf(NAME ": Error resolving path of device with SID %" PRIun ", skipping.\n", svc);
    6262                return;
    6363        }
  • uspace/app/tmon/resolve.c

    r77733a9 r80f7c54  
    6969        if (count != 1) {
    7070                if (count) {
    71                         printf(NAME ": Found %ld devices. Please specify which to use.\n", count);
     71                        printf(NAME ": Found %zu devices. Please specify which to use.\n", count);
    7272                } else {
    7373                        printf(NAME ": No diagnostic devices found.\n");
     
    7777
    7878        if ((rc = devman_fun_sid_to_handle(svcs[0], fun))) {
    79                 printf(NAME ": Error resolving handle of device with SID %ld.\n", svcs[0]);
     79                printf(NAME ": Error resolving handle of device with "
     80                    "SID %" PRIun ".\n", svcs[0]);
    8081                return rc;
    8182        }
  • uspace/app/tmon/tf.c

    r77733a9 r80f7c54  
    6969        char path[MAX_PATH_LENGTH];
    7070        if ((rc = devman_fun_get_path(fun, path, sizeof(path)))) {
    71                 printf(NAME ": Error resolving path of device with handle %ld. %s\n", fun, str_error(rc));
     71                printf(NAME ": Error resolving path of device with handle "
     72                    "%" PRIun ". %s\n", fun, str_error(rc));
    7273                return 1;
    7374        }
  • uspace/drv/bus/usb/usbdiag/tests.c

    r77733a9 r80f7c54  
    187187                for (size_t i = 0; i < size; i += sizeof(test_data)) {
    188188                        if (*(uint32_t *)(buffer + i) != test_data) {
    189                                 usb_log_error("Read of %s IN endpoint returned invald data at address %lu.", usb_str_transfer_type(pipe->desc.transfer_type), i);
     189                                usb_log_error("Read of %s IN endpoint returned "
     190                                    "invald data at address %zu.",
     191                                    usb_str_transfer_type(pipe->desc.transfer_type), i);
    190192                                rc = EINVAL;
    191193                                break;
  • uspace/drv/bus/usb/xhci/isoch.c

    r77733a9 r80f7c54  
    319319                case WINDOW_TOO_SOON: {
    320320                        const suseconds_t delay = wd.offset * 125;
    321                         usb_log_debug("[isoch] delaying feeding buffer %lu for %ldus",
     321                        usb_log_debug("[isoch] delaying feeding buffer %zu for %ldus",
    322322                                it - isoch->transfers, delay);
    323323                        fibril_timer_set_locked(isoch->feeding_timer, delay,
     
    327327
    328328                case WINDOW_INSIDE:
    329                         usb_log_debug("[isoch] feeding buffer %lu at 0x%llx",
     329                        usb_log_debug("[isoch] feeding buffer %zu at 0x%llx",
    330330                            it - isoch->transfers, it->mfindex);
    331331                        it->error = schedule_isochronous_trb(ep, it);
     
    345345                         * skipped.
    346346                         */
    347                         usb_log_debug("[isoch] missed feeding buffer %lu at 0x%llx by "
     347                        usb_log_debug("[isoch] missed feeding buffer %zu at 0x%llx by "
    348348                                "%llu uframes", it - isoch->transfers, it->mfindex, wd.offset);
    349349                        it->state = ISOCH_COMPLETE;
     
    411411                        /* Not allowed to feed yet. Defer to later. */
    412412                        const suseconds_t delay = wd.offset * 125;
    413                         usb_log_debug("[isoch] delaying feeding buffer %lu for %ldus",
     413                        usb_log_debug("[isoch] delaying feeding buffer %zu for %ldus",
    414414                            it - isoch->transfers, delay);
    415415                        fibril_timer_set_locked(isoch->feeding_timer, delay,
     
    419419
    420420                case WINDOW_TOO_LATE:
    421                         usb_log_debug("[isoch] missed feeding buffer %lu at 0x%llx by"
     421                        usb_log_debug("[isoch] missed feeding buffer %zu at 0x%llx by"
    422422                                "%llu uframes", it - isoch->transfers, it->mfindex, wd.offset);
    423423                        /* Missed the opportunity to schedule. Schedule ASAP. */
     
    432432                        isoch->last_mf = it->mfindex;
    433433
    434                         usb_log_debug("[isoch] feeding buffer %lu at 0x%llx",
     434                        usb_log_debug("[isoch] feeding buffer %zu at 0x%llx",
    435435                            it - isoch->transfers, it->mfindex);
    436436
Note: See TracChangeset for help on using the changeset viewer.