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/arch/sparc64/src/drivers/scr.c

    r3061bc1 ra35b458  
    6767        ofw_sbus_reg_t *sbus_reg;
    6868        const char *name;
    69        
     69
    7070        name = ofw_tree_node_name(node);
    71        
     71
    7272        if (str_cmp(name, "SUNW,m64B") == 0)
    7373                scr_type = SCR_ATYFB;
     
    8080        else if (str_cmp(name, "QEMU,VGA") == 0)
    8181                scr_type = SCR_QEMU_VGA;
    82        
     82
    8383        if (scr_type == SCR_UNKNOWN) {
    8484                log(LF_ARCH, LVL_ERROR, "Unknown screen device.");
    8585                return;
    8686        }
    87        
     87
    8888        uintptr_t fb_addr;
    8989        unsigned int fb_offset = 0;
     
    121121                        return;
    122122                }
    123        
     123
    124124                pci_reg = &((ofw_pci_reg_t *) prop->value)[1];
    125                
     125
    126126                if (!ofw_pci_reg_absolutize(node, pci_reg, &pci_abs_reg)) {
    127127                        log(LF_ARCH, LVL_ERROR,
     
    129129                        return;
    130130                }
    131        
     131
    132132                if (!ofw_pci_apply_ranges(node->parent, &pci_abs_reg,
    133133                    &fb_addr)) {
     
    136136                        return;
    137137                }
    138                
     138
    139139                switch (fb_depth) {
    140140                case 8:
     
    159159                        return;
    160160                }
    161                
     161
    162162                break;
    163163        case SCR_XVR:
     
    167167                        return;
    168168                }
    169        
     169
    170170                pci_reg = &((ofw_pci_reg_t *) prop->value)[1];
    171                
     171
    172172                if (!ofw_pci_reg_absolutize(node, pci_reg, &pci_abs_reg)) {
    173173                        log(LF_ARCH, LVL_ERROR,
     
    175175                        return;
    176176                }
    177        
     177
    178178                if (!ofw_pci_apply_ranges(node->parent, &pci_abs_reg,
    179179                    &fb_addr)) {
     
    207207                        return;
    208208                }
    209                
     209
    210210                break;
    211211        case SCR_FFB:
     
    231231                        return;
    232232                }
    233                
     233
    234234                sbus_reg = &((ofw_sbus_reg_t *) prop->value)[0];
    235235                if (!ofw_sbus_apply_ranges(node->parent, sbus_reg, &fb_addr)) {
     
    238238                        return;
    239239                }
    240        
     240
    241241                break;
    242242
     
    297297                .visual = visual,
    298298        };
    299        
     299
    300300        outdev_t *fbdev = fb_init(&props);
    301301        if (fbdev)
Note: See TracChangeset for help on using the changeset viewer.