Changeset 109d55c in mainline


Ignore:
Timestamp:
2011-05-30T20:19:48Z (13 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d754f59
Parents:
5da18c7
Message:

Code beautification

Location:
uspace/drv
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/ehci-hcd/main.c

    r5da18c7 r109d55c  
    8888        ret = pci_disable_legacy(device, reg_base, reg_size, irq);
    8989        CHECK_RET_RETURN(ret,
    90             "Failed(%d) disable legacy USB: %s.\n", ret, str_error(ret));
     90            "Failed to disable legacy USB: %s.\n", str_error(ret));
    9191
    9292        ddf_fun_t *hc_fun = ddf_fun_create(device, fun_exposed, "ehci-hc");
  • uspace/drv/ehci-hcd/pci.c

    r5da18c7 r109d55c  
    3535 */
    3636#include <errno.h>
     37#include <str_error.h>
    3738#include <assert.h>
    3839#include <as.h>
     
    240241        void *regs = NULL;
    241242        int ret = pio_enable((void*)reg_base, reg_size, &regs);
    242         CHECK_RET_RETURN(ret, "Failed(%d) to map registers %p.\n",
    243             ret, (void *) reg_base);
     243        CHECK_RET_RETURN(ret, "Failed to map registers %p: %s.\n",
     244            (void *) reg_base, str_error(ret));
    244245
    245246        const uint32_t hcc_params =
     
    256257        uint32_t usblegsup;
    257258        ret = pci_read32(device, eecp + USBLEGSUP_OFFSET, &usblegsup);
    258         CHECK_RET_RETURN(ret, "Failed(%d) to read USBLEGSUP.\n", ret);
     259        CHECK_RET_RETURN(ret, "Failed to read USBLEGSUP: %s.\n", str_error(ret));
    259260        usb_log_debug("USBLEGSUP: %" PRIxn ".\n", usblegsup);
    260261
     
    263264        usb_log_debug("Requesting OS control.\n");
    264265        ret = pci_write8(device, eecp + USBLEGSUP_OFFSET + 3, 1);
    265         CHECK_RET_RETURN(ret, "Failed(%d) to request OS EHCI control.\n", ret);
     266        CHECK_RET_RETURN(ret, "Failed to request OS EHCI control: %s.\n",
     267            str_error(ret));
    266268
    267269        size_t wait = 0;
     
    283285                ret = pci_write32(device, eecp + USBLEGSUP_OFFSET,
    284286                    USBLEGSUP_OS_CONTROL);
    285                 CHECK_RET_RETURN(ret, "Failed(%d) to force OS control.\n", ret);
     287                CHECK_RET_RETURN(ret, "Failed to force OS control: %s.\n",
     288                    str_error(ret));
    286289                /* Check capability type here, A value of 01h
    287290                 * identifies the capability as Legacy Support.
     
    297300                            device, eecp + USBLEGCTLSTS_OFFSET, &usblegctlsts);
    298301                        CHECK_RET_RETURN(ret,
    299                             "Failed(%d) to get USBLEGCTLSTS.\n", ret);
     302                            "Failed to get USBLEGCTLSTS: %s.\n", str_error(ret));
    300303                        usb_log_debug("USBLEGCTLSTS: %" PRIxn ".\n",
    301304                            usblegctlsts);
     
    310313                            device, eecp + USBLEGCTLSTS_OFFSET, &usblegctlsts);
    311314                        CHECK_RET_RETURN(ret,
    312                             "Failed(%d) to get USBLEGCTLSTS 2.\n", ret);
     315                            "Failed to get USBLEGCTLSTS 2: %s.\n",
     316                            str_error(ret));
    313317                        usb_log_debug("Zeroed USBLEGCTLSTS: %" PRIxn ".\n",
    314318                            usblegctlsts);
     
    319323        /* Read again Legacy Support register */
    320324        ret = pci_read32(device, eecp + USBLEGSUP_OFFSET, &usblegsup);
    321         CHECK_RET_RETURN(ret, "Failed(%d) to read USBLEGSUP.\n", ret);
     325        CHECK_RET_RETURN(ret, "Failed to read USBLEGSUP: %s.\n", str_error(ret));
    322326        usb_log_debug("USBLEGSUP: %" PRIxn ".\n", usblegsup);
    323327
  • uspace/drv/ohci/hw_struct/hcca.h

    r5da18c7 r109d55c  
    3737#include <stdint.h>
    3838
     39/** Host controller communication area.
     40 * Shared memory used for communication between the controller and the driver.
     41 */
    3942typedef struct hcca {
    4043        uint32_t int_ep[32];
Note: See TracChangeset for help on using the changeset viewer.