Changeset 46577995 in mainline for uspace/drv/bus/usb/ehci/res.c


Ignore:
Timestamp:
2018-01-04T20:50:52Z (7 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/ehci/res.c

    rfacacc71 r46577995  
    6262 * @return Error code.
    6363 */
    64 static int disable_extended_caps(async_sess_t *parent_sess, unsigned eecp)
     64static errno_t disable_extended_caps(async_sess_t *parent_sess, unsigned eecp)
    6565{
    6666        /* nothing to do */
     
    7070        /* Read the first EEC. i.e. Legacy Support register */
    7171        uint32_t usblegsup;
    72         int ret = pci_config_space_read_32(parent_sess,
     72        errno_t ret = pci_config_space_read_32(parent_sess,
    7373            eecp + USBLEGSUP_OFFSET, &usblegsup);
    7474        if (ret != EOK) {
     
    172172}
    173173
    174 int disable_legacy(ddf_dev_t *device)
     174errno_t disable_legacy(ddf_dev_t *device)
    175175{
    176176        assert(device);
     
    184184        hw_res_list_parsed_t res;
    185185        hw_res_list_parsed_init(&res);
    186         int ret = hw_res_get_list_parsed(parent_sess, &res, 0);
     186        errno_t ret = hw_res_get_list_parsed(parent_sess, &res, 0);
    187187        if (ret != EOK) {
    188188                usb_log_error("Failed to get resource list: %s\n",
Note: See TracChangeset for help on using the changeset viewer.