Changeset a35b458 in mainline for uspace/drv/bus/isa/isa.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/drv/bus/isa/isa.c

    r3061bc1 ra35b458  
    402402        size_t count = fun->hw_resources.count;
    403403        hw_resource_t *resources = fun->hw_resources.resources;
    404        
     404
    405405        if (count < ISA_MAX_HW_RES) {
    406406                if ((dma > 0) && (dma < 4)) {
    407407                        resources[count].type = DMA_CHANNEL_8;
    408408                        resources[count].res.dma_channel.dma8 = dma;
    409                        
     409
    410410                        fun->hw_resources.count++;
    411411                        ddf_msg(LVL_NOTE, "Added dma 0x%x to function %s", dma,
    412412                            ddf_fun_get_name(fun->fnode));
    413                        
     413
    414414                        return;
    415415                }
     
    418418                        resources[count].type = DMA_CHANNEL_16;
    419419                        resources[count].res.dma_channel.dma16 = dma;
    420                        
     420
    421421                        fun->hw_resources.count++;
    422422                        ddf_msg(LVL_NOTE, "Added dma 0x%x to function %s", dma,
    423423                            ddf_fun_get_name(fun->fnode));
    424                        
     424
    425425                        return;
    426426                }
    427                
     427
    428428                ddf_msg(LVL_WARN, "Skipped dma 0x%x for function %s", dma,
    429429                    ddf_fun_get_name(fun->fnode));
     
    492492{
    493493        char *end = NULL;
    494        
     494
    495495        val = skip_spaces(val);
    496496        const int dma = strtol(val, &end, 10);
    497        
     497
    498498        if (val != end)
    499499                isa_fun_add_dma(fun, dma);
     
    733733        if (rc != EOK)
    734734                return rc;
    735        
     735
    736736        rc = pio_window_get(sess, &isa->pio_win);
    737737        if (rc != EOK) {
Note: See TracChangeset for help on using the changeset viewer.