Changeset a35b458 in mainline for kernel/generic/src/mm/page.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
  • kernel/generic/src/mm/page.c

    r3061bc1 ra35b458  
    9999{
    100100        assert(page_table_locked(as));
    101        
     101
    102102        assert(page_mapping_operations);
    103103        assert(page_mapping_operations->mapping_insert);
     
    105105        page_mapping_operations->mapping_insert(as, ALIGN_DOWN(page, PAGE_SIZE),
    106106            ALIGN_DOWN(frame, FRAME_SIZE), flags);
    107        
     107
    108108        /* Repel prefetched accesses to the old mapping. */
    109109        memory_barrier();
     
    123123{
    124124        assert(page_table_locked(as));
    125        
     125
    126126        assert(page_mapping_operations);
    127127        assert(page_mapping_operations->mapping_remove);
    128        
     128
    129129        page_mapping_operations->mapping_remove(as,
    130130            ALIGN_DOWN(page, PAGE_SIZE));
    131        
     131
    132132        /* Repel prefetched accesses to the old mapping. */
    133133        memory_barrier();
     
    148148{
    149149        assert(nolock || page_table_locked(as));
    150        
     150
    151151        assert(page_mapping_operations);
    152152        assert(page_mapping_operations->mapping_find);
    153        
     153
    154154        return page_mapping_operations->mapping_find(as,
    155155            ALIGN_DOWN(page, PAGE_SIZE), nolock, pte);
     
    169169{
    170170        assert(nolock || page_table_locked(as));
    171        
     171
    172172        assert(page_mapping_operations);
    173173        assert(page_mapping_operations->mapping_find);
    174        
     174
    175175        page_mapping_operations->mapping_update(as,
    176176            ALIGN_DOWN(page, PAGE_SIZE), nolock, pte);
     
    186186        assert(page_mapping_operations);
    187187        assert(page_mapping_operations->mapping_make_global);
    188        
     188
    189189        return page_mapping_operations->mapping_make_global(base, size);
    190190}
     
    193193{
    194194        page_table_lock(AS, true);
    195        
     195
    196196        pte_t pte;
    197197        bool found = page_mapping_find(AS, virt, false, &pte);
     
    200200                return ENOENT;
    201201        }
    202        
     202
    203203        *phys = PTE_GET_FRAME(&pte) +
    204204            (virt - ALIGN_DOWN(virt, PAGE_SIZE));
    205        
     205
    206206        page_table_unlock(AS, true);
    207        
     207
    208208        return EOK;
    209209}
     
    221221        if (rc != EOK)
    222222                return rc;
    223        
     223
    224224        rc = copy_to_uspace(phys_ptr, &phys, sizeof(phys));
    225225        return (sys_errno_t) rc;
Note: See TracChangeset for help on using the changeset viewer.