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
  • kernel/arch/sparc64/src/drivers/niagara.c

    r3061bc1 ra35b458  
    126126         * shared buffer to the console.
    127127         */
    128        
     128
    129129        while (output_buffer.read_ptr != output_buffer.write_ptr) {
    130130                do_putchar(output_buffer.data[output_buffer.read_ptr]);
     
    132132                    ((output_buffer.read_ptr) + 1) % OUTPUT_BUFFER_SIZE;
    133133        }
    134        
     134
    135135        /*
    136136         * Read character from keyboard.
    137137         */
    138        
     138
    139139        uint64_t c;
    140140        if (__hypercall_fast_ret1(0, 0, 0, 0, 0, CONS_GETCHAR, &c) == HV_EOK) {
     
    174174        if (instance)
    175175                return;
    176        
     176
    177177        instance = malloc(sizeof(niagara_instance_t), FRAME_ATOMIC);
    178178        instance->thread = thread_create(kniagarapoll, NULL, TASK,
    179179            THREAD_FLAG_UNCOUNTED, "kniagarapoll");
    180        
     180
    181181        if (!instance->thread) {
    182182                free(instance);
     
    184184                return;
    185185        }
    186        
     186
    187187        instance->srlnin = NULL;
    188        
     188
    189189        output_buffer.read_ptr = 0;
    190190        output_buffer.write_ptr = 0;
    191191        input_buffer.write_ptr = 0;
    192192        input_buffer.read_ptr = 0;
    193        
     193
    194194        /*
    195195         * Set sysinfos and pareas so that the userspace counterpart of the
     
    197197         * buffers.
    198198         */
    199        
     199
    200200        sysinfo_set_item_val("fb", NULL, true);
    201201        sysinfo_set_item_val("fb.kind", NULL, 5);
    202        
     202
    203203        sysinfo_set_item_val("niagara.outbuf.address", NULL,
    204204            KA2PA(&output_buffer));
     
    207207        sysinfo_set_item_val("niagara.outbuf.datasize", NULL,
    208208            OUTPUT_BUFFER_SIZE);
    209        
     209
    210210        sysinfo_set_item_val("niagara.inbuf.address", NULL,
    211211            KA2PA(&input_buffer));
     
    214214        sysinfo_set_item_val("niagara.inbuf.datasize", NULL,
    215215           INPUT_BUFFER_SIZE);
    216        
     216
    217217        outbuf_parea.pbase = (uintptr_t) (KA2PA(&output_buffer));
    218218        outbuf_parea.frames = 1;
     
    220220        outbuf_parea.mapped = false;
    221221        ddi_parea_register(&outbuf_parea);
    222        
     222
    223223        inbuf_parea.pbase = (uintptr_t) (KA2PA(&input_buffer));
    224224        inbuf_parea.frames = 1;
     
    226226        inbuf_parea.mapped = false;
    227227        ddi_parea_register(&inbuf_parea);
    228        
     228
    229229        outdev_t *niagara_dev = malloc(sizeof(outdev_t), FRAME_ATOMIC);
    230230        outdev_initialize("niagara_dev", niagara_dev, &niagara_ops);
     
    238238{
    239239        niagara_init();
    240        
     240
    241241        if (instance) {
    242242                srln_instance_t *srln_instance = srln_init();
     
    244244                        indev_t *sink = stdin_wire();
    245245                        indev_t *srln = srln_wire(srln_instance, sink);
    246                        
     246
    247247                        instance->srlnin = srln;
    248248                        thread_ready(instance->thread);
    249249                }
    250250        }
    251        
     251
    252252        return instance;
    253253}
Note: See TracChangeset for help on using the changeset viewer.