Changeset a35b458 in mainline for boot/arch/mips32/src/main.c


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
  • boot/arch/mips32/src/main.c

    r3061bc1 ra35b458  
    4949{
    5050        version_print();
    51        
     51
    5252        printf("\nMemory statistics\n");
    5353        printf(" %p|%p: CPU map\n", (void *) PA2KA(CPUMAP_OFFSET),
     
    6161        printf(" %p|%p: bootloader entry point\n",
    6262            (void *) PA2KA(LOADER_OFFSET), (void *) LOADER_OFFSET);
    63        
     63
    6464        size_t i;
    6565        for (i = 0; i < COMPONENTS; i++)
     
    7070                    components[i].name, components[i].inflated,
    7171                    components[i].size);
    72        
     72
    7373        void *dest[COMPONENTS];
    7474        size_t top = 0;
     
    7777        for (i = 0; i < min(COMPONENTS, TASKMAP_MAX_RECORDS); i++) {
    7878                top = ALIGN_UP(top, PAGE_SIZE);
    79                
     79
    8080                if (i > 0) {
    8181                        bootinfo->tasks[bootinfo->cnt].addr = TOP2ADDR(top);
    8282                        bootinfo->tasks[bootinfo->cnt].size = components[i].inflated;
    83                        
     83
    8484                        str_cpy(bootinfo->tasks[bootinfo->cnt].name,
    8585                            BOOTINFO_TASK_NAME_BUFLEN, components[i].name);
    86                        
     86
    8787                        bootinfo->cnt++;
    8888                }
    89                
     89
    9090                dest[i] = TOP2ADDR(top);
    9191                top += components[i].inflated;
    9292                cnt++;
    9393        }
    94        
     94
    9595        printf("\nInflating components ... ");
    96        
     96
    9797        for (i = cnt; i > 0; i--) {
    9898#ifdef MACHINE_msim
     
    104104                }
    105105#endif
    106                
     106
    107107                printf("%s ", components[i - 1].name);
    108                
     108
    109109                int err = inflate(components[i - 1].addr, components[i - 1].size,
    110110                    dest[i - 1], components[i - 1].inflated);
    111                
     111
    112112                if (err != EOK) {
    113113                        printf("\n%s: Inflating error %d, halting.\n",
     
    116116                }
    117117        }
    118        
     118
    119119        printf(".\n");
    120        
     120
    121121        printf("Copying CPU map ... \n");
    122        
     122
    123123        bootinfo->cpumap = 0;
    124124        for (i = 0; i < CPUMAP_MAX_RECORDS; i++) {
     
    126126                        bootinfo->cpumap |= (1 << i);
    127127        }
    128        
     128
    129129        printf("Booting the kernel ... \n");
    130130        jump_to_kernel((void *) PA2KA(BOOT_OFFSET), bootinfo);
Note: See TracChangeset for help on using the changeset viewer.