Ignore:
Timestamp:
2018-03-02T20:10:49Z (6 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
  • kernel/arch/arm32/include/arch/mm/page_armv4.h

    r3061bc1 ra35b458  
    137137        pte_level0_t *p = &pt[i].l0;
    138138        int np = (p->descriptor_type == PTE_DESCRIPTOR_NOT_PRESENT);
    139        
     139
    140140        return (np << PAGE_PRESENT_SHIFT) | (1 << PAGE_USER_SHIFT) |
    141141            (1 << PAGE_READ_SHIFT) | (1 << PAGE_WRITE_SHIFT) |
     
    152152{
    153153        pte_level1_t *p = &pt[i].l1;
    154        
     154
    155155        int dt = p->descriptor_type;
    156156        int ap = p->access_permission_0;
    157        
     157
    158158        return ((dt == PTE_DESCRIPTOR_NOT_PRESENT) << PAGE_PRESENT_SHIFT) |
    159159            ((ap == PTE_AP_USER_RO_KERNEL_RW) << PAGE_READ_SHIFT) |
     
    177177{
    178178        pte_level0_t *p = &pt[i].l0;
    179        
     179
    180180        if (flags & PAGE_NOT_PRESENT) {
    181181                p->descriptor_type = PTE_DESCRIPTOR_NOT_PRESENT;
     
    206206{
    207207        pte_level1_t *p = &pt[i].l1;
    208        
     208
    209209        if (flags & PAGE_NOT_PRESENT)
    210210                p->descriptor_type = PTE_DESCRIPTOR_NOT_PRESENT;
    211211        else
    212212                p->descriptor_type = PTE_DESCRIPTOR_SMALL_PAGE;
    213        
     213
    214214        p->cacheable = p->bufferable = (flags & PAGE_CACHEABLE) != 0;
    215        
     215
    216216        /* default access permission */
    217217        p->access_permission_0 = p->access_permission_1 =
    218218            p->access_permission_2 = p->access_permission_3 =
    219219            PTE_AP_USER_NO_KERNEL_RW;
    220        
     220
    221221        if (flags & PAGE_USER)  {
    222222                if (flags & PAGE_READ) {
Note: See TracChangeset for help on using the changeset viewer.