Changeset 46577995 in mainline for uspace/drv/bus/usb/ohci/main.c


Ignore:
Timestamp:
2018-01-04T20:50:52Z (8 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Children:
e211ea04
Parents:
facacc71
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-01-04 20:47:53)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-01-04 20:50:52)
Message:

Use errno_t in all uspace and kernel code.

Change type of every variable, parameter and return value that holds an
<errno.h> constant to either errno_t (the usual case), or sys_errno_t
(some places in kernel). This is for the purpose of self-documentation,
as well as for type-checking with a bit of type definition hackery.

After this commit, HelenOS is free of code that mixes error codes with non-error
values on the assumption that error codes are negative.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/ohci/main.c

    rfacacc71 r46577995  
    4747
    4848#define NAME "ohci"
    49 static int ohci_driver_init(hcd_t *, const hw_res_list_parsed_t *, bool);
     49static errno_t ohci_driver_init(hcd_t *, const hw_res_list_parsed_t *, bool);
    5050static void ohci_driver_fini(hcd_t *);
    5151
     
    6666
    6767
    68 static int ohci_driver_init(hcd_t *hcd, const hw_res_list_parsed_t *res, bool irq)
     68static errno_t ohci_driver_init(hcd_t *hcd, const hw_res_list_parsed_t *res, bool irq)
    6969{
    7070        assert(hcd);
     
    7575                return ENOMEM;
    7676
    77         const int ret = hc_init(instance, res, irq);
     77        const errno_t ret = hc_init(instance, res, irq);
    7878        if (ret == EOK) {
    7979                hcd_set_implementation(hcd, instance, &ohci_hc_driver.ops);
     
    100100 * @return Error code.
    101101 */
    102 static int ohci_dev_add(ddf_dev_t *device)
     102static errno_t ohci_dev_add(ddf_dev_t *device)
    103103{
    104104        usb_log_debug("ohci_dev_add() called\n");
Note: See TracChangeset for help on using the changeset viewer.