Changeset d5c1051 in mainline for uspace/drv/bus/pci/pciintel/pci.c


Ignore:
Timestamp:
2017-12-20T22:25:34Z (6 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
39b54fe
Parents:
8610c2c
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2017-12-20 22:22:29)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2017-12-20 22:25:34)
Message:

"Obviously harmless" error handling tweaks.

File:
1 edited

Legend:

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

    r8610c2c rd5c1051  
    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;
     
    383383{
    384384        int 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
Note: See TracChangeset for help on using the changeset viewer.