Changeset a35b458 in mainline for uspace/drv/platform/malta/malta.c


Ignore:
Timestamp:
2018-03-02T20:10:49Z (8 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/platform/malta/malta.c

    r3061bc1 ra35b458  
    138138{
    139139        malta_fun_t *fun = malta_fun(fnode);
    140        
     140
    141141        assert(fun != NULL);
    142142        return &fun->hw_resources;
     
    146146{
    147147        /* TODO */
    148        
     148
    149149        return false;
    150150}
     
    175175{
    176176        ddf_msg(LVL_DEBUG, "Adding new function '%s'.", name);
    177        
     177
    178178        ddf_fun_t *fnode = NULL;
    179179        errno_t rc;
    180        
     180
    181181        /* Create new device. */
    182182        fnode = ddf_fun_create(dev, fun_inner, name);
    183183        if (fnode == NULL)
    184184                goto failure;
    185        
     185
    186186        malta_fun_t *fun = ddf_fun_data_alloc(fnode, sizeof(malta_fun_t));
    187187        *fun = *fun_proto;
    188        
     188
    189189        /* Add match ID */
    190190        rc = ddf_fun_add_match_id(fnode, str_match_id, 100);
    191191        if (rc != EOK)
    192192                goto failure;
    193        
     193
    194194        /* Set provided operations to the device. */
    195195        ddf_fun_set_ops(fnode, &malta_fun_ops);
    196        
     196
    197197        /* Register function. */
    198198        if (ddf_fun_bind(fnode) != EOK) {
     
    200200                goto failure;
    201201        }
    202        
     202
    203203        return true;
    204        
     204
    205205failure:
    206206        if (fnode != NULL)
    207207                ddf_fun_destroy(fnode);
    208        
     208
    209209        ddf_msg(LVL_ERROR, "Failed adding function '%s'.", name);
    210        
     210
    211211        return false;
    212212}
     
    246246            &gt[GT_PCI_CMD / sizeof(ioport32_t)], host2uint32_t_le(val));
    247247
    248        
     248
    249249        /* Register functions. */
    250250        if (!malta_add_functions(dev)) {
    251251                ddf_msg(LVL_ERROR, "Failed to add functions for the Malta platform.");
    252252        }
    253        
     253
    254254        return EOK;
    255255}
Note: See TracChangeset for help on using the changeset viewer.