Changeset a35b458 in mainline for kernel/arch/arm32/include


Ignore:
Timestamp:
2018-03-02T20:10:49Z (8 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.

Location:
kernel/arch/arm32/include/arch
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/arm32/include/arch/asm.h

    r3061bc1 ra35b458  
    105105{
    106106        uintptr_t v;
    107        
     107
    108108        asm volatile (
    109109                "and %[v], sp, %[size]\n"
     
    111111                : [size] "r" (~(STACK_SIZE - 1))
    112112        );
    113        
     113
    114114        return v;
    115115}
  • kernel/arch/arm32/include/arch/atomic.h

    r3061bc1 ra35b458  
    5959        atomic_count_t ret = val->count;
    6060        interrupts_restore(ipl);
    61        
     61
    6262        return ret;
    6363}
  • 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) {
  • kernel/arch/arm32/include/arch/mm/page_armv6.h

    r3061bc1 ra35b458  
    170170        const pte_level0_t *p = &pt[i].l0;
    171171        const unsigned np = (p->descriptor_type == PTE_DESCRIPTOR_NOT_PRESENT);
    172        
     172
    173173        return (np << PAGE_PRESENT_SHIFT) | (1 << PAGE_USER_SHIFT) |
    174174            (1 << PAGE_READ_SHIFT) | (1 << PAGE_WRITE_SHIFT) |
     
    185185{
    186186        const pte_level1_t *p = &pt[i].l1;
    187        
     187
    188188        const unsigned dt = p->descriptor_type;
    189189        const unsigned ap0 = p->access_permission_0;
    190190        const unsigned ap1 = p->access_permission_1;
    191        
     191
    192192        return ((dt == PTE_DESCRIPTOR_NOT_PRESENT) << PAGE_PRESENT_SHIFT) |
    193193            ((dt != PTE_DESCRIPTOR_SMALL_PAGE_NX) << PAGE_EXEC_SHIFT) |
     
    211211{
    212212        pte_level0_t *p = &pt[i].l0;
    213        
     213
    214214        if (flags & PAGE_NOT_PRESENT) {
    215215                p->descriptor_type = PTE_DESCRIPTOR_NOT_PRESENT;
     
    245245{
    246246        pte_level1_t *p = &pt[i].l1;
    247        
     247
    248248        if (flags & PAGE_NOT_PRESENT) {
    249249                p->descriptor_type = PTE_DESCRIPTOR_NOT_PRESENT;
     
    278278                p->bufferable = 1;
    279279        }
    280        
     280
    281281        /* Shareable is ignored for devices (non-cacheable),
    282282         * turn it off for normal memory. */
    283283        p->shareable = 0;
    284        
     284
    285285        p->non_global = !(flags & PAGE_GLOBAL);
    286        
     286
    287287        /* default access permission: kernel only*/
    288288        p->access_permission_0 = PTE_AP0_USER_NO_KERNEL_FULL;
    289        
     289
    290290        if (flags & PAGE_USER) {
    291291                p->access_permission_0 = PTE_AP0_USER_FULL_KERNEL_FULL;
Note: See TracChangeset for help on using the changeset viewer.