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

    r3061bc1 ra35b458  
    102102        if (area->pages <= nonanon_pages)
    103103                return true;
    104        
     104
    105105        return reserve_try_alloc(area->pages - nonanon_pages);
    106106}
     
    123123                        reserve_free(nonanon_pages - new_pages);
    124124        }
    125        
     125
    126126        return true;
    127127}
     
    166166            cur = cur->next) {
    167167                unsigned int i;
    168                
     168
    169169                node = list_get_instance(cur, btree_node_t, leaf_link);
    170                
     170
    171171                for (i = 0; i < node->keys; i++) {
    172172                        uintptr_t base = node->key[i];
    173173                        size_t count = (size_t) node->value[i];
    174174                        unsigned int j;
    175                        
     175
    176176                        /*
    177177                         * Skip read-only areas of used space that are backed
     
    182182                                    base + P2SZ(count) <= start_anon)
    183183                                        continue;
    184                        
     184
    185185                        for (j = 0; j < count; j++) {
    186186                                pte_t pte;
    187187                                bool found;
    188                        
     188
    189189                                /*
    190190                                 * Skip read-only pages that are backed by the
     
    195195                                            base + P2SZ(j + 1) <= start_anon)
    196196                                                continue;
    197                                
     197
    198198                                page_table_lock(area->as, false);
    199199                                found = page_mapping_find(area->as,
     
    212212                                frame_reference_add(pfn);
    213213                        }
    214                                
     214
    215215                }
    216216        }
     
    267267        if (!as_area_check_access(area, access))
    268268                return AS_PF_FAULT;
    269        
     269
    270270        if (upage < ALIGN_DOWN(entry->p_vaddr, PAGE_SIZE))
    271271                return AS_PF_FAULT;
    272        
     272
    273273        if (upage >= entry->p_vaddr + entry->p_memsz)
    274274                return AS_PF_FAULT;
    275        
     275
    276276        i = (upage - ALIGN_DOWN(entry->p_vaddr, PAGE_SIZE)) >> PAGE_WIDTH;
    277277        base = (uintptr_t)
     
    288288                 * The address space area is shared.
    289289                 */
    290                
     290
    291291                frame = (uintptr_t) btree_search(&area->sh_info->pagemap,
    292292                    upage - area->base, &leaf);
Note: See TracChangeset for help on using the changeset viewer.