Changeset a35b458 in mainline for uspace/app/tester/mm/mapping1.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/app/tester/mm/mapping1.c

    r3061bc1 ra35b458  
    4141{
    4242        TPRINTF("Creating AS area...\n");
    43        
     43
    4444        void *result = as_area_create(AS_AREA_ANY, size,
    4545            AS_AREA_READ | AS_AREA_WRITE | AS_AREA_CACHEABLE, AS_AREA_UNPAGED);
    4646        if (result == AS_MAP_FAILED)
    4747                return NULL;
    48        
     48
    4949        return result;
    5050}
     
    5353{
    5454        TPRINTF("Touching (faulting-in) AS area...\n");
    55        
     55
    5656        char *ptr = (char *)area;
    57        
     57
    5858        while (size > 0) {
    5959                *ptr = 0;
     
    8686{
    8787        errno_t rc;
    88        
     88
    8989        size_t buffer1_len = BUFFER1_PAGES * PAGE_SIZE;
    9090        size_t buffer2_len = BUFFER2_PAGES * PAGE_SIZE;
     
    9494                return "Cannot allocate memory";
    9595        }
    96        
     96
    9797        touch_area(buffer1, buffer1_len);
    9898        touch_area(buffer2, buffer2_len);
    99        
     99
    100100        /* Now verify that mapping to physical frames exist. */
    101101        if (!VERIFY_MAPPING(buffer1, BUFFER1_PAGES, EOK)) {
     
    105105                return "Failed to find mapping (buffer2)";
    106106        }
    107        
     107
    108108        /* Let's destroy the buffer1 area and access it again. */
    109109        rc = as_area_destroy(buffer1);
     
    114114                return "Mapping of destroyed area still exists";
    115115        }
    116        
     116
    117117        /* clean-up */
    118118        rc = as_area_destroy(buffer2);
     
    120120                return "Failed to destroy AS area";
    121121        }
    122        
     122
    123123        return NULL;
    124124}
Note: See TracChangeset for help on using the changeset viewer.