Changeset 46577995 in mainline for uspace/drv/bus/usb/vhc/transfer.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/vhc/transfer.c

    rfacacc71 r46577995  
    5858}
    5959
    60 static int process_transfer_local(usb_transfer_batch_t *batch,
     60static errno_t process_transfer_local(usb_transfer_batch_t *batch,
    6161    usbvirt_device_t *dev, size_t *actual_data_size)
    6262{
    63         int rc;
     63        errno_t rc;
    6464       
    6565        const usb_direction_t dir = usb_transfer_batch_direction(batch);
     
    9494}
    9595
    96 static int process_transfer_remote(usb_transfer_batch_t *batch,
     96static errno_t process_transfer_remote(usb_transfer_batch_t *batch,
    9797    async_sess_t *sess, size_t *actual_data_size)
    9898{
    99         int rc;
     99        errno_t rc;
    100100
    101101        const usb_direction_t dir = usb_transfer_batch_direction(batch);
     
    143143
    144144static void execute_transfer_callback_and_free(vhc_transfer_t *transfer,
    145     size_t data_transfer_size, int outcome)
     145    size_t data_transfer_size, errno_t outcome)
    146146{
    147147        assert(outcome != ENAK);
     
    154154}
    155155
    156 int vhc_init(vhc_data_t *instance)
     156errno_t vhc_init(vhc_data_t *instance)
    157157{
    158158        assert(instance);
     
    163163}
    164164
    165 int vhc_schedule(hcd_t *hcd, usb_transfer_batch_t *batch)
     165errno_t vhc_schedule(hcd_t *hcd, usb_transfer_batch_t *batch)
    166166{
    167167        assert(hcd);
     
    199199}
    200200
    201 int vhc_transfer_queue_processor(void *arg)
     201errno_t vhc_transfer_queue_processor(void *arg)
    202202{
    203203        vhc_virtdev_t *dev = arg;
     
    214214                fibril_mutex_unlock(&dev->guard);
    215215
    216                 int rc = EOK;
     216                errno_t rc = EOK;
    217217                size_t data_transfer_size = 0;
    218218                if (dev->dev_sess) {
Note: See TracChangeset for help on using the changeset viewer.