Changeset 4125b7d in mainline for uspace/drv/uhci-hcd


Ignore:
Timestamp:
2011-04-18T20:06:55Z (15 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
84a04dd, bbdf09e
Parents:
5ab4a48
Message:

usb_log_printf() checks for printf correctness

It is surprising how many printf warnings simple check could
produce ;-).

Next time, it won't compile. Bad, huh?

Location:
uspace/drv/uhci-hcd
Files:
8 edited

Legend:

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

    r5ab4a48 r4125b7d  
    162162        assert(data);
    163163
    164         usb_log_debug2("Batch(%p) checking %d transfer(s) for completion.\n",
     164        usb_log_debug2("Batch(%p) checking %zu transfer(s) for completion.\n",
    165165            instance, data->td_count);
    166166        instance->transfered_size = 0;
     
    173173                instance->error = td_status(&data->tds[i]);
    174174                if (instance->error != EOK) {
    175                         usb_log_debug("Batch(%p) found error TD(%d):%x.\n",
     175                        usb_log_debug("Batch(%p) found error TD(%zu):%" PRIx32 ".\n",
    176176                            instance, i, data->tds[i].status);
    177177                        td_print_status(&data->tds[i]);
  • uspace/drv/uhci-hcd/hc.c

    r5ab4a48 r4125b7d  
    101101            ret, io, str_error(ret));
    102102        instance->registers = io;
    103         usb_log_debug("Device registers at %p(%u) accessible.\n",
     103        usb_log_debug("Device registers at %p (%zuB) accessible.\n",
    104104            io, reg_size);
    105105
     
    423423                if (frame_list != addr_to_phys(instance->frame_list)) {
    424424                        usb_log_debug("Framelist address: %p vs. %p.\n",
    425                             frame_list, addr_to_phys(instance->frame_list));
     425                            (void *) frame_list,
     426                            (void *) addr_to_phys(instance->frame_list));
    426427                }
    427428
     
    432433                uintptr_t real_pa = addr_to_phys(QH(interrupt));
    433434                if (expected_pa != real_pa) {
    434                         usb_log_debug("Interrupt QH: %p(frame: %d) vs. %p.\n",
    435                             expected_pa, frnum, real_pa);
     435                        usb_log_debug("Interrupt QH: %p (frame %d) vs. %p.\n",
     436                            (void *) expected_pa, frnum, (void *) real_pa);
    436437                }
    437438
     
    440441                if (expected_pa != real_pa) {
    441442                        usb_log_debug("Control Slow QH: %p vs. %p.\n",
    442                             expected_pa, real_pa);
     443                            (void *) expected_pa, (void *) real_pa);
    443444                }
    444445
     
    447448                if (expected_pa != real_pa) {
    448449                        usb_log_debug("Control Full QH: %p vs. %p.\n",
    449                             expected_pa, real_pa);
     450                            (void *) expected_pa, (void *) real_pa);
    450451                }
    451452
     
    454455                if (expected_pa != real_pa ) {
    455456                        usb_log_debug("Bulk QH: %p vs. %p.\n",
    456                             expected_pa, real_pa);
     457                            (void *) expected_pa, (void *) real_pa);
    457458                }
    458459                async_usleep(UHCI_DEBUGER_TIMEOUT);
  • uspace/drv/uhci-hcd/hw_struct/transfer_descriptor.c

    r5ab4a48 r4125b7d  
    154154        assert(instance);
    155155        const uint32_t s = instance->status;
    156         usb_log_debug2("TD(%p) status(%#x):%s %d,%s%s%s%s%s%s%s%s%s%s%s %d.\n",
     156        usb_log_debug2("TD(%p) status(%#" PRIx32 "):%s %d,%s%s%s%s%s%s%s%s%s%s%s %zu.\n",
    157157            instance, instance->status,
    158158            (s & TD_STATUS_SPD_FLAG) ? " SPD," : "",
  • uspace/drv/uhci-hcd/iface.c

    r5ab4a48 r4125b7d  
    118118        hc_t *hc = fun_to_hc(fun);
    119119        assert(hc);
    120         usb_log_debug("Address bind %d-%d.\n", address, handle);
     120        usb_log_debug("Address bind %d-%" PRIun ".\n", address, handle);
    121121        usb_device_keeper_bind(&hc->manager, address, handle);
    122122        return EOK;
  • uspace/drv/uhci-hcd/main.c

    r5ab4a48 r4125b7d  
    7272        int ret = uhci_init(uhci, device);
    7373        if (ret != EOK) {
    74                 usb_log_error("Failed(%d) to initialize UHCI driver: %s.\n",
    75                     ret, str_error(ret));
     74                usb_log_error("Failed to initialize UHCI driver: %s.\n",
     75                    str_error(ret));
    7676                return ret;
    7777        }
  • uspace/drv/uhci-hcd/pci.c

    r5ab4a48 r4125b7d  
    9090                        io_address = res->res.io_range.address;
    9191                        io_size = res->res.io_range.size;
    92                         usb_log_debug2("Found io: %llx %zu.\n",
     92                        usb_log_debug2("Found io: %" PRIx64" %zu.\n",
    9393                            res->res.io_range.address, res->res.io_range.size);
    9494                        io_found = true;
  • uspace/drv/uhci-hcd/transfer_list.c

    r5ab4a48 r4125b7d  
    5858        }
    5959        uint32_t queue_head_pa = addr_to_phys(instance->queue_head);
    60         usb_log_debug2("Transfer list %s setup with QH: %p(%p).\n",
     60        usb_log_debug2("Transfer list %s setup with QH: %p (%#" PRIx32" ).\n",
    6161            name, instance->queue_head, queue_head_pa);
    6262
  • uspace/drv/uhci-hcd/uhci.c

    r5ab4a48 r4125b7d  
    168168            pci_get_my_registers(device, &io_reg_base, &io_reg_size, &irq);
    169169        CHECK_RET_DEST_FUN_RETURN(ret,
    170             "Failed(%d) to get I/O addresses:.\n", ret, device->handle);
    171         usb_log_debug("I/O regs at 0x%X (size %zu), IRQ %d.\n",
    172             io_reg_base, io_reg_size, irq);
     170            "Failed to get I/O addresses for %" PRIun ": %s.\n",
     171            device->handle, str_error(ret));
     172        usb_log_debug("I/O regs at 0x%p (size %zu), IRQ %d.\n",
     173            (void *) io_reg_base, io_reg_size, irq);
    173174
    174175        ret = pci_disable_legacy(device);
Note: See TracChangeset for help on using the changeset viewer.