Changeset d5c1051 in mainline for uspace/drv
- Timestamp:
- 2017-12-20T22:25:34Z (8 years ago)
- 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)
- Location:
- uspace/drv
- Files:
-
- 8 edited
-
audio/hdaudio/pcm_iface.c (modified) (1 diff)
-
audio/sb16/dsp.c (modified) (1 diff)
-
block/ata_bd/ata_bd.c (modified) (3 diffs)
-
block/usbmast/bo_trans.c (modified) (2 diffs)
-
bus/pci/pciintel/pci.c (modified) (6 diffs)
-
bus/usb/ohci/hw_struct/completion_codes.h (modified) (1 diff)
-
bus/usb/usbmid/usbmid.c (modified) (1 diff)
-
test/test3/test3.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/audio/hdaudio/pcm_iface.c
r8610c2c rd5c1051 120 120 return 16384; 121 121 default: 122 return ENOTSUP;122 return -1; 123 123 } 124 124 } -
uspace/drv/audio/sb16/dsp.c
r8610c2c rd5c1051 290 290 return 16535; 291 291 default: 292 return ENOTSUP;292 return -1; 293 293 } 294 294 } -
uspace/drv/block/ata_bd/ata_bd.c
r8610c2c rd5c1051 145 145 int ata_ctrl_init(ata_ctrl_t *ctrl, ata_base_t *res) 146 146 { 147 int i, rc; 147 int i; 148 int rc; 148 149 int n_disks; 149 150 … … 210 211 int ata_ctrl_remove(ata_ctrl_t *ctrl) 211 212 { 212 int i, rc; 213 int i; 214 int rc; 213 215 214 216 ddf_msg(LVL_DEBUG, ": ata_ctrl_remove()"); … … 234 236 int ata_ctrl_gone(ata_ctrl_t *ctrl) 235 237 { 236 int i, rc; 238 int i; 239 int rc; 237 240 238 241 ddf_msg(LVL_DEBUG, "ata_ctrl_gone()"); -
uspace/drv/block/usbmast/bo_trans.c
r8610c2c rd5c1051 228 228 * 229 229 * @param mfun Mass storage function 230 * @return Error code of maximum LUN (index, not count)230 * @return Maximum LUN (index, not count), or -1 231 231 */ 232 232 int usb_massstor_get_max_lun(usbmast_dev_t *mdev) … … 240 240 &data_recv_len); 241 241 if (rc != EOK) { 242 return rc;242 return -1; 243 243 } 244 244 if (data_recv_len != 1) { 245 return EEMPTY;246 } 247 return (int)max_lun;245 return -1; 246 } 247 return max_lun; 248 248 } 249 249 -
uspace/drv/bus/pci/pciintel/pci.c
r8610c2c rd5c1051 99 99 } 100 100 101 static intpciintel_fun_owns_interrupt(pci_fun_t *fun, int irq)101 static bool pciintel_fun_owns_interrupt(pci_fun_t *fun, int irq) 102 102 { 103 103 size_t i; … … 383 383 { 384 384 int rc; 385 int ret; 385 386 char match_id_str[ID_MAX_STR_LEN]; 386 387 387 388 /* Vendor ID & Device ID, length(incl \0) 22 */ 388 r c= snprintf(match_id_str, ID_MAX_STR_LEN, "pci/ven=%04"389 ret = snprintf(match_id_str, ID_MAX_STR_LEN, "pci/ven=%04" 389 390 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"); 393 393 } 394 394 … … 399 399 400 400 /* Class, subclass, prog IF, revision, length(incl \0) 47 */ 401 r c= snprintf(match_id_str, ID_MAX_STR_LEN,401 ret = snprintf(match_id_str, ID_MAX_STR_LEN, 402 402 "pci/class=%02x&subclass=%02x&progif=%02x&revision=%02x", 403 403 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"); 407 406 } 408 407 … … 413 412 414 413 /* Class, subclass, prog IF, length(incl \0) 35 */ 415 r c= snprintf(match_id_str, ID_MAX_STR_LEN,414 ret = snprintf(match_id_str, ID_MAX_STR_LEN, 416 415 "pci/class=%02x&subclass=%02x&progif=%02x", 417 416 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"); 421 419 } 422 420 … … 427 425 428 426 /* Class, subclass, length(incl \0) 25 */ 429 r c= snprintf(match_id_str, ID_MAX_STR_LEN,427 ret = snprintf(match_id_str, ID_MAX_STR_LEN, 430 428 "pci/class=%02x&subclass=%02x", 431 429 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"); 435 432 } 436 433 … … 441 438 442 439 /* Class, length(incl \0) 13 */ 443 r c= snprintf(match_id_str, ID_MAX_STR_LEN, "pci/class=%02x",440 ret = snprintf(match_id_str, ID_MAX_STR_LEN, "pci/class=%02x", 444 441 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"); 448 444 } 449 445 -
uspace/drv/bus/usb/ohci/hw_struct/completion_codes.h
r8610c2c rd5c1051 54 54 }; 55 55 56 inline static unsignedint cc_to_rc(unsigned int cc)56 inline static int cc_to_rc(unsigned int cc) 57 57 { 58 58 switch (cc) { -
uspace/drv/bus/usb/usbmid/usbmid.c
r8610c2c rd5c1051 117 117 * class name something humanly understandable. 118 118 */ 119 rc= asprintf(&child_name, "%s%hhu",119 int ret = asprintf(&child_name, "%s%hhu", 120 120 usb_str_class(interface_descriptor->interface_class), 121 121 interface_descriptor->interface_number); 122 if (r c< 0) {122 if (ret < 0) { 123 123 return ENOMEM; 124 124 } -
uspace/drv/test/test3/test3.c
r8610c2c rd5c1051 71 71 char *fun_name = NULL; 72 72 73 rc = asprintf(&fun_name, "%s%zu", base_name, index);74 if (rc < 0) {75 ddf_msg(LVL_ERROR, "Failed to format string: %s", str_error(rc));73 if (asprintf(&fun_name, "%s%zu", base_name, index) < 0) { 74 ddf_msg(LVL_ERROR, "Failed to format string: No memory"); 75 rc = ENOMEM; 76 76 goto leave; 77 77 } … … 161 161 162 162 for (i = 0; i < NUM_FUNCS; i++) { 163 rc = asprintf(&fun_name, "test3_%zu", i); 164 if (rc < 0) { 165 ddf_msg(LVL_ERROR, "Failed to format string: %s", str_error(rc)); 163 if (asprintf(&fun_name, "test3_%zu", i) < 0) { 164 ddf_msg(LVL_ERROR, "Failed to format string: No memory"); 166 165 return ENOMEM; 167 166 }
Note:
See TracChangeset
for help on using the changeset viewer.
