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/genarch/src/drivers/ns16550/ns16550.c

    r3061bc1 ra35b458  
    7171{
    7272        ns16550_instance_t *instance = irq->instance;
    73        
     73
    7474        while (ns16550_reg_read(instance, NS16550_REG_LSR) & LSR_DATA_READY) {
    7575                uint8_t data = ns16550_reg_read(instance, NS16550_REG_RBR);
     
    9595{
    9696        ns16550_instance_t *instance = (ns16550_instance_t *) dev->data;
    97        
     97
    9898        if ((!instance->parea.mapped) || (console_override)) {
    9999                if (ascii_check(ch))
     
    135135                instance->input = NULL;
    136136                instance->output = NULL;
    137                
     137
    138138                if (output) {
    139139                        instance->output = malloc(sizeof(outdev_t),
     
    143143                                return NULL;
    144144                        }
    145                        
     145
    146146                        outdev_initialize("ns16550", instance->output,
    147147                            &ns16550_ops);
     
    149149                        *output = instance->output;
    150150                }
    151                
     151
    152152                irq_initialize(&instance->irq);
    153153                instance->irq.inr = inr;
     
    157157                instance->irq.cir = cir;
    158158                instance->irq.cir_arg = cir_arg;
    159                
     159
    160160                instance->parea.pbase = (uintptr_t) dev;
    161161                instance->parea.frames = 1;
     
    164164                ddi_parea_register(&instance->parea);
    165165        }
    166        
     166
    167167        return instance;
    168168}
     
    172172        assert(instance);
    173173        assert(input);
    174        
     174
    175175        instance->input = input;
    176176        irq_register(&instance->irq);
    177        
     177
    178178        ns16550_clear_buffer(instance);
    179        
     179
    180180        /* Enable interrupts */
    181181        ns16550_reg_write(instance, NS16550_REG_IER, IER_ERBFI);
Note: See TracChangeset for help on using the changeset viewer.