Ignore:
File:
1 edited

Legend:

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

    rd5c1051 rd51838f  
    9999}
    100100
    101 static bool pciintel_fun_owns_interrupt(pci_fun_t *fun, int irq)
     101static int pciintel_fun_owns_interrupt(pci_fun_t *fun, int irq)
    102102{
    103103        size_t i;
     
    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 = 0;
     295        uint32_t val;
    296296       
    297297        fibril_mutex_lock(&bus->conf_mutex);
     
    383383{
    384384        int rc;
    385         int ret;
    386385        char match_id_str[ID_MAX_STR_LEN];
    387386
    388387        /* Vendor ID & Device ID, length(incl \0) 22 */
    389         ret = snprintf(match_id_str, ID_MAX_STR_LEN, "pci/ven=%04"
     388        rc = snprintf(match_id_str, ID_MAX_STR_LEN, "pci/ven=%04"
    390389            PRIx16 "&dev=%04" PRIx16, fun->vendor_id, fun->device_id);
    391         if (ret < 0) {
    392                 ddf_msg(LVL_ERROR, "Failed creating match ID str");
     390        if (rc < 0) {
     391                ddf_msg(LVL_ERROR, "Failed creating match ID str: %s",
     392                    str_error(rc));
    393393        }
    394394
     
    399399
    400400        /* Class, subclass, prog IF, revision, length(incl \0) 47 */
    401         ret = snprintf(match_id_str, ID_MAX_STR_LEN,
     401        rc = 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 (ret < 0) {
    405                 ddf_msg(LVL_ERROR, "Failed creating match ID str");
     404        if (rc < 0) {
     405                ddf_msg(LVL_ERROR, "Failed creating match ID str: %s",
     406                    str_error(rc));
    406407        }
    407408
     
    412413
    413414        /* Class, subclass, prog IF, length(incl \0) 35 */
    414         ret = snprintf(match_id_str, ID_MAX_STR_LEN,
     415        rc = snprintf(match_id_str, ID_MAX_STR_LEN,
    415416            "pci/class=%02x&subclass=%02x&progif=%02x",
    416417            fun->class_code, fun->subclass_code, fun->prog_if);
    417         if (ret < 0) {
    418                 ddf_msg(LVL_ERROR, "Failed creating match ID str");
     418        if (rc < 0) {
     419                ddf_msg(LVL_ERROR, "Failed creating match ID str: %s",
     420                    str_error(rc));
    419421        }
    420422
     
    425427
    426428        /* Class, subclass, length(incl \0) 25 */
    427         ret = snprintf(match_id_str, ID_MAX_STR_LEN,
     429        rc = snprintf(match_id_str, ID_MAX_STR_LEN,
    428430            "pci/class=%02x&subclass=%02x",
    429431            fun->class_code, fun->subclass_code);
    430         if (ret < 0) {
    431                 ddf_msg(LVL_ERROR, "Failed creating match ID str");
     432        if (rc < 0) {
     433                ddf_msg(LVL_ERROR, "Failed creating match ID str: %s",
     434                    str_error(rc));
    432435        }
    433436
     
    438441
    439442        /* Class, length(incl \0) 13 */
    440         ret = snprintf(match_id_str, ID_MAX_STR_LEN, "pci/class=%02x",
     443        rc = snprintf(match_id_str, ID_MAX_STR_LEN, "pci/class=%02x",
    441444            fun->class_code);
    442         if (ret < 0) {
    443                 ddf_msg(LVL_ERROR, "Failed creating match ID str");
     445        if (rc < 0) {
     446                ddf_msg(LVL_ERROR, "Failed creating match ID str: %s",
     447                    str_error(rc));
    444448        }
    445449
     
    510514#define MEM_MASK (~0xf)
    511515       
    512         io = (val & 1) != 0;
     516        io = (bool) (val & 1);
    513517        if (io) {
    514518                addrw64 = false;
Note: See TracChangeset for help on using the changeset viewer.