Changeset a35b458 in mainline for uspace/lib/c/generic/ddi.c


Ignore:
Timestamp:
2018-03-02T20:10:49Z (7 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f1380b7
Parents:
3061bc1
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-02-28 17:38:31)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-03-02 20:10:49)
Message:

style: Remove trailing whitespace on _all_ lines, including empty ones, for particular file types.

Command used: tools/srepl '\s\+$' '' -- *.c *.h *.py *.sh *.s *.S *.ag

Currently, whitespace on empty lines is very inconsistent.
There are two basic choices: Either remove the whitespace, or keep empty lines
indented to the level of surrounding code. The former is AFAICT more common,
and also much easier to do automatically.

Alternatively, we could write script for automatic indentation, and use that
instead. However, if such a script exists, it's possible to use the indented
style locally, by having the editor apply relevant conversions on load/save,
without affecting remote repository. IMO, it makes more sense to adopt
the simpler rule.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/ddi.c

    r3061bc1 ra35b458  
    142142{
    143143        *phys = constraint;
    144        
     144
    145145        return (errno_t) __SYSCALL6(SYS_DMAMEM_MAP, (sysarg_t) size,
    146146            (sysarg_t) map_flags, (sysarg_t) flags | DMAMEM_FLAGS_ANONYMOUS,
     
    180180                .size = size
    181181        };
    182        
     182
    183183        return (errno_t) __SYSCALL1(SYS_IOSPACE_ENABLE, (sysarg_t) &arg);
    184184}
     
    204204                .size = size
    205205        };
    206        
     206
    207207        return (errno_t) __SYSCALL1(SYS_IOSPACE_DISABLE, (sysarg_t) &arg);
    208208}
     
    284284        if (!virt)
    285285                return EINVAL;
    286        
     286
    287287        uintptr_t phys_frame =
    288288            ALIGN_DOWN((uintptr_t) pio_addr, PAGE_SIZE);
    289289        size_t offset = (uintptr_t) pio_addr - phys_frame;
    290290        size_t pages = SIZE2PAGES(offset + size);
    291        
     291
    292292        void *virt_page = AS_AREA_ANY;
    293293        errno_t rc = physmem_map(phys_frame, pages,
     
    295295        if (rc != EOK)
    296296                return rc;
    297        
     297
    298298        *virt = virt_page + offset;
    299299        return EOK;
Note: See TracChangeset for help on using the changeset viewer.