Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/pci/pciintel/pci.c

    rd51838f rb7fd2a0  
    9999}
    100100
    101 static int pciintel_fun_owns_interrupt(pci_fun_t *fun, int irq)
     101static bool pciintel_fun_owns_interrupt(pci_fun_t *fun, int irq)
    102102{
    103103        size_t i;
     
    114114}
    115115
    116 static int pciintel_enable_interrupt(ddf_fun_t *fnode, int irq)
     116static errno_t pciintel_enable_interrupt(ddf_fun_t *fnode, int irq)
    117117{
    118118        pci_fun_t *fun = pci_fun(fnode);
     
    124124}
    125125
    126 static int pciintel_disable_interrupt(ddf_fun_t *fnode, int irq)
     126static errno_t pciintel_disable_interrupt(ddf_fun_t *fnode, int irq)
    127127{
    128128        pci_fun_t *fun = pci_fun(fnode);
     
    134134}
    135135
    136 static int pciintel_clear_interrupt(ddf_fun_t *fnode, int irq)
     136static errno_t pciintel_clear_interrupt(ddf_fun_t *fnode, int irq)
    137137{
    138138        pci_fun_t *fun = pci_fun(fnode);
     
    154154
    155155
    156 static int config_space_write_32(ddf_fun_t *fun, uint32_t address,
     156static errno_t config_space_write_32(ddf_fun_t *fun, uint32_t address,
    157157    uint32_t data)
    158158{
     
    163163}
    164164
    165 static int config_space_write_16(
     165static errno_t config_space_write_16(
    166166    ddf_fun_t *fun, uint32_t address, uint16_t data)
    167167{
     
    172172}
    173173
    174 static int config_space_write_8(
     174static errno_t config_space_write_8(
    175175    ddf_fun_t *fun, uint32_t address, uint8_t data)
    176176{
     
    181181}
    182182
    183 static int config_space_read_32(
     183static errno_t config_space_read_32(
    184184    ddf_fun_t *fun, uint32_t address, uint32_t *data)
    185185{
     
    190190}
    191191
    192 static int config_space_read_16(
     192static errno_t config_space_read_16(
    193193    ddf_fun_t *fun, uint32_t address, uint16_t *data)
    194194{
     
    199199}
    200200
    201 static int config_space_read_8(
     201static errno_t config_space_read_8(
    202202    ddf_fun_t *fun, uint32_t address, uint8_t *data)
    203203{
     
    234234};
    235235
    236 static int pci_dev_add(ddf_dev_t *);
    237 static int pci_fun_online(ddf_fun_t *);
    238 static int pci_fun_offline(ddf_fun_t *);
     236static errno_t pci_dev_add(ddf_dev_t *);
     237static errno_t pci_fun_online(ddf_fun_t *);
     238static errno_t pci_fun_offline(ddf_fun_t *);
    239239
    240240/** PCI bus driver standard operations */
     
    293293        const uint32_t conf_addr = CONF_ADDR(fun->bus, fun->dev, fun->fn, reg);
    294294        pci_bus_t *bus = pci_bus_from_fun(fun);
    295         uint32_t val;
     295        uint32_t val = 0;
    296296       
    297297        fibril_mutex_lock(&bus->conf_mutex);
     
    382382void pci_fun_create_match_ids(pci_fun_t *fun)
    383383{
    384         int rc;
     384        errno_t rc;
     385        int ret;
    385386        char match_id_str[ID_MAX_STR_LEN];
    386387
    387388        /* Vendor ID & Device ID, length(incl \0) 22 */
    388         rc = snprintf(match_id_str, ID_MAX_STR_LEN, "pci/ven=%04"
     389        ret = snprintf(match_id_str, ID_MAX_STR_LEN, "pci/ven=%04"
    389390            PRIx16 "&dev=%04" PRIx16, fun->vendor_id, fun->device_id);
    390         if (rc < 0) {
    391                 ddf_msg(LVL_ERROR, "Failed creating match ID str: %s",
    392                     str_error(rc));
     391        if (ret < 0) {
     392                ddf_msg(LVL_ERROR, "Failed creating match ID str");
    393393        }
    394394
     
    399399
    400400        /* Class, subclass, prog IF, revision, length(incl \0) 47 */
    401         rc = snprintf(match_id_str, ID_MAX_STR_LEN,
     401        ret = snprintf(match_id_str, ID_MAX_STR_LEN,
    402402            "pci/class=%02x&subclass=%02x&progif=%02x&revision=%02x",
    403403            fun->class_code, fun->subclass_code, fun->prog_if, fun->revision);
    404         if (rc < 0) {
    405                 ddf_msg(LVL_ERROR, "Failed creating match ID str: %s",
    406                     str_error(rc));
     404        if (ret < 0) {
     405                ddf_msg(LVL_ERROR, "Failed creating match ID str");
    407406        }
    408407
     
    413412
    414413        /* Class, subclass, prog IF, length(incl \0) 35 */
    415         rc = snprintf(match_id_str, ID_MAX_STR_LEN,
     414        ret = snprintf(match_id_str, ID_MAX_STR_LEN,
    416415            "pci/class=%02x&subclass=%02x&progif=%02x",
    417416            fun->class_code, fun->subclass_code, fun->prog_if);
    418         if (rc < 0) {
    419                 ddf_msg(LVL_ERROR, "Failed creating match ID str: %s",
    420                     str_error(rc));
     417        if (ret < 0) {
     418                ddf_msg(LVL_ERROR, "Failed creating match ID str");
    421419        }
    422420
     
    427425
    428426        /* Class, subclass, length(incl \0) 25 */
    429         rc = snprintf(match_id_str, ID_MAX_STR_LEN,
     427        ret = snprintf(match_id_str, ID_MAX_STR_LEN,
    430428            "pci/class=%02x&subclass=%02x",
    431429            fun->class_code, fun->subclass_code);
    432         if (rc < 0) {
    433                 ddf_msg(LVL_ERROR, "Failed creating match ID str: %s",
    434                     str_error(rc));
     430        if (ret < 0) {
     431                ddf_msg(LVL_ERROR, "Failed creating match ID str");
    435432        }
    436433
     
    441438
    442439        /* Class, length(incl \0) 13 */
    443         rc = snprintf(match_id_str, ID_MAX_STR_LEN, "pci/class=%02x",
     440        ret = snprintf(match_id_str, ID_MAX_STR_LEN, "pci/class=%02x",
    444441            fun->class_code);
    445         if (rc < 0) {
    446                 ddf_msg(LVL_ERROR, "Failed creating match ID str: %s",
    447                     str_error(rc));
     442        if (ret < 0) {
     443                ddf_msg(LVL_ERROR, "Failed creating match ID str");
    448444        }
    449445
     
    514510#define MEM_MASK (~0xf)
    515511       
    516         io = (bool) (val & 1);
     512        io = (val & 1) != 0;
    517513        if (io) {
    518514                addrw64 = false;
     
    606602{
    607603        pci_fun_t *fun;
    608         int rc;
     604        errno_t rc;
    609605       
    610606        int child_bus = 0;
     
    688684}
    689685
    690 static int pci_dev_add(ddf_dev_t *dnode)
     686static errno_t pci_dev_add(ddf_dev_t *dnode)
    691687{
    692688        hw_resource_list_t hw_resources;
     
    695691        bool got_res = false;
    696692        async_sess_t *sess;
    697         int rc;
     693        errno_t rc;
    698694       
    699695        ddf_msg(LVL_DEBUG, "pci_dev_add");
     
    814810}
    815811
    816 static int pci_fun_online(ddf_fun_t *fun)
     812static errno_t pci_fun_online(ddf_fun_t *fun)
    817813{
    818814        ddf_msg(LVL_DEBUG, "pci_fun_online()");
     
    820816}
    821817
    822 static int pci_fun_offline(ddf_fun_t *fun)
     818static errno_t pci_fun_offline(ddf_fun_t *fun)
    823819{
    824820        ddf_msg(LVL_DEBUG, "pci_fun_offline()");
Note: See TracChangeset for help on using the changeset viewer.