Changeset 46577995 in mainline for uspace/drv/intctl/icp-ic/icp-ic.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/intctl/icp-ic/icp-ic.c

    rfacacc71 r46577995  
    5252};
    5353
    54 static int icpic_enable_irq(icpic_t *icpic, sysarg_t irq)
     54static errno_t icpic_enable_irq(icpic_t *icpic, sysarg_t irq)
    5555{
    5656        if (irq > icpic_max_irq)
     
    112112
    113113/** Add icp-ic device. */
    114 int icpic_add(icpic_t *icpic, icpic_res_t *res)
     114errno_t icpic_add(icpic_t *icpic, icpic_res_t *res)
    115115{
    116116        ddf_fun_t *fun_a = NULL;
    117117        void *regs;
    118         int rc;
     118        errno_t rc;
    119119
    120120        rc = pio_enable((void *)res->base, sizeof(icpic_regs_t), &regs);
     
    153153
    154154/** Remove icp-ic device */
    155 int icpic_remove(icpic_t *icpic)
     155errno_t icpic_remove(icpic_t *icpic)
    156156{
    157157        return ENOTSUP;
     
    159159
    160160/** icp-ic device gone */
    161 int icpic_gone(icpic_t *icpic)
     161errno_t icpic_gone(icpic_t *icpic)
    162162{
    163163        return ENOTSUP;
Note: See TracChangeset for help on using the changeset viewer.